Skip to main content
Barbie
Associate III
April 4, 2013
Question

STM32F2xx FLASH erease program

  • April 4, 2013
  • 3 replies
  • 655 views
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
    This topic has been closed for replies.

    3 replies

    Barbie
    BarbieAuthor
    Associate III
    April 4, 2013
    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

    Tesla DeLorean
    Guru
    April 4, 2013
    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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Barbie
    BarbieAuthor
    Associate III
    April 4, 2013
    Posted on April 04, 2013 at 16:24

    Solve