- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
In a device, based on the CYBLE-222005-00 module, we need to distinguish between a power on and a software reset. We do this with the help of the CySysGetResetReason function and in a single application, which we program using an SWD programmer, it works. However, if we restructure the software to add an OTA upgrade possibility (i.e. prepare separate Upgradable Stack OTA Bootloader and Bootloadable User Application), the same function called in the Bootloable returns a reset reason value with the CY_SYS_RESET_SW bit – set. I tried but I could not find the answer of the following questions:
- How can I recognize a power on reset in a OTA Bootloadable application that works with an Upgradable Stack OTA Bootloader?
- Is there a way to pass a value from the bootloader to the bootloadable or to share a variable between them?
Thanks!
Solved! Go to Solution.
- Labels:
-
BLE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The bootloader will reset the device when it finishes loading the new application; This means that software resets can be initiated by both the software application and the bootloader.
The bootloadable and bootloader can both read the flash memory, so in theory you could store values in flash for access by both. Otherwise, the only similar reference is the "metadata" for the bootloader/-able which is stored in flash as well.
Regards,
Epratt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The bootloader will reset the device when it finishes loading the new application; This means that software resets can be initiated by both the software application and the bootloader.
The bootloadable and bootloader can both read the flash memory, so in theory you could store values in flash for access by both. Otherwise, the only similar reference is the "metadata" for the bootloader/-able which is stored in flash as well.
Regards,
Epratt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, Epratt!
I was hoping that there is a possibility to share a region of non-initialised RAM between the bootloader and the application but ... ok, I will use the flash!
If anyone though, has a better idea how to recognise a 'power on' reset in an OTA bootable application, please, share it!
Cheers!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yeah, I looked through the documentation for references but didn't see any that stood out for RAM or shared memory 😕
Possibly there is a low-level method for doing it, but I wouldn't know
Good Luck though!
Epratt