Hi all;
I want to know how to get setting file data in application layer , which means I want to know the value in address 0x3FC00. From the web , it is easy in bootloader mode, but it seems that it is not easy in application layer.
Hi all;
I want to know how to get setting file data in application layer , which means I want to know the value in address 0x3FC00. From the web , it is easy in bootloader mode, but it seems that it is not easy in application layer.
Yes, you can access the settings page from the application. Which SDK version are you using? If it's v. 12.3 you can try to do something like this:
#include nrf_dfu_types.h nrf_dfu_settings_t bootloader_settings = (nrf_dfu_settings_t *) 0x3FC00
Update: Forgot to declare bootloader_settings variable as a pointer, sorry. Fixed code:
const nrf_dfu_settings_t * bootloader_settings = (const nrf_dfu_settings_t *) 0x3FC00;
Yes, you can access the settings page from the application. Which SDK version are you using? If it's v. 12.3 you can try to do something like this:
#include nrf_dfu_types.h nrf_dfu_settings_t bootloader_settings = (nrf_dfu_settings_t *) 0x3FC00
Update: Forgot to declare bootloader_settings variable as a pointer, sorry. Fixed code:
const nrf_dfu_settings_t * bootloader_settings = (const nrf_dfu_settings_t *) 0x3FC00;
Yes , it is v12.3 , but it compiled error:
Build target 'nrf51422_xxac'
compiling main.c...
..\..\..\main.c(114): warning: #520-D: initialization with "{...}" expected for aggregate object
nrf_dfu_settings_t bootloader_settings = (nrf_dfu_settings_t *) 0x3FC00;
..\..\..\main.c(114): error: #144: a value of type "nrf_dfu_settings_t *" cannot be used to initialize an entity of type "uint32_t"
nrf_dfu_settings_t bootloader_settings = (nrf_dfu_settings_t *) 0x3FC00;
..\..\..\main.c: 1 warning, 1 error
".\_build\nrf51422_xxac.axf" - 1 Error(s), 1 Warning(s).
Target not created.
Build Time Elapsed: 00:00:01
I also try to use like this:
Forgot to declare the variable as a pointer. I've updated my previous answer.