Reply
Highlighted
<a href="http://community.silabs.com/t5/Welcome-and-Announcements/Community-Ranking-System-and-Recognition-Program/m-p/140490#U140490"><font color="#000000"><font size="2">Star</font></font> </a> HA1
Posts: 2
Registered: ‎03-20-2017

BLE121LR OTA only successful on the first attempt

I am using BLE GUI and sdk: ble-1.5.0-137.  I can update a bgscript driven firmware with CC debugger. I also have hooks to update over the air. I am able to update my firmware (not including full stack) without any problem using BLEGUI only ONCE after loading the firmware using CC debugger. Further attempts to update over the air goes through fine (I receive update complete on GUI DFU) but changes made to firmware does not apply and firmware stays the same.

If I do the loading with cc debugger again I can confirm that over the air update will be successful just for the first attempt again.

I would appreciate your input.

 

 

 

   

 

 

Posts: 343
Registered: ‎10-07-2015

Re: BLE121LR OTA only successful on the first attempt

Hello,

 

Could you please provide us your project?

 

Regards,

Bartosz

<a href="http://community.silabs.com/t5/Welcome-and-Announcements/Community-Ranking-System-and-Recognition-Program/m-p/140490#U140490"><font color="#000000"><font size="2">Star</font></font> </a> HA1
Posts: 2
Registered: ‎03-20-2017

Re: BLE121LR OTA only successful on the first attempt

Thanks for the help from "Max Palumbo", My problem is resolved by erasing the user data area. I check the erase_flag stored in flash to determine if new firmware is flashed and reset this flag on boot.  

 

dim erase_page   # current page to erase
dim erase_flag   # flag to indicate if memory should be erased 
const max_erase_page = 64

 

procedure erase_flash()
 erase_page = 0
    while erase_page < max_erase_page
        call flash_erase_page(erase_page)
        erase_page = erase_page + 1
    end while
end