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

Loading data into Application Data block during programming

The device I am building requires a quantity of data to be loaded into the application data block so that it can be accessed at run time.  The data is effectively calibration data and may change with each unit.  I therefore don't want to hard-code it into the application itself.

I am using Keil and nRFgo studio.  I see how to program bootloader, softdevice and application, but no way to program the application data block.

Is this possible?  How would I go about it?

Many thanks

Barney

Parents
  • Hi Barney,

    You have several options to code data into the flash during production. You can for example write the data using "nrfjprog --memwr". The only thing you need to make sure is that the flash page you write to is free. So no other hex files should be programmed there, and it should not be used for other flash storage (such as FDS which is for instance used by the Peer manager to store BLE bonding information). If you use a bootloader you need to set DFU_APP_DATA_RESERVED in nrf_dfu_types.h accordingly, so that the bootloader does not overwrite your data during a DFU upgrade.

Reply
  • Hi Barney,

    You have several options to code data into the flash during production. You can for example write the data using "nrfjprog --memwr". The only thing you need to make sure is that the flash page you write to is free. So no other hex files should be programmed there, and it should not be used for other flash storage (such as FDS which is for instance used by the Peer manager to store BLE bonding information). If you use a bootloader you need to set DFU_APP_DATA_RESERVED in nrf_dfu_types.h accordingly, so that the bootloader does not overwrite your data during a DFU upgrade.

Children
Related