cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F2xx FLASH erease program

Barbie
Associate II
Posted on April 04, 2013 at 14:43

I have problem erease the write to the FLASH .

I do as follow

   FLASH_Unlock();

   FLASH_EraseSector(FLASH_Sector_4, VoltageRange_3);

Prair to that I check that all  section are unlock nWRP= 0xFFF.

I use HSE and I read that in STM32F1xx it should use HSI (in PM0042) but not mention in STM32F2xx program manual PM0059. Does it true?

When I do erease all it work.

What could be the reasone?

Regards

Bar.

#sterease/program
3 REPLIES 3
Barbie
Associate II
Posted on April 04, 2013 at 15:59

Maybe this could help.

I can erease sector 1,0 but not above it. As I say I look at nWRP=0xFFF

Posted on April 04, 2013 at 16:05

FLASH_EraseSector(FLASH_Sector_4, VoltageRange_3);

Works for me erasing 0x08010000 .. 0x0801FFFF

After I unlock, I make sure to clear any pending status, wait for any busy state, erase. You should perhaps also wait for the operation to complete.
Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Barbie
Associate II
Posted on April 04, 2013 at 16:24

Solve