Skip to main content
Associate
Mar 13, 2024 4:53 PM UTC
Question

Difference between Intel hex and Stm32 Flash.

Hi everybody.

I ran into a problem with my project.

As you can see in the picture, after uploading the program to uP, the content of Flash is different from the uploaded Intel hex file.

Can someone explain to me why?

Where did the data F8 B5 00 BF F8 BC 08 8C 9E 46 70 47 go?

And instead of them in Flash is FF FF FF FF.

The program was uploaded via STM32CubeProgrammer.

 

obr.jpg

This topic has been closed for replies.

5 replies

Tesla DeLorean
Guru
Mar 13, 2024 5:20 PM UTC

You're looking at the wrong bytes, the orange ones are at 0x93BC

obr_marked_up.jpg

 

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
PalikemAuthor
Associate
Mar 13, 2024 5:29 PM UTC

Thank you for warning.

So what does FF FF FF FF mean there?

Am I to understand that it was not overwritten with data from the Intel hex file?

STOne-32
ST Technical Moderator
Mar 13, 2024 6:30 PM UTC

Dear @Palikem ,

our Flash Technology so far is designed with the following simple principle :

Virgin flash page or sector  is 0xFF , writing or programming meaning writing 0x00 or let’s say  we write 0 in an already blank / erased cell ( 0x1) . So Writing 0xFF has no effect and only writing 0x00 matters . 

it is the opposite for EEPROM Technologies .

 

So here to avoid issues such as CRC wrong calculation etc.. the CubeProgrammer reads back the data from flash in the missing alignment chunk and then write them again in a row with others bytes from your Hex file .

 

Hope it is more clear now .

Ciao

STOne-32

PalikemAuthor
Associate
Mar 14, 2024 8:07 AM UTC

Thanks to everyone involved for the explanation.