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

FDS_PHY_PAGE_SIZE setting

Good morning,

In order to save some user data in flash, I want to fix page size to 32 bytes. It will be more useful for me, and it will be easier according to my project structure.

Now, I have setup the following parameters:

- In sdk_config.h:

FDS_VIRTUAL_PAGES 384

FDS_VIRTUAL_PAGE_SIZE 8 //32 bytes

- In fds_internal_defs.h:

FDS_PHY_PAGE_SIZE   (8)

The problem is that FDS_PHY_PAGE_SIZE definition is inside a file that belongs to a Softdevice file, so it will be modified when building the project with a new Softdevice version.

So, is there any way to include the FDS_PHY_PAGE_SIZE definition in a user-project file, as the 'sdk_config' file?

Best regards,

Dani

Parents
  • Hi again,

    With the settings specified above, I'm able to read and erase a page, but I get 0x10 error when writting.

    I have defined 'nrf_fstorage_t' according to this:

    NRF_FSTORAGE_DEF(nrf_fstorage_t fstorage) =
    {
    /* Set a handler for fstorage events. */
    .evt_handler = fstorage_evt_handler,

    /* These below are the boundaries of the flash space assigned to this instance of fstorage.
    * You must set these manually, even at runtime, before nrf_fstorage_init() is called.
    * The function nrf5_flash_end_addr_get() can be used to retrieve the last address on the
    * last page of flash available to write data. */
    .start_addr = 0x000fd000,
    .end_addr = 0x00100000,
    };

    Why do I get this error? Maybe is it related to the FDS_PHY_PAGE_SIZE?

    Best regards.

Reply Children
No Data
Related