STM8AF Bootloader CAN write memory.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-08-24 5:27 AM
I'm trying to write a program to the microcontroller through the bootloader via the СAN interface.
- First I pass message ID 0x7f to activate bootloader. (ID=0x02, data=0x79)
- Then I transfer the file "E_W_ROUTINEs_128K_ver_2.0.s19" in binary form to address 0x000000A0 to enable write and erase commands. I transfer in blocks of 128 bytes. After transferring each block, I transmit the checksum and receive a positive response from the bootloader (ID=0x02, data=0x79)
- Then I send a command (ID 0x43) to erase all FLASH memory and EEPROM and specify 0xFF in the first byte. (I get 2 positive answers 0x79)
- Then I try to transfer the file of the new program to address 0x00008000 in the same way as the file "E_W_ROUTINEs_128K_ver_2.0", but after sending the first block of 128 bytes with a checksum, the bootloader does not respond.
I cannot understand why the bootloader does not respond to an attempt to write to address 0x00008000. When a command with the ID 0x31 is sent with the address and the number of bytes, a positive response is received from the bootloader (ID=0x02, data=0x79). But after sending the first block of data (128 bytes) the bootloader does not respond..
Solved! Go to Solution.
- Labels:
-
Bootloader
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-08-24 11:26 PM
Solved a problem.
There was an error in the algorithm for writing to the microcontroller's memory.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-08-24 11:26 PM
Solved a problem.
There was an error in the algorithm for writing to the microcontroller's memory.
