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

cross mob
MaPe_4795006
Level 1
Level 1
10 sign-ins 5 sign-ins First reply posted

Hi!

My plan is to implement the following startup sequence from cold reset:

  1. CM0p executes and starts CM4 (basically default functionality)
  2. Bootloader application 0 starts. This has the responsibility to select which of applications 1 or 2 to execute

Is there a way, using the DFU SDK, to persistently mark an application as next/current, Linux style? With factory defaults it would contain app 0 and at least one of app 1 and 2. Powering it up the first time in post production it would boot either app 1 or 2. At a later point in time this app installs another app in the free slot. A switch is performed to the new app. How can I persist this value so that the new application is executed on subsequent cold resets?

 

Thanks!
Markus

0 Likes
1 Solution
Alakananda_BG
Moderator
Moderator
Moderator
50 likes received 250 sign-ins 250 replies posted

Hi,

 I suppose I need to persist the running application ID in flash, or is this handled by the DFU SDK? 

Yes, it is handled by the DFU SDK only.

Regards

Alakananda

View solution in original post

0 Likes
3 Replies
Alakananda_BG
Moderator
Moderator
Moderator
50 likes received 250 sign-ins 250 replies posted

Hi Markus,

Have you looked at our code example related to DFU below.

https://www.cypress.com/documentation/code-examples/ce213903-psoc-6-mcu-basic-device-firmware-update...

Regards

Alakananda
0 Likes

Hello!

Yes I have. The example does not face the problem described above as far as I can tell.

  1. Application x is running
  2. Application x installs application y
  3. Application x switches to application y
  4. Application y is running
  5. Power cycle of device

After step 5, I need application y to be started by the bootloader as the device boots up. I suppose I need to persist the running application ID in flash, or is this handled by the DFU SDK? I can see that the running application ID is saved in RAM only.

0 Likes
Alakananda_BG
Moderator
Moderator
Moderator
50 likes received 250 sign-ins 250 replies posted

Hi,

 I suppose I need to persist the running application ID in flash, or is this handled by the DFU SDK? 

Yes, it is handled by the DFU SDK only.

Regards

Alakananda
0 Likes