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

Flash Data Storage read problem

I am new to nRF,

Unable to read data using flash data storage example.

When ever i try to read it

throughs error and processor enters into error handler and hangs there indefinitely.

Help will be appreciated.

Thanking You.

Parents
  • Am aware of c/c++ and microcontroller(s), am sharing code snippet for your reference
    void read_config_data(device_config *configuration)
    {
        ret_code_t rc;
        fds_record_desc_t desc = {0};
        fds_find_token_t  tok  = {0};
        rc = fds_record_find(CONFIG_FILE, CONFIG_REC_KEY, &desc, &tok);
        if (rc == FDS_SUCCESS)
        {
            /* A config file is in flash. Let's update it. */
            fds_flash_record_t config = {0};
            /* Open the record and read its contents. */
            rc = fds_record_open(&desc, &config);
            APP_ERROR_CHECK(rc);
            /* Copy the configuration from flash into m_cfg. */
            memcpy(&read_config, config.p_data, sizeof(m_cfg));
            /* Close the record when done reading. */
            rc = fds_record_close(&desc);
            APP_ERROR_CHECK(rc);
        }
    }
  • Have you looked at: \nRF5_SDK_15.2.0_9412b96\examples\peripheral\flash_fds 

Reply Children
No Data
Related