cancel
Showing results for 
Search instead for 
Did you mean: 

wireless stack did not start and stop in SBSFU

asala.19
Associate III

Hi,

I am replacing Standalone Loader(Ymodem serial) and porting BLE_OTA in SBSFU as mention in AN5056 section 8.4 How to replace the standalone loader with a BLE OTA loader i am successfully ported and run BLE OTA but as wireless stack not started it not enable BLE.

So i am started wireless stack by command line

$ sudo ./STM32_Programmer_CLI -c port=usb1 -startwirelessstack

now it's able to detect device and i am perform firmware upgrade userapp.sfb through OTA.

it downloaded but not decrypt, verify and run. i am suspecting FUS is not ideal and that why SHCI_C2_FUS_LoadUsrKey not working. whenever i am making FUS in ideal state using following command

$ sudo ./STM32_Programmer_CLI -c port=usb1 -fusgetstate

and then after restart the board in normal mode it can decrypt data form slot 1,verify it and store it in slot 0(active slot) and application is running.

Here my question is why we manually start wireless stack and also why there no any check for fus get status and if it's not ideal why image is not decrypt and verify ? also when next firmware upgrade occur we need to manually start wireless stack again?

Note: SHCI_C2_Reinit( )  this api also not called form any where in SBSFU source code.

Thanks,

Arjun

7 REPLIES 7
asala.19
Associate III

Hi,

Is there any update?

Regards,

Arjun

Hello Arjun,

I don't have an answer right now, but I'll try to get you one soon.

Best regards

Jocelyn

Hi,

Is there any update?

Regards,

Arjun

Jocelyn RICARD
ST Employee

Hello Arjun,

I'm sorry for this long delay.

The implementation of the communication with CM0+ core is not using right buffer size.

In file se_cks.c

Replace

#define CFG_TL_MOST_EVENT_PAYLOAD_SIZE 16  /**< Set to 16 with the memory manager and the mailbox */

by

#define CFG_TL_MOST_EVENT_PAYLOAD_SIZE 255U

This issue will be fixed in next SBSFU release that should be available end of July.

Best regards

Jocelyn

Hi @Jocelyn RICARD​ 

Thanks for update.

It resolve the issue now app firmware decrypt and Verify successfully.

but still sbfsu jump to the new app firmware (in my case p2pserver demo) it can not communication with CM0+ and when i reset the board again then it start communicating with CM0+ and also BLE advertise correctly.

Need to debug when sbsfu jump to BLE app why it's not directly start communicating with CM0+, why reset cycle required ?

Regards,

Arjun

Hello Arjun,

After accessing CKS to be able to perform the update the M0+ is left in a state where the initialization you are doing in the application does not work.

I don't have the solution right now, not a WB expert 🙂 I'll try to get it and come back to you

Best regards

Jocelyn

Pablo1610
Associate II

Hello,


Has anyone found a solution for this? Because I'm experiencing something similar. When I power the board, it looks like the CPU2 is not restarted, I'm not able to receive any response from CPU2 BLE Stack. After a software reset by the IWDG the BLE and CPU2 start to work again.

 

I also have the BLE OTA and a custom application. I'm able to perform well the custom application update by OTA. The problems occurs when the board is turned off and restarted, that CPU2 is not responding to BLE stack commands.

 

Best,

Pablo