cancel
Showing results for 
Search instead for 
Did you mean: 

How to update STM32F401 firmware over LTE/GSM ?

RNair.3
Associate

Greetings.

For our data collection devices, we use STM32F401 as the microprocessor and Telit modems to communicate with the server. We are planning to have a feature to update the firmware on the STM32F401 over the air, if possible. Currently we use STM Cube IDE or ST Link Utility to update the firmware. Is there any support for this? Does STM32F401 has enough memory to support this or do we need another processor with a file system to achieve this?

10 REPLIES 10
KnarfB
Principal III

It shall be possible. You basically partition the flash in 3 areas: boot loader, firmware1, firmware2. One firmware partition is the current/running firmware, the other will be overwritten with the next firmware update. The boot loader decides which one should run. There is some material around like a video series https://youtu.be/OkUQ3iMmiYQ and more, check the web for STM32 OTA (over the air) boot loader.

F4 series is not the latest and greatest concerning IoT features (crypto, security, trust zone,...) and the F401 flash might be a little small, but it is worth looking into it.

hth

KnarfB

Viniciuspsc
Associate II

Hello,

I'm trying to do the same thing, receiving a firmware update for an STM32WB, via a Telit LTE module. Have you had success with this implementation?

Thank you

https://community.st.com/t5/stm32-mcus-wireless/how-to-update-stm32wb-firmware-over-lte-module/td-p/672350

I've updated my STM32 firmwares using Telit cellular modems..

Used HTTP to find if there is an update for current firmware, used that to pull a secondary .HEX with the new update.

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

Did you do this using UART?
And did you need to create your own bootloader? Could you give more details on how you did it?

Thank you.


@Viniciuspsc wrote:

Did you do this using UART?


Yes, I have done this with a cellular modem via UART - based on Application Note AN4657STM32 in-application programming (IAP) using the USART:

https://www.st.com/resource/en/application_note/an4657-stm32-inapplication-programming-iap-using-the-usart-stmicroelectronics.pdf

 

Viniciuspsc
Associate II

Do you need to control Boot0 Pin to do that?


@Viniciuspsc wrote:

Do you need to control Boot0 Pin to do that?


The AN4657 approach? 

No.

Yes, the UART is the only mode of connectivity I have with the modem.

I didn't need to use BOOT0, because the modem has no way of interacting directly with the STM32, and would need an app on the modem to facilitate that kind of interaction.

As the developer you'd be expected to write code to facilitate the update. Yes, you'd probably want to code a bootloader to do the physical update at the FLASH level once you'e insured you have a viable update. The App side could be more complicated as it would need to connect to the cellular network, and your servers, and pull / stage the firmware update so the loaders job was simpler.

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

Have you used the FreeRTOS AWS OTA library?