2024-10-15 01:13 AM
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:
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:
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.
Many thanks,
Fabio
2024-10-15 01:26 AM
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.
2024-10-15 02:36 AM
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:
Is this a correct process or is there a simpler way I still I don't get?
Thanks again,
Fabio
2024-10-15 02:40 AM
@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 ...
2024-10-15 03:02 AM
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:
- download the host firmware from the server with the modem
- store it in a SPI Flash memory
- check its health
- erase the MCU memory
- Install the new firmware
- I would check the installation and rollback if wrong but I have no idea how to do that...
- reboot
Is this a correct process or is there a simpler way I still I don't get?
Thanks and best regards,
Fabio