2022-09-14 07:47 AM
Hi,
I'm currently working to start the FUOTA on a STM32WB, so I've spent several time following the Application Note AN5247 and watching the MOOC - STM32WB Firmware Update Over the Air (FUOTA) videos that explain how to run the OTA on a P-NUCLEO-WB55 board. Following the steps, I've managed to get everything working without problem.
I want to launch the OTA on a STM32WB5MMG Discovery board, so the main issue I have is that doesn't seems to be too many information on how to do this outside of the examples.
The Application Note is a really guided example for the NUCLEO board, same goes for the videos. Even after having followed it, I'm still not sure what I should do in my project if I want to be able to do the same thing in a different MCU with a custom application. The examples that I find in CubeIDE are not configurable, and doesn't include an .ioc file that allows me to see what changes have been made here so the OTA works on the MCU. Finally, I haven't been able to find information about generating a .bin file of my custom application to send it to the MCU through BLE.
Is there any more information on how to make it work in this microcontroller? Or an editable example project in order to check how to do it in my project. I'll be grateful if I can find this information. Any comment or suggestion is welcome.
Thank you very much, Jorge.
2022-10-05 07:07 AM
Hello,
To support FUOTA in your custom application, follow these steps:
#if defined(VECT_TAB_SRAM) && defined(VECT_TAB_BASE_ADDRESS)
/* program in SRAMx */
SCB->VTOR = VECT_TAB_BASE_ADDRESS | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAMx for CPU1 */
#else /* program in FLASH */
SCB->VTOR = VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */
#endif
By this:
/**
* When the application is expected to be downloaded by OTA, the SCB->VTOR shall not be modified
* as it has already been set to the correct value by the BLE_Ota application before jumping
* to the current application
*/
Best Regards