cancel
Showing results for 
Search instead for 
Did you mean: 

STM8 bootloader over UART - facing some issues

harshvardhan
Associate
Posted on April 27, 2015 at 07:55

Hello,

I'm following the instructions given in the STM8 bootloader manual for using the built-in ROM bootloader.

I have bootloader version 1.3 on board. When attempting to write the RAMroutines, I'm noticing the following:

I receive acknowledge bytes up until the final checksum byte (for the data bytechecksum), where I receive a NACK.

However, when I read from the memory where I have written into, I see that thedata bytes have been correctly written.

To illustrate, here's the command sequence I'm sending:

0x31 (write command), 0xCE (complement of write command)

<--- RECEIVE ACK

0x00 (token reply byte, bootloader in reply mode)

0x00 (address byte MSB), 0x00 (address byte 2), 0x00 (address byte 3),0xA0 (address byte LSB), 0xA0 (address byte checksum)

<--- RECEIVE ACK

0x00 (token reply byte, bootloader in reply mode)

0x0F (N: number of bytes to write - 1),

data bytes: 0x5f 0x3F 0x90 0x3F 0x96 0x72 0x09 0x00 0x8E 0x16 0xCD 0x60 0x650xB6 0x90 0xE7

data byte checksum (XOR of last two data bytes): 0x77

<-- RECEIVE NACK

Then when I go to read the bytes written starting from address A0, I see thatthe data bytes above have been written correctly.

Why am I getting a NACK response to the final checksum (which is the XOR of theNth and N+1th data bytes)?

#writecommand #stm8 #bootloader
0 REPLIES 0