Skip to main content
CLee.20
Associate
February 23, 2022
Question

Hello everyone. I have three questions. flash memory write function.

  • February 23, 2022
  • 1 reply
  • 1310 views

1. Receive binary file from MCu1 to UART and save it to SD card (or EEPROM).

2. Write the binary file stored in the SD card (or EEPROM) to the specific flash memory area of ​​MCU2.

3. Write the binary file stored in SD card (or EEPROM) to the specific flash memory area of ​​MCU3 using UART.

I hope you can understand my question well by referring to the picture.

If you have code or special documents for the above three functions, please let me know.

Have a nice day.

0693W00000KaBM0QAN.png

This topic has been closed for replies.

1 reply

Tesla DeLorean
Guru
February 23, 2022

Assume few here are interested in doing your work assignments.

Application Note AN3155 covers the UART protocol in the ROM

https://www.st.com/resource/en/application_note/cd00264342-usart-protocol-used-in-the-stm32-bootloader-stmicroelectronics.pdf

Example driving BOOT/RESET pins and pushing firmware to a secondary device

https://github.com/arduino-libraries/MKRWAN/tree/master/examples/MKRWANFWUpdate_standalone

You could also implement your own protocol using X or Y-MODEM,ST has some IAP examples using the latter. I'd probably use X-MODEM and FATFS to transfer and stage a firmware image to an SD Card. In methods where I can plug the SD Card into a PC, or write via a USB-MSC, I've used the .DFU file format as a standard delivery method.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..