Bootloader command set
3.6
Go command
The Go command is used to execute the downloaded code or any other code by branching
to an address specified by the application. When the bootloader receives the Go command,
it transmits the ACK byte to the application. After the transmission of the ACK byte, the
bootloader waits for an address (4 bytes, byte 1 is the address MSB and byte 4 is LSB) and
a checksum byte, then it checks the received address. If the address is valid and the
checksum is correct, the bootloader transmits an ACK byte, otherwise it transmits a NACK
byte and aborts the command.
When the address is valid and the checksum is correct, 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
Figure 10. Go command: host side
16/37
Start Go
Send 0x21 + 0xDE
Wait for ACK
or NACK
ACK
Send the Start Address (4
bytes) & checksum
Wait for ACK
or NACK
ACK
Wait for ACK
or NACK
ACK
End of EER
Doc ID 17066 Rev 2
NACK
NACK
NACK
AN3155