Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable interrupts when performing flash ops #334

Merged
merged 1 commit into from
Nov 2, 2017

Conversation

c1728p9
Copy link
Contributor

@c1728p9 c1728p9 commented Oct 30, 2017

Update the atsam3u and kinetis flash drivers so they disable interrupts when erasing or programming flash. This prevents a crash from occurring if an interrupt occurs during flashing when the flash cannot be read.

This also fixes a watchdog reset on K20 interfaces which occurs when an interrupt interrupts the watchdog unlock sequence in the flash "Init" function. The addition of this critical section prevents the watchdog operation from being interrupted.

Update the atsam3u and kinetis flash drivers so they disable
interrupts when erasing or programming flash. This prevents
a crash from occurring if an interrupt occurs during flashing
when the flash cannot be read.

This also fixes a watchdog reset on K20 interfaces which occurs when
an interrupt interrupts the watchdog unlock sequence in the flash
"Init" function.  The addition of this critical section prevents the
watchdog operation from being interrupted.
@c1728p9
Copy link
Contributor Author

c1728p9 commented Oct 30, 2017

/morph test

@c1728p9
Copy link
Contributor Author

c1728p9 commented Oct 30, 2017

@mmahadevan108 in the process of making this change I noticed that the lpc4322 is also missing this lock and other updates. You may want to implement this in another PR. For reference this change was made for the lpc11u35 in #255.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant