cancel
Showing results for 
Search instead for 
Did you mean: 

System Memory UART Protocol could not Read continuously

TesterSAM
Associate II

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:

TesterSAM_1-1753929144722.png

Successful Enter Boot Mode:

TesterSAM_2-1753929187688.png

Read Memory CMD with Address = 0x0801FFF0 and read data size is 0x10

TesterSAM_3-1753929261129.png

Try to execute the Read Memory CMD again but without ACK/NACK

TesterSAM_6-1753929367061.png

TesterSAM_8-1753929577229.png

 

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

TesterSAM_7-1753929537133.png

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Super User

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?

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

4 REPLIES 4
TDK
Super User

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?

If you feel a post has answered your question, please click "Accept as Solution".
TesterSAM
Associate II

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.

So it's now all working?

If so, please mark the solution.

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

Makes sense. So you're actually reading 1 byte past the end of flash, which likely triggers a hard fault.

If you feel a post has answered your question, please click "Accept as Solution".