2023-11-24 05:07 AM
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 ?
Solved! Go to Solution.
2023-12-22 04:46 AM
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.
2024-01-03 02:28 AM
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.
2024-01-03 03:10 AM
> How safe is it to rely on the WriteMemory return value ?
Not safe. Read back & compare.
2024-01-03 03:50 AM
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.
2024-01-10 11:10 PM
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 !