Hi all,
I'd like to pass bootloader version (2bytes) from bootloader_util_reset function (bootloader) to the main of application. can help me to acheive that?
Thank you for your help in advance.
Hi all,
I'd like to pass bootloader version (2bytes) from bootloader_util_reset function (bootloader) to the main of application. can help me to acheive that?
Thank you for your help in advance.
You could use the retention registers, each of which is one byte.
#import "nrf_power.h"
...
NRF_POWER->GPREGRET = bootloader_version && 0xff;
NRF_POWER->GPREGRET2 =bootloader_version >> 8 && 0xff;
...
These are retained when performing a standard soft reset NVIC_SystemReset
.
hi shibshab , thank you for your reply.
hi shibshab , thank you for your reply.