cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WB BLE OTA application upload

BGrah.1
Associate II

Hi,

I am trying to implement the BLE OTA firmware upgrade to an existing BLE project. However before I have even looked at integrating the functionality to an existing project I am focusing on the example projects.

So first up I have successfully used the BLE_Ota and from this via the ST BLE android app have been able to upload the BLE_Heart_ota binary file to the nucleo board, everything works as expected.

From this I move to the second part of work and this is to use the non_OTA BLE_Heartrate example and give it the OTA functionality. The steps to do this should be (I believe)

- Replace the linker file STM32WB55RGVX_FLASH.Id, this is editing the flash address (0x08007000) and adding in the OTA region (magic key related) of the two sections TAG_OTA_START and TAG_OTA_END ).

- Remove the update of SCB->VTOR in the file system_stm32wbxx.c

- set BLE_CFG_OTA_REBOOT_CHAR to 1 in ble_conf.h

When I make these changes to the default BLE heartrate application and upload the hex file (I am getting a hex file not a .bin) via the ST BLE android app ,the program does not seem to run. Instead it just reverts back to the initial OTA advertising program.

I am assuming for some reason the setup is not passing the magic key or for some reason not making it to the 0x08007000 start address of the application.

I am using STM IDE and I can see the .ota_region in build analyzer memory details at the correct address (0x08007140)

Maybe I am missing something that is obvious to other people.

Any suggestions welcome.

Regards

Ben

1 ACCEPTED SOLUTION

Accepted Solutions
BGrah.1
Associate II

To follow up, I had a brain wave and figured what I was doing wrong, as I mentioned the original BLE heartrate was outputting a hex file, I changed the project output setting to give me a .bin output and it worked. The .hex file was 3 times larger than the .bin file so may have been causing an issue, size wise.

View solution in original post

2 REPLIES 2
BGrah.1
Associate II

To follow up, I had a brain wave and figured what I was doing wrong, as I mentioned the original BLE heartrate was outputting a hex file, I changed the project output setting to give me a .bin output and it worked. The .hex file was 3 times larger than the .bin file so may have been causing an issue, size wise.

Christophe Arnal
ST Employee

Hello,

Great to read you solved the issue. For your information, the size is not an issue and the OTA mechanism does not have such limit.

The problem is that the .hex file is a specific format where there are more informations. This is a text file that you could open with notepad.

So, the format is very different to the .bin format that contain only data that will go in flash.

Regards.