Solved
Issue in BLE stack advertisement after jumping with bootloader. Context: We have two binaries: a custom bootloader/ota app and user app with BLE capabilities. After jump from bootloader to app binary, BLE advertisement does not work.
..
..
This issue has been resolved by me as follows:
Before jumping:
Pause any tasks registered with sequencer especially CFG_TASK_SYSTEM_HCI_ASYNCH_EVT_ID
Then call SHCI_C2_Reinit()
This will de-init BLE and it can be re-init with different services in other binary smoothly.
// De-init BLE stack run by CPU 2, this is needed as we are not doing system reset but jumping to another binary and we were sing BLE stack in this binary as well
UTIL_SEQ_PauseTask(1<< CFG_TASK_SYSTEM_HCI_ASYNCH_EVT_ID); // tell sequencer to pause all registered tasks, in our case advertisement only
SHCI_CmdStatus_t shci_response = SHCI_C2_Reinit(); // fake reset CPU2 as per AN5289 Application Note "Building wireless applications with STM32WB Series microcontrollers"
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.