cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 builtin bootloader GO command problem

KlemenDS
Associate

Hi,

I am trying to set up bootloader on my STM32G030, via usart. 

When I enter it and send start command (0x7F) I do get ACK response(0x79). I cna read ID and protocol verions, but when I try do use "Go" command to start my application, it gets stuck.

What I am sending and responses I get from bootlaoder:

Send:  0x7F    (start)

Response: 0x79

Send:  0x21    0xDE    (go command)

Response: 0x79

Send:  0x0800004 0x04 (my application program is at address 0x08000000) (0x04 is length of address in bytes for checksum)

Response: nothing

 

I assume I am doing something wrong with checksum value, but I cant figure out what.

1 ACCEPTED SOLUTION

Accepted Solutions
liaifat85
Senior II

You can try the following sequence instead:

  1. Send 0x21 (Go command)
  2. Send 0xDE (Checksum for the Go command)
  3. Send 0x08 0x00 0x00 0x00 (Address bytes)
  4. Send 0x08 (Checksum for the address bytes)

View solution in original post

2 REPLIES 2
liaifat85
Senior II

You can try the following sequence instead:

  1. Send 0x21 (Go command)
  2. Send 0xDE (Checksum for the Go command)
  3. Send 0x08 0x00 0x00 0x00 (Address bytes)
  4. Send 0x08 (Checksum for the address bytes)
KlemenDS
Associate

Ok @liaifat85  , with this command procedure I get ACK after checksum. But my application is not starting after it. One of functions in my APP is that it repondes to a uart query (I send ID, it reponds with SYS). It know it works, because if I disable bootlaoder, and it goes straight in the APP, it works.

Might there be a problem with my address?

This is screen of STMcubeprogrammer:

KlemenDS_0-1725283486484.png

 

After checking with debugger, after the bootlaoder "GO command" the program flow gets to main.c(set breakpoint at HAL_Init(); ), so there is some other problem with main APP not really working. Thank for your help.