Dual-application support when using BLE OTA

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
adslc_1694516
Level 1
Level 1
Welcome! First question asked First reply posted

How can I configure a dual-application bootloader when using OTA? I'm using the BLE_OTA_FixedStack_Bootloadable/Bootloader example projects on the CY8CKIT-042-BLE using a 256k module (600-20088-01).  OTA updates work fine, but since it doesn't use external memory, updates overwrite the existing application, rendering the application invalid if the OTA is interrupted.  There is ample room on the flash for the bootloader (92 kB) and two duplicate applications (40 kB each) I want either a "golden image" (application that is loaded once, and then never overwritten), or two applications, the most recent of which is loaded at startup.

I know I can achieve the mission-critical behavior which I'm looking for by using external memory, but I'd like to utilize the available internal flash.

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
GyanC_36
Employee
Employee
250 replies posted 100 replies posted 50 replies posted

Hello Adam,

    Please refer page# 21 of below application note for Dual Application Bootloader implementation.

  https://www.cypress.com/file/45346/download

I have attached  a sample example for Dual Application Bootloader with Fixed Stack OTA  architecture for your reference here.

-Gyan

View solution in original post

3 Replies
lock attach
Attachments are accessible only for community members.
GyanC_36
Employee
Employee
250 replies posted 100 replies posted 50 replies posted

Hello Adam,

    Please refer page# 21 of below application note for Dual Application Bootloader implementation.

  https://www.cypress.com/file/45346/download

I have attached  a sample example for Dual Application Bootloader with Fixed Stack OTA  architecture for your reference here.

-Gyan

Thank you GyanC_36. The example application seems to be what I'm looking for. I can load the FW onto the device, and it runs as expected. When I go to OTA update, I can't update application1 - it returns "The bootloader reported error 'The application is currently marked as active and cannot be modified.'." I can OTA update application without issue, but the device will always boot to application1.

I'd like the bootloader to load application2, unless it is invalid, in which case application1 would be loaded. The literature indicates that application1 should be set to inactive, and application2 set to active. How do I do this?

An alternative would be to set the "older" of the two applications to inactive, while the "newer" is active.

0 Likes

Hello Adam,

   You can use any GPIO switch or External Command in your Bootloader Project to set Active/Inactive Flag for a particular application. Please refer Bootloader datasheet ( In Top Design Right Click on Bootloader component -> Open datasheet) for particular APIs.

-Gyan