Showing results for 
Search instead for 
Did you mean: 

UART Bootloader write command ignores data

Associate II


I am using the Uart Bootloader from the ROM.

I want to write my Programm to the Sysram at 0x2FFC3000.

I don't know why, but the Software ignores my commands.

It accepts the write Command, it accepts the adress. But when i write the Address it twice sends the Ack byte.

So when i want to send the number of bytes, the data and the checksum it threats them as Commands.

Do i have to do something special to use the serial debug mode?

Associate II

Ok, after some CubeProgrammer log dissection, guessing and poking around i found out, that the write command is rather different from reading.

First you need to send the undocumented Command GetPhase (0x03 0xFC).

This command will send some bytes and the address where the rom will store the data.

Through the GetPhase command the software has to know where the ROM will store the data. In this case it is 0x2FFC2400.

Then you send the write command. As an address you give 0!

The write command does not use adresses. it uses Block numbers!

And the 1st block is not your image. It is a header.

(the 1st block is block number 0)


So you send 256 bytes header.

In the image header you have to specify where the image is loaded at (i used 0x2FFC2500) and the entrypoint ( also used 0x2FFC2500)

As type i used 0x10 (TF-A)

from that point on you can load your software at 0x2FFC2500.

Then after you're done with loading the Software you send the Go Command (0x21 0xDE)

As address you give -1 (0xFF 0xFF 0xFF 0xFF)

and then your software should be executed.

@A ST Supporter​ 

Why is this no where documented?

ST Employee


There is an upcoming AN5275 (STM32MP1 USB DFU/USART protocols used in bootloaders) which hopefully clarify all that points.

Be patient, currently planned in Q4.

In order 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.