cancel
Showing results for 
Search instead for 
Did you mean: 

Verify in bootloader USART protocol fails

TomKing
Associate II

Hello Community,
Using the USART commands in boot mode on a STM32H723 CPU, I faced following issues:
Extended erase (0x44) and writing memory(0x31) to the flash works fine, if I write ALL bytes in blocks of 256 bytes.
But if I do a read memory(0x11) after writing one block for verify purposes, I get FFs on the first bytes instead the correctly written data. This happens exactly after the second read block always, even if I write 4 blocks and do the readback then.
The STM32 CubeProgrammer also only supports verification AFTER writing all data to the flash, not block by block.
Is this a generic limitation in the boot loader ?

 

 

14 REPLIES 14

Hi @TomKing 

You can simply write the same 32 bytes instead of dummy bytes. These workarounds will be documented in the AN2606. 

You are welcome and happy Holidays.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.


I'm out of offce with limited access to my emails.
Happy New Year!

Hello @FBL 

I wonder if the manual verify (re-reading the data) after command WriteMemory 0x31 is necessary at all ?

If the boot loader already checks the written data and sends a NACK in case of deviations, I can omit this step.

How safe is it to rely on the WriteMemory return value ?

Thank you in advance.

Pavel A.
Evangelist III

How safe is it to rely on the WriteMemory return value ?

Not safe. Read back & compare.

 

FBL
ST Employee

Hello @TomKing 

According to USART protocol in AN3155, figure 13, the ACK byte sent by the bootloader after a successful write operation indicates that the data has been written correctly not being read

So, you need to read it back.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.


I'm out of offce with limited access to my emails.
Happy New Year!

Hello All,
I've implemented the verify with the described workaround in our company tool. Works as expected now. Thanks to everyone who helped to solve this !