Download STM8 bootloader - STMicroelectronics

Transcript
Bootloader command set
The host sends the bytes to the STM8 as follows
Byte 1:
0x11
- Command ID
Byte 2:
0xEE
- Complement
Byte 3 (token):
0xXY; host waits for ACK or NACK
Bytes 4 to 7:
The start address (32-bit address)
Byte 4 = MSB
Byte 7 = LSB
Byte 8:
Checksum = XOR (byte 4, byte 5, byte 6, byte 7)
Byte 9 (token):
0xXY; host waits for ACK or NACK
Byte 10:
The number of bytes to be read -1 (0 <= N <= 255)
Byte 11:
Checksum (complement of byte 10)
Byte 12 (token):
0xXY; host waits for the 1st data byte
Byte 12+N (token): 0xXY; host waits for the N+1th data byte
DocID14798 Rev 9
24/72
71