This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Access DFU settings page

Hi,

I'm currently working on a project including the buttonless DFU.

I would like to read the bootloader settings page from the application, especially the app version field. I know that these settings are stored at address 0x0007 F000 and I can of course just read them directly from there (the word at 0x0007 F008 should correspond to the app version).

But what if at some point this address changes or if the data structure is changed?

Should I manually define an APP_VERSION at the build stage that equals the DFU packet version given to nrfutil?

What is the recommended way of managing / retrieving the running app version? 

Details:

SoC: nRF52832

SDK: 15.2.0

SD: S132 v.6.1.0 

Regards,

William

Parents Reply Children
  • I would recommend you to put a clean copy of the SDK under source control. Especially for this case, since you need to share some files between application and bootloader. In most cases, copying modules directly into your project is enough, but I'd say that for this particular case you need to share the same modified files in both projects.

  • There is code in nrf_dfu_settings that suggests Nordic had planned a proper (or at least standard) way for the application to read the settings (NRF_DFU_SETTINGS_IN_APP), but it seems that it is not fully implemented.

    Also when generating a bootloader settings page for flashing the bootloader you specify a version for the settings page, but that info doesn't seem to be used by the code actually reading the settings.

    I ended up assuming the structure is fixed. And if it ever does  change I'll just force an application update along with the new bootloader.

    So if anyone from Nordic is listening, a proper way would be appreciated...

Related