2024-07-10 08:30 PM
Hello, I am designing a device that will have an STM32L4 or maybe an STM32U and will communicate with an ESP32 for internet connectivity. However, at some point, I would like to update the firmware remotely, and have the ESP32 stop executing its conventional software and act as a programmer for the STM32. Is this possible? And if so, where can I find detailed information on how to do it? I hope you can help me, thank you.
Solved! Go to Solution.
2024-07-11 02:00 AM - edited 2024-07-11 02:18 AM
@WPazH wrote:Is this possible?
Yes.
You have 2 choices:
With an ESP32, you could either have the ESP "push" the update to the STM, or have the STM "pull" the update from the ESP, or the ESP could be purely passive and transparent ...
Similar question yesterday:
#Bootloader #FirmwareUpdate #InApplicationProgramming #OTA #IAP
2024-07-11 01:50 AM
Perhaps another solution could be - using the STM32L4 to download the new firmware into an external EEPROM compatible with AN2606, then cause the SMT32L4 to Reset with the appropriate Boot mode...
Kind regards
Pedro
2024-07-11 02:00 AM - edited 2024-07-11 02:18 AM
@WPazH wrote:Is this possible?
Yes.
You have 2 choices:
With an ESP32, you could either have the ESP "push" the update to the STM, or have the STM "pull" the update from the ESP, or the ESP could be purely passive and transparent ...
Similar question yesterday:
#Bootloader #FirmwareUpdate #InApplicationProgramming #OTA #IAP
2024-07-11 02:12 AM - edited 2024-07-16 03:12 AM
System Bootloader:
Picking an L4 Product Page at random, and going to the 'Documentation' Tab:
https://www.st.com/en/microcontrollers-microprocessors/stm32l412c8.html#documentation
AN2606 STM32 microcontroller system memory boot mode
AN3154 CAN protocol used in the STM32 bootloader
AN4221 I2C protocol used in the STM32 bootloader
AN4286 SPI protocol used in the STM32 bootloader
AN3155 USART protocol used in the STM32 bootloader
AN3156 USB DFU protocol used in the STM32 bootloader
In Application Programming:
AN4657 STM32 in-application programming (IAP) using the USART
Also have a browse through the Knowledgebase - several articles there on bootloaders:
https://community.st.com/t5/stm32-mcus/tkb-p/stm32-mcus-knowledge-base
just one example:
2024-07-16 09:01 AM
Hi @PGump.1 and @Andrew Neil , your answers were very helpful. I will try to implement the two methods you mentioned, as the ESP32 needs to send the update to two STM32s, and I'm not very sure which method would be more effective. Thank you for the help.