AN2662 CAN bootloader
Doc ID 14156 Rev 1 41/83
Note: The CAN Bootloader firmware supports only one node at the same time. This means that
CAN Network Management is not supported by the firmware.
3.3 Bootloader command set
The supported commands are listed in Tabl e 3 below. Each command is further described in
this section.
Communication safety
Each packet is either accepted (ACK answer) or discarded (NACK answer):
● ACK message = 0x79
● NACK message = 0x1F
Table 4. Bootloader commands
Command
Command
code
Command description
Get
(1)
1. Read protection – When the RDP (read protection) option is active, only this limited subset of commands is
available. All other commands are NACKed and have no effect on the device. Once the RDP has been
removed, the other commands become active.
0x00
Gets the version and the allowed commands
supported by the current version of the bootloader
Get Version & Read Protection
Status
(2)
0x01
Gets the bootloader version and the Read
Protection status of the Flash memory
Get ID
(2)
0x02 Gets the chip ID
Speed 0x03
The speed command allows the baud rate for CAN
run-time to be changed.
Read Memory 0x11
Reads up to 256 bytes of memory starting from an
address specified by the user
Go 0x21
Jumps to an address specified by the user to
execute (a loaded) code
Write Memory 0x31
Writes up to 256 bytes to the RAM or Flash memory
starting from an address specified by the user
Erase
(3)
0x43 Erases from one to all the Flash memory sectors
Write Protect
(2)
2. On the STM32F105xx and STM32F107xx , the sector size is 4 Kbytes (2 pages) for the Write Protect,
Write Unprotect and Erase commands.
0x63 Enables the write protection for some sectors
Write Unprotect
(3)
0x73
Disables the write protection for all Flash memory
sectors
Readout Protect
(2)
0x82 Enables the read protection
Readout Unprotect
(2)
0x92 Disables the read protection