2022-11-14 08:49 AM
Hello,
I'm using the ble_ota bootloader that I have adapted to the STM32WB55CGU package and it advertise fine at power up and boot the app correctly but when I’m resetting from app the bootloader is stuck at the ble stack initialization (SHCI_C2_BLE_Init function) waiting for the CPU2. I need to turn off power to recover.
Am I missing something?
2022-11-16 02:50 AM
Hello,
Are you using a software reset or resetting the board from a button?
Best Regards
2022-11-16 02:53 AM
Hello,
I'm calling NVIC_SystemReset.
Regards.
2022-11-23 02:28 AM
Hello,
Did you look BLE_HeartRate_ota to see how it's managed? In your app, you have to store the reason of the reboot in SRAM1 before rebooting on BLE_Ota.
Best Regards
2022-11-23 03:26 AM
Yes, but the problem is not here.
When the bootloader initializes the BLE to start advertising, it gets stuck waiting for the CPU2.
It calls SHCI_C2_BLE_Init then shci_cmd_resp_wait that wait for an event from the sequencer. It looks like the IPCC interrupt never occur and never trigger the event.
The IPCC interrupts are enabled, though, and the CPU2 looks not in hardfault.
Actually I have developed my own solution to update the firmware and my bootloader don’t use BLE anymore.
2022-11-30 02:32 AM
Hello,
Can you describe the modification that you have done in BLE_Ota and how you manage the jump between BLE_Ota and your app and between your app and BLE_Ota?
Did you check the SRAM2A to see if CPU2 is in hard fault (see part 4.8.2 in AN5289)? Could you check if you have received the ready event (see SHCI_SUB_EVT_CODE_READY) before sending another command?
Best Regards
2022-11-30 02:54 AM
Hello,
I think I found the source of the problem. The clock of the application is configured on the HSE and the bootloader is on LSE for the RF system wakeup. I don't understand why but the clock switch needs a power shutdown to be effective, a reset is not enough.
Regards
2023-08-05 09:14 AM
I realize I'm bringing up an old thread, but I think I may be experiencing the same issue, i.e: custom board and application, BLE_Ota launches ok, but when I try to jump to it from the app in response to a reboot request, it never starts advertising and hangs on SHCI_C2_BLE_Init waiting for some activity from CPU2. Can you elaborate on how you fixed this?
I set the hard fault indicator in app_debug to turn on PA11 on a hard fault, which controls an LED on my board and it's not turning on, so it appears that I am not in hard fault.
Any help from anyone would be greatly appreciated. Thanks.