2025-07-30 7:41 PM - last edited on 2025-07-31 12:59 AM by Andrew Neil
Hi,
I am testing the System Memory UART protocol in STM32G070CB.
I tried the Get command, the Go command, and the Read Memory command standalone, all success.
However, when I try to execute the Read Memory command, which is successful, and then execute the Read Memory command, the ST does not send any response.
Full pattern:
Successful Enter Boot Mode:
Read Memory CMD with Address = 0x0801FFF0 and read data size is 0x10
Try to execute the Read Memory CMD again but without ACK/NACK
As I know, the protocol is able to execute other CMD when the pervious CMD completed or Failed.
How could I execute CMD continuously?
Note: UART Protocol version of the MCU is V3.1
Solved! Go to Solution.
2025-07-30 8:39 PM - edited 2025-07-31 7:15 AM
It may not like that you're reading at the very end of the flash. If so, it would be a bug.
Does it happen if you read from 0x08000000?
2025-07-30 8:39 PM - edited 2025-07-31 7:15 AM
It may not like that you're reading at the very end of the flash. If so, it would be a bug.
Does it happen if you read from 0x08000000?
2025-07-31 12:44 AM
Thank you @TDK
Yes, the fail case is reading the last 16 Bytes of Data of the Image (128K Bytes Flash, start address: 0x08000000, read Address: 0x0801FFF0)
I reviewed the issue caused by the WRONG data size. I tried to read 16 Bytes of the last of the image, but I input 0x10 instead of 0x0F (N-1).
Now, it could execute other commands when the Read Memory command is completed.
2025-07-31 1:00 AM
So it's now all working?
If so, please mark the solution.
2025-07-31 7:15 AM
Makes sense. So you're actually reading 1 byte past the end of flash, which likely triggers a hard fault.