2022-02-25 08:45 AM
Hello,
Thank you for your detailed answers. I have resolved the design concerns related to this.
I need your input for another issue. I am working on upgrading the wireless stack & FUS programmatically. I am NOT doing the OTA firmware upgrade but storing my new stack & FUS images in internal flash memory. The MCU that I am using is STM32WB5xxG(1M). Following are the steps I am following based on the instructions in AN5185 Rev 6.
The pre-condition is that the WS is running (which I think means FUS is running too), BLE is initialized, my custom application is running:
With this, I am not able to flash the new image and the error code from FUS commands is SHCI_UNKNOWN_CMD.
Is this a correct method? Is there an example other than OTA that I can follow?
Thank you,
Arshiya Tabassum
2022-03-09 07:12 AM
Hello,
First when Wireless Stack is running, the FUS is not running. To initiate the upgrade of wireless stack or FUS, you need to start the FUS:
SHCI_C2_FUS_GetState( NULL );
SHCI_C2_FUS_GetState( NULL );
Then FUS is running, the CPU2 firmware update procedure is starting from now. It is advised to perform a FUS_FW_DELETE operation before starting a wireless stack installation:
To upgrade the wireless stack or FUS, use FwUpgrade command with 0,0 in parameters:
Send FUS_GET_STATE until a state equal to FUS_STATE_NOT_RUNNING is reached (this means that the wireless stack has been installed and is now running).
During CPU2 firmware upgrade, there may be several device reset and the key word at the beginning of SRAM1 shall be changed CFG_REBOOT_ON_CPU2_UPGRADE.
For Wireless Firmware upgrade, once the upgrade is over, the CPU2 will run the wireless stack. When the wireless stack is running, the SRAM1 is checked and when equal to CFG_REBOOT_ON_CPU2_UPGRADE, it means we may restart on the firmware application.
For FUS Firmware Upgrade, once the upgrade is over, the CPU2 will run FUS and the FUS return the Idle state. The SRAM1 is checked and when equal to CFG_REBOOT_ON_CPU2_UPGRADE, it means we may restart on the firmware application.
We can look BLE_Ota example, to see the method used to install new wireless stack or FUS.
Best Regards
2023-08-03 12:03 AM
Hi, I look the BLE_Ota sample code, and run it with the BLE sensor app.
I have some question to ask.
1. I found that when OTA application send SHCI_C2_FUS_GetState( NULL ) to CPU2 twice to reboot it on FUS. CPU1 will also reboot. Is it a normal phenomenon?
2. When l send SHCI_C2_FUS_FwUpgrade(0,0) and make FUS state is in FUS_STATE_VALUE_FW_UPGRD_ONGOING, sending SHCI_C2_FUS_GetState( NULL ) will also reboot CPU1. Is it a normal phenomenon?
3.Combining the first and second questions,can CPU2 make CPU1 reboot?