Skip to main content
Visitor II
March 13, 2024
Question

Difference between Intel hex and Stm32 Flash.

  • March 13, 2024
  • 3 replies
  • 2243 views

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.

    3 replies

    Graduate II
    March 13, 2024

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

    obr_marked_up.jpg

     

    PalikemAuthor
    Visitor II
    March 13, 2024

    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?

    Technical Moderator
    March 13, 2024

    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
    Visitor II
    March 14, 2024

    Thanks to everyone involved for the explanation.