AnsweredAssumed Answered

STM32F205 flash self programming

Question asked by BenAli on Sep 6, 2014
Latest reply on Sep 14, 2014 by BenAli
Hello, 

First, sorry for my poor english.

I have a problem with a STM32F205. I am trying to read the content of flash memory , and for some bytes i have a value different with my firmware binary file. But the application is working fine !

What i did :
I create a binary file : xxx.bin
I program my MCU with OpenOcd.
I dump the content of flash with OpenOcd
I checks that the file uploaded and the file downloaded are equal (the only difference is that the dump file have 0xFF at end of file).
Then, I read and print the contains of file with the firmware, and i have some difference.

Binary file :
4000 2001 A469 0800 F651 0800 F653 0800
F655 0800 F657 0800 F659 0800 0000 0000
0000 0000 0000 0000 0000 0000 F65B 0800
F65D 0800 0000 0000 F65F 0800 FFE9 0801
FFAD 0800 FFAD 0800 FFAD 0800 F661 0800

Bytes read on flash by my firmware :
4000 2001 A469 0800 F651 0800 F653 0800
F655 0800 F657 0800 F659 0800 0000 0000
0000 0000 0000 0000 0000 0000 F65B 0800
F65D 0800 0000 0000 F65F 0800 EFE9 0801
A4AD 0800 A4AD 0800 A4AD 0800 F661 0800

Why some byte like FFE9 are read as EFE9, FFAD read as A4AD, etc ... ?

Second test :
I used the objcopy program to generate an hex file. And in the hex file i have the EFE9, A4AD. When i print the content of the equivalent file .bin, i have values FFE9, FFAD !!!

Outcomes