cancel
Showing results for 
Search instead for 
Did you mean: 

IAP vs Bootloader for STM32U5 for OTA FW upgrade

kalak
Associate II

Hi,

I'm studying a way to do OTA FW upgrade for a STM32U5A5 MCU using a LTE modem and SPI Flash external memory. My environment is: STM32CubeIDE v1.16.1 with STM32CubeMX v6.12 and FW_U5 v1.6.0. I'm also using  FreeRTOS.

I was checking the native Booloader by ST (Application Note 2606), but I understood I need an host programmer to use it, but my final application will not have it. I checked also the possible patterns for boot selection  (Pattern 12 for U5) trying to imagine the BL reading autonomously from the SPI memory of a previously downloaded Firmware:

  1. Is it right that it is mandatory a host to use thi BL or my idea could be accomplished in some way?

Then, I checked the possible IAP implementation and I reached the AN4657, but it seems quite old and without CubeIDE examples or latest STM32 MCU families implemented:

kalak_0-1728978216764.png

  1. Is there any update for STM32U5 IAP examples?

As last result, I got the IAP_main and IAP_binary_template example for STM32U575 (mine is STM32U5A5) , but the second, as a template, is quite empty, the first is quite good example, using UART and SDD memory and ThreadX and FileX middleware.

  1. Is this the best example to follow for OTA FW upgrade with LTE modem and Flash SPI memory? Do I need any warning?

Many thanks,

Fabio

4 REPLIES 4

Personally I think the IAP process/model would be the way to go.

Perhaps with the cellular modem downloading via FTP or HTTP using it's own implementation and staging on its own file system NAND, and the recovering that with the STM32 and rewriting FLASH.

Harder path is using modems Socket interface to pull data from a server manually and write FLASH directly, without staging.

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

Hi Tesla DeLorean,


@Tesla DeLorean wrote:

Personally I think the IAP process/model would be the way to go.


thanks for the feedback, I will follow IAP path.

By the way, I'm not sure to understand this:


@Tesla DeLorean wrote:

Perhaps with the cellular modem downloading via FTP or HTTP using it's own implementation and staging on its own file system NAND, and the recovering that with the STM32 and rewriting FLASH.

Harder path is using modems Socket interface to pull data from a server manually and write FLASH directly, without staging.


The modem I selected (i.e. LEXI-R10 by U-blox) will have is own HTTP/FTP implementation for its FOTA FW upgrade (AppNote by U-Blox ), but nothing for the STM32 U5 host, neither staging (if I'm not wrong...): thus I'm thinking to:

  1. download the host firmware from the server with the modem
  2. store it in a SPI Flash memory
  3. check its health
  4. erase the MCU memory
  5. Install the new firmware
  6. I would check the installation and rollback if wrong but I have no idea how to do that...
  7. reboot

Is this a correct process or is there a simpler way I still I don't get?

Thanks again,

Fabio

 

 

Andrew Neil
Evangelist III

@kalak wrote:

I was checking the native Booloader by ST (Application Note 2606), but I understood I need an host programmer to use it


That's not entirely true: you just need something - anything - that can implement the ST protocol.

However, as @Tesla DeLorean suggests, IAP is usually the way to go ...

Hi Andrew,

thanks, in fact I would avoid anything else for the programming...

Can someone of you give me a feedback on this:



The modem I selected (i.e. LEXI-R10 by U-blox) will have is own HTTP/FTP implementation for its FOTA FW upgrade (AppNote by U-Blox ), but nothing for the STM32 U5 host, neither staging (if I'm not wrong...): thus I'm thinking to:

  1. download the host firmware from the server with the modem
  2. store it in a SPI Flash memory
  3. check its health
  4. erase the MCU memory
  5. Install the new firmware
  6. I would check the installation and rollback if wrong but I have no idea how to do that...
  7. reboot

Is this a correct process or is there a simpler way I still I don't get?


Thanks and best regards,

Fabio