cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with OTA in custom BLE freertos application using BLE-OTA Bootloader

Sjain
Associate II

Hi ST support team,

I'm trying to implement OTA in my application using the BLE-OTA bootloader firmware and test it using BLE sensor application running on a mobile device. I have successfully tested the BLE-OTA using the heart rate sensor OTA application, and everything worked fine. I made the same changes as suggested in the user guide and also referred to the HRSTM OTA application. In my custom BLE firmware, all changes are done, and I can see the reboot OTA characteristics.

However, when I start OTA in my firmware, it receives the data on the reboot characteristic, and the application switches to bootloader mode. After switching to bootloader mode, the BLE-OTA application gets stuck and does not start any advertisements or BLE connections. The only difference between my application and the heart rate sensor application is that my application uses FreeRTOS config.

While debugging the BLE-OTA application, I found that the OTA app gets stuck in the SHCI_C2_BLE_Init function, specifically in the following line:

 
shci_cmd_resp_wait(SHCI_TL_DEFAULT_TIMEOUT);

Please suggest how to fix this issue and make OTA work in my application. Any support would be really appreciated.

Thanks,
SJain

1 REPLY 1
STTwo-32
ST Employee

Hello @Sjain 

It seems to be the same problem as the one described on the ES0394:

2.3.1 RF system wake-up clock set to HSE/1024 cannot be changed


Description

  • Once the RFWKPSEL[1:0] bitfield of the RCC_CSR register is set to 11, setting it to any other value or performing
    a system reset prevents the RF system from waking with another wakeup clock.

Note:

  • The value 11 of the bitfield selects HSE divided by 1024 as the RF system wakeup clock.

Workaround:

  • Apply a POR to change the RF system wakeup clock.

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.