Skip to main content
Jcoll.1
Associate III
Sep 26, 2024 5:55 PM UTC
Solved

SHCI_C2_BLE_Init Never Returns in BLE_Ota

I have a custom board which is based heavily on the P-NUCLEO-WB55.Nucleo.  If I flash my board with a slightly modified version of BLE_Ota it will appear in ST BLE Sensor, at which point I can use it to flash my application.  This works.  After flashing the board will reboot and my application will run.

Screenshot_20240926_133052_ST BLE Sensor.jpg

 

I've added the reboot characteristic to my application, and I copied the TAG_OTA_START and TAG_OTA_END lines from BLE_p2pServer_Ota to my linker file.  I also added the appropriate advertisement settings, and the reboot code:

Jcoll1_3-1727372047380.png

 

As a result, it shows up in ST BLE Sensor still and allows me to do a FUOTA update.  However, if I try and upload the exact same file again the board will reset but the firmware update will fail (never goes beyond 0%). 

I can debug my design and set a breakpoint for when ST BLE Sensor reboots it:

Jcoll1_0-1727373323388.png

 

I am able to trace the execution all the way through the reset and back into the BLE_Ota code.  I can see that the code is running, its stuck forever waiting for SHCI_C2_BLE_Init() to finish.  At that point I have to power cycle the board and it will return to my code.

 

This topic has been closed for replies.
Jcoll.1
Jcoll.1Best answer
Associate III
Oct 6, 2024 1:10 PM UTC

Commenting these lines appears to have fixed the problem.  These lines do not appear in Cube-generated code.

 

Jcoll1_0-1728220174347.png

 

3 replies

Jcoll.1
Jcoll.1Author
Associate III
Sep 27, 2024 9:32 PM UTC
Jcoll.1
Jcoll.1Author
Associate III
Oct 5, 2024 4:59 PM UTC

I haven't been able to make any progress on this.  It seems like there is some configuration in my user application that isn't compatible with the BLE_Ota.

Jcoll.1
Jcoll.1AuthorBest answer
Associate III
Oct 6, 2024 1:10 PM UTC

Commenting these lines appears to have fixed the problem.  These lines do not appear in Cube-generated code.

 

Jcoll1_0-1728220174347.png