cancel
Showing results for 
Search instead for 
Did you mean: 

My STM32 F01 looses contents of Page0 EEPROM after power cycle

SDyer.1
Associate II

Hi - I took a new Flip32 Flight controller board out of its sealed bag and reflashed the latest clearflight firmware (cleanflight_2.5.0_NAZE.hex) using the Flash Loader Demonstrator onto the board in Boot mode. ( I also tried clearflight configurator, and STM32CubeProgrammer)

It accepted the flash hex file and I could read the contents back and they were correct. But as soon as I power cycle back to run the program, it doesnt run, and upon investigation, the contents of Page Zero(0x08000000-EFF) are all 0xFFFFFFFF

There are no option bits set that I can see that would lock this memory from reading it, and the software doesnt run.

Does anyone know how can this be and how to resolve it?

1 ACCEPTED SOLUTION

Accepted Solutions
SDyer.1
Associate II

Looks like you are right @TDK - I loaded an older version of CleanFlight (2.3 from 2018) and it works ! Thanks for your help !

View solution in original post

6 REPLIES 6
TDK
Guru

If you've verified the software is programmed correctly, and then page0 gets erased when it runs, it sounds like a software bug.

If you feel a post has answered your question, please click "Accept as Solution".

Does the hexfile you are using, contain data for that first page? (hex files are human readable and the intelhex format is simple, see Wikipedia).

First page in firmware is skipped of there is supposed to be some bootloader there.

JW

SDyer.1
Associate II

Thanks for your replies -

@TDK​  I have to assume the software is not the problem because its released publically. https://github.com/cleanflight/cleanflight/releases

@Community member​  Yes I can view and compare the program before and after reboot at address 0x08000000

Before and after reboot:

0693W000001q44KQAQ.jpg

0693W000001q44jQAA.jpg

TDK
Guru

> I have to assume the software is not the problem because its released publically.

You really think all software available online is free of bugs? Anyone can upload to github. There are no quality checks.

Change the first few bytes right at 0x08000000 to 0xFF (to prevent the code from doing anything useful), then reset, and see if the entire page 0 is still reset or not.

If you feel a post has answered your question, please click "Accept as Solution".
SDyer.1
Associate II

Looks like you are right @TDK - I loaded an older version of CleanFlight (2.3 from 2018) and it works ! Thanks for your help !

TDK
Guru

Thanks for reporting back. Glad you got the issue resolved. Not surprised at all that cleanflight was the issue.

If you feel a post has answered your question, please click "Accept as Solution".