Psoc 4 Bootloader auto-reset

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

cross mob
Law1443
Level 1
Level 1
5 sign-ins First reply posted First question asked

Hi everybody,

I'm trying to make my bootloadable applications reset automatically to the bootlaoder application after a certain period of time. The issue I'm having is that the timer that should reset this bootloadable applications to the bootloader must be in the bootloader application.  Is there any way to have a timer working in the bootloader application after you bootload an app for that the reset occurs?

I load the applications with the CySmart, so the bootloader interface is a BLE device

Thank you in advance

0 Likes
1 Solution
BiBi_1928986
Level 7
Level 7
First comment on blog 500 replies posted 250 replies posted

Hello.

It would be simpler to set a timer in bootloadable.  When it times out, call Bootloader_Start().  The processor will jump back into Bootloader.

How accurate does this timeout need to be?
You could start a timer in Bootloader and just before you jump to Bootloadable, read the timer value.  Store the timer value in memory somewhere that Bootloadable can access.  Once in Bootloadable, read that memory location and subtract that time from your new timeout value that you program into a timer.  When this timer times out, call Bootloader_Start().

Otherwise, there is no way to share a timer between Bootloader and Bootloadable.

View solution in original post

2 Replies
BiBi_1928986
Level 7
Level 7
First comment on blog 500 replies posted 250 replies posted

Hello.

It would be simpler to set a timer in bootloadable.  When it times out, call Bootloader_Start().  The processor will jump back into Bootloader.

How accurate does this timeout need to be?
You could start a timer in Bootloader and just before you jump to Bootloadable, read the timer value.  Store the timer value in memory somewhere that Bootloadable can access.  Once in Bootloadable, read that memory location and subtract that time from your new timeout value that you program into a timer.  When this timer times out, call Bootloader_Start().

Otherwise, there is no way to share a timer between Bootloader and Bootloadable.

Thanks!

I will try to store the value in memory as you said

0 Likes