Skip to main content
Visitor II
November 15, 2021
Question

STM32F410RB Uart bootloader Write Memory CMD not working ?

  • November 15, 2021
  • 1 reply
  • 1458 views

Hi,

I'm trying to utilise the built-in UART bootloader in the STM32F410RB to perform firmware update. I've read the AN3155 and AN2606 documentation but unfortunately, I'm out of luck so far when trying to write the firmware via the bootloader to the target MCU's internal flash.

What I've got working so far:

  • I can communicate successfully over the UART interface to the bootloader
  • The GET command response indicates the bootloader protocol version is 3.1 and the following commands are supported:
    • 0x01 (Get Version & Read Protection Status)
    • 0x02 (Get ID)
    • 0x73 (Write Unprotect)
    • 0x92 (Readout Unprotect)
    • 0x11 (Read Memory)

The following is not working for me:

  1. I send the "write memory" command and checksum, e.g. 0x31, 0xCE
  2. I receive the ACK, e.g. 0x79
  3. I send the 4 byte start address and checksum, e.g. 0x08, 0x00, 0x00, 0x00, 0x08
  4. I receive the ACK e.g 0x79
  5. I send no of four byte e.g 0x03
  6. I send data e.g 0x01 0x02 0x03 0x04
  7. I send check sum byte e.g :- 0x0D
  8. I receive the NACK e.g :- 0x1F
  9.  
  10. I expected to receive an ACK response from the bootloader.

And I not write four byte to flash

so please help me to how to give sequence of command to bootloader so I can successfully write flash. 

    This topic has been closed for replies.

    1 reply

    Super User
    November 15, 2021

    > I send no of four byte e.g 0x03

    > I send data e.g 0x01 0x02 0x03 0x04

    > I send check sum byte e.g :- 0x0D

    0x0D isn't the correct checksum here.

    The correct checksum is 0x07 (0x03 ^ 0x01 ^ 0x02 ^ 0x03 ^ 0x04)

    0693W00000GXc54QAD.png

    Lkhod.1Author
    Visitor II
    November 16, 2021

    ok i try that way this is work.

    thanks lot