Key-value store / Config region

FormerMember
FormerMember

Do the Nordic Boards offer some sort of config region where settings like the Bluetooth address are stored? I would like to change these settings without having to recompile.

If there is a separate setting for the Bluetooth address: Is there also some storage available for user-defined keys? And how would I access them from the code? How much space is available?

If there is no specific config region: What's the recommended approach to avoid recompilation? Ideally, I would like to store about 512 Bytes of per-board configuration data.

  • @Etan: Please take a look at chapter 7 in nRF51Reference Manual v3.0. The Bluetooth address is stored in the FICR.

    The FICR is factory hardcoded, so you can't write to that area, but you can store your data in the UICR (address 0x10001000, please see the nRF51 Product Specfication).

    However there are only 32 registers (4bytes each) for customer use in the UICR. If you want to store 512 bytes, you would need to use a dedicated flash page for that.

    I'm not really sure I understand you by "avoid recompilation". Could you give some more info about that?

    [Update): Correct the number of byte (128bytes) free to use in UICR

  • FormerMember
    0 FormerMember in reply to Hung Bui

    The 512 Bytes are unique per-board configuration. If I put them into the code, I have to recompile the code for every single board. I'm looking for a way to write them to the board after the code has already been deployed. Could you please provide information on how I can use a dedicated flash page?

  • @Etan: You can use any Jlink programmer to write to any page in the flash. For example the nrfjprog.exe tool ( C:\Program Files (x86)\Nordic Semiconductor\nrf51\bin) we provided with the nrfTool.

    Or you can use Jlink Commander or JFlasher from Segger to program the flash page.

Related