cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F405: Flash Corrupted after Power Off / Power On cycle

paolonegrini9
Associate II
Posted on April 13, 2015 at 16:36

Hi,

i have a problem with a device that use a STM32F405.

Occasionally, after a power off/ power on cycle,  the flash (SECTOR 0) are write to zero for the first 48bytes.

In the application firmware, there is no procedure that write flash at Sector 0 and the option byte are left to their default values.

Any know if there is a problem of flash corruption on the STM32F405 ?!?!

Thanks

#eeprom #- #flash #stm32f #rewrite
2 REPLIES 2
craig
Associate II
Posted on April 13, 2015 at 22:55

I've been working with  a few STM32F405 parts for a couple years now and have never experienced flash any random flash corruption.  However, I don't have any user code that writes to the flash at all.  You seem to suggest that maybe you do have code to write to flash, just not at sector 0?  A custom bootloader?  What toolchain?

paolonegrini9
Associate II
Posted on April 14, 2015 at 09:28

Exactly Mr. Blinky, I've a custom bootloader (SECTOR.0 + SECTOR.1), several user parameters (SECTOR. 2/3/10/11) and the user application firmware  (from Sector 4 to 9..).

The bootloader, which is used for firmware and parameters upgrade, is the only that can write/erase from sector 2 to 11.The application fw can only write/erase to sector 11.No one can acces to the boot sector's for  flash write or erase operations.At the beginning of my flash write/erase procedure i've the check of the destination addres, if is not an authorized addres, the procedure return immediatly with a dedicated error. So is very strange found Sector 0 with a different values from the original ones.

I saw an event of flash Sect.0 corruption simply after Power Off / Power On cycle.During power off or power on phase, no one (Bootloader and application fw...) acces to the flash for write or erase.

As a toolchain i use the yagarto-tools-20121018.

The micro is supplied with the 3V3, but in the option byte (...that i left the default values), the BOR is OFF (Vth=1.8V).Do you know if this could create a problem such as flash corruption?!?!

Many thanks