AnsweredAssumed Answered

STM32F4 flash erase for IAP

Question asked by lesaint.pierre_yves on Jul 4, 2013
Latest reply on Jul 18, 2013 by Clive One
Hi everybody,

I'm trying to make the IAP exampe code from ST running on the Olimex board E-407 (STM32F4) but when i want to erase the flash, a hardfault occurs.

More precisely, it happens right after setting the STRT bit in the FLASH_CR register when erasing the sector1 (address 0x08004000, while the IAP code has been uploaded in the sector0, at 0x08000000)

So i'm thinking about a protection problem but:
- the control register is unlocked
- All the read/write protections of the FLASH registers are disabled
- the status register has the value 0x00000000 (no error detected here)

Other disturbing fact: I can erase other sectors properly (2,3,...) and write on them but then i can read only zeros...

Please, help !!