Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: 18_PT1000 RDA5807M-FM-Radio flashaccess TF_conops_BAEFLAGIMAN ... more
Revision 4:59c57c566685, committed 2014-07-18
- Comitter:
- Sissors
- Date:
- Fri Jul 18 20:18:21 2014 +0000
- Parent:
- 3:0f127a8ba79b
- Child:
- 5:a5cfedcf55d6
- Commit message:
- Disable IRQs during flash commands
Changed in this revision
| FreescaleIAP.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/FreescaleIAP.cpp Fri Jul 18 06:17:00 2014 +0000
+++ b/FreescaleIAP.cpp Fri Jul 18 20:18:21 2014 +0000
@@ -104,9 +104,11 @@
/* Clear possible flags which are set, run command, wait until done */
inline void run_command(void) {
//Clear possible old errors, start command, wait until done
+ __disable_irq(); //Disable IRQs, preventing IRQ routines from trying to access flash (thanks to https://mbed.org/users/mjr/)
FTFA->FSTAT = FTFA_FSTAT_FPVIOL_MASK | FTFA_FSTAT_ACCERR_MASK | FTFA_FSTAT_RDCOLERR_MASK;
FTFA->FSTAT = FTFA_FSTAT_CCIF_MASK;
while (!(FTFA->FSTAT & FTFA_FSTAT_CCIF_MASK));
+ __enable_irq();
}