Skip to main content
Associate III
May 20, 2024
Solved

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

  • May 20, 2024
  • 1 reply
  • 1088 views

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

This topic has been closed for replies.
Best answer by STTwo-32

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

1 reply

STTwo-32
STTwo-32Best answer
ST Technical Moderator
June 13, 2024

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.