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

fstorage not initializing properly in my app

I want to store two floats and one 8 character string in fstorage.

I solved it by using 4 uint32 types stored in flash, I got it working in the ble_app_template example, but when I try to implement the same in my own app, the callback is not run, leaving my app to wait for event forever..

I noticed that the address is different in the two, in the ble_app_template it's stored in 0x79000, while in my app it's stored in 0x7C000. My app is built on ble_peripheral/ble_app_uart

SDK: 12.2

Any insight?

Parents Reply
  • in sdk_config I have checked FSTORAGE_ENABLED with queue 4, retries 3 and writesize 2014,

    in main I have

    #include "fstorage.h" 
    #define NUM_PAGES 4
    #define PAGE_SIZE_WORDS 256
    static volatile uint8_t fs_callback_flag;
    

    I have the callback event

    static void fs_evt_handler(fs_evt_t const * const evt, fs_ret_t result){
        if (result != FS_SUCCESS){
            bsp_indication_set(BSP_INDICATE_FATAL_ERROR);
            NRF_LOG_INFO("\tfs_evt_handler failed\n");
            NRF_LOG_FLUSH();
        } else {
            NRF_LOG_INFO("\tfs_evt_handler OK\n");
            fs_callback_flag = 0;
        }
    }
    

    ....

Children
No Data
Related