Figure 14. Go Command: Host Side - ST AN3154 Application Note

Can protocol used in the stm32 bootloader
Table of Contents

Advertisement

Bootloader command set
After sending an ACK message to the application, the bootloader firmware performs the
following:
it initializes the registers of the peripherals used by the bootloader to their default reset
values
it initializes the user application's main stack pointer
it jumps to the memory location programmed in the received 'address + 4' (which
corresponds to the address of the application's reset handler).
For example if the received address is 0x0800 0000, the bootloader will jump to the
memory location programmed at address 0x0800 0004.
In general, the host should send the base address where the application to jump to is
programmed
Note:
1
The Jump to the application works only if the user application sets the vector table correctly
to point to the application address.
2
The valid addresses for the Go command are in RAM or Flash memory (refer to
Device-dependent bootloader parameters
addresses for the device you are using). All other addresses are considered not valid and
are NACKed by the device.
3
When an application is loaded into RAM and then a jump is made to it, the program must be
configured to run with an offset to avoid overlapping with the first RAM memory used by the
bootloader firmware (refer to
more details about the RAM offset for the device you are using).

Figure 14. Go command: host side

1. See product datasheet for valid addresses.
The host sends the bytes as follows
Go command message: Std ID = 0x21, DLC = 0x04, data[0] = 0xXX: MSB address,...data[3]
= 0xYY LSB address.
20/34
for more details about the valid memory
Section 3.1: Device-dependent bootloader parameters
Doc ID 17063 Rev 1
AN3154
Section 3.1:
for

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents