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

How to set p_start_addr for fstorage manually (SDK 12.1)?

I would like to set the the fstorage memory location manually through fs_init() within SDK 12.1, but I am not sure how to do this. There's comments that is can be done manually, but I do not know where it is specifically set. I would like p_start_addr to be located at 0x3FC00.

Do I also need to set p_end_addr? This is for a nRF51422 application.

The application does not require many writes, maybe less than 100 per year, so I am not worried about stored wear.

Parents
  • If you are only calling

    // Our fstorage configuration.
    FS_REGISTER_CFG(fs_config_t fs_config) =
    {
        .callback  = fs_event_handler,
        .num_pages = FDS_PHY_PAGES,
        // We register with the highest priority in order to be assigned
        // the pages with the highest memory address (closest to the bootloader).
        .priority  = 0xFF
    };
    

    once, I think you can just set FDS_PHY_PAGES to 1, and p_start_addr should be 0x3FC00. You can however confirm this by setting a breakpoint in fs_init().

Reply
  • If you are only calling

    // Our fstorage configuration.
    FS_REGISTER_CFG(fs_config_t fs_config) =
    {
        .callback  = fs_event_handler,
        .num_pages = FDS_PHY_PAGES,
        // We register with the highest priority in order to be assigned
        // the pages with the highest memory address (closest to the bootloader).
        .priority  = 0xFF
    };
    

    once, I think you can just set FDS_PHY_PAGES to 1, and p_start_addr should be 0x3FC00. You can however confirm this by setting a breakpoint in fs_init().

Children
Related