2025-07-18 5:53 AM
Hi,
i am currently trying to implement OTA Update capabilities in my own custom board based on a WB55CGU6.
So i flashed the BLE_Ota app to its desired sectors. The bootloader is starting and spawning the BLE Update Service correctly.
Now i take my custom app binary and flash it. After flash -> The new firmware starts properly and is running smoothly.
Now i implemented sth like this:
If a user button on my board is pressed (boot to OTA) it should boot to the OTA Loader.
I have done this with the following code snippet:
*(uint32_t*)SRAM1_BASE = CFG_REBOOT_ON_BLE_OTA_APP;
NVIC_SystemReset();
Now the device was doing a reboot, but it does not spawn my BLE OTA Update Service anymore...
I checked the SRAM1 address 0x2000000 and there is a 01.
After hard debugging this stuff somehow with blinking an LED on the board (from the OTA Firmware) i figured out that it seems to get stuck at the point where it waits for the SHCI / HCI command (wireless fw ready). This event never seem to happen :( so it is not initializing the BLE App and stays in this state forever.
The only way of resetting the device is to disconnect it from power. Then it ends up in my custom FW again.
This all does NOT happen IF i instead of my own FW for instance flash the BLE Heart Rate OTA example.
If i tell the device in this example firmware to boot into OTA Mode, it works.
The example is doing the exact same thing though. It writes to SRAM1 Base and then a NVIC_SystemReset().
So my guess is: My custom Firmware is doing sth. which the OTA Loader is not OK with, but actually i have no clue what it could be.
Maybe i need to do some other stuff in my FW before calling the NVIC_SystemReset.
2025-07-18 6:15 AM
It turns out it is the hci_reset() App BLE is doing.
tBleStatus hci_reset( void ).
This now seems to not go through and just "crashes"