cancel
Showing results for 
Search instead for 
Did you mean: 

stm32f302K8U6 crashes on flash page erase

felix
Associate II
Posted on March 17, 2015 at 10:35

Hi,

i try to do some eeprom emulation and got crashes with the stm32f3 eeprom emulation code. now i do it by hand an found that it crahses on the page erase..

in detail its when it starts the erase so on FLASH->CR |= FLASH_CR_STRT;

its running at 72Mhz.. the crasy thing is that it workes one time if the page is already empty.. so when i do a full flash erase while programming it it workes 1 time but if there is something written on the page it crashes..

i tried:

- enabling the HSI

- differend flash latencys

- interrupt disable

without a result..

maybe im missing something .. any help would be nice :)

2 REPLIES 2
felix
Associate II
Posted on March 17, 2015 at 13:46

i fixed it with disabling uart2 for the moment i erase the page. dont ask me why.. 

regards

Felix

Posted on March 17, 2015 at 15:35

You're the second person I recall complaining about such an issue.

No much mileage here on the F3's, but generally the processor stalls when executing/erasing flash, it will crash if you erase the code that's being executed, or the vector table. Check you're not hard faulting, or otherwise breaking the system with a debugger.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..