cancel
Showing results for 
Search instead for 
Did you mean: 

STM8 bootloader UART write memory

thaonguyen
Associate II

Hello,
I am developing a firmware for a host device to flash STM8S via UART.
My issue is when I send a write command, STM8 didn't response anything.
- Host sends write command: 0x31 0xCE, STM8 responsed ACK 0x79 . Host replies 0xFF
- Host sends 5 bytes address and checksum: 0x00 0x00 0x88 0x00 0x88, STM8 responsed ACK 0x79. Host replies 0xFF

- Host sends 6 bytes (1 byte: number of data, 4 bytes data and 1 byte checksum): 0x03 0x00 0x00 0x00 0x00 0x03

 STM8 didn't reply anything.
I attached serial capture image.
Please help me. it took me a long time to check it

thaonguyen_0-1717408740348.png

 

22 REPLIES 22

As I said before, .S19 file is not a binary file, and this is the problem. .S19 is an ASCII file. Code is in hexadecimal and each line begins with an 'S' and an address. You can't read the file as is and send it to MCU. Search in Internet for .s19 file format.

 

Yes. I parsed .s19 file and writing to RAM. now ERASE/WRITE is working.
Uncomfortable, in UM650 document doesn't mean that has to convert data in .s19  file to Address and data in hex format before writing to RAM.

Anyway, now it's working.
Thank you so much!

AA1
Senior III

If the problem is solved, you should mark this topic as answered.