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,
I also want to pass information from my bootloader to my application. Since i know i cannot use UICR register i wanted to use these retention registers. But they are also used to pass information from app to the DFU (to start a DFU update for example). Is it safe enough to use it as you proposed ? Isn't there another solution to pass the bootloader version to my main application ?
Best regards,
Aurélien
Hi,
I also want to pass information from my bootloader to my application. Since i know i cannot use UICR register i wanted to use these retention registers. But they are also used to pass information from app to the DFU (to start a DFU update for example). Is it safe enough to use it as you proposed ? Isn't there another solution to pass the bootloader version to my main application ?
Best regards,
Aurélien
I think it is better to link in both project a dedicated section in RAM that will be shared by app and bootloader