Maximum number of records per file ?

I am writing 3305 records into a single FDS "file" (0x1000)

But when looping through them with `while ((err_code = fds_record_find_in_file(data_type_to_file_id(data_type), &record_desc, &find_token)) == NRF_SUCCESS) {` it loops through only 2304 records.
For the last one, err_code is FDS_ERR_NOT_FOUND, exactly like if there was no more records in this file.

For the first 2304, I have no issue retrieving, writing, updating them, ...

I have launched my program several times, it always loops through 2304 records. Is this a known limit of maximum number of records for one file ?

Code :

    ret_code_t err_code;
    fds_flash_record_t flash_record;
    fds_record_desc_t record_desc;

    fds_find_token_t find_token;
    memset(&find_token, 0x00, sizeof(fds_find_token_t));


    while ((err_code = fds_record_find_in_file(data_type_to_file_id(data_type), &record_desc, &find_token)) == NRF_SUCCESS) {
        < check record >
    }

Parents
  • Hi,

    There is no defined maximum number. You can even have multiple records with the same ID within the same file.

    Are you sure the additional records are there? Could it be that records after number 2304 are not written for some reason? Perhaps because of no more room in FDS, or some other reason, but you fail to handle an error that occurred before so that it failed silently so that it is not notices before attempting to read?

Reply
  • Hi,

    There is no defined maximum number. You can even have multiple records with the same ID within the same file.

    Are you sure the additional records are there? Could it be that records after number 2304 are not written for some reason? Perhaps because of no more room in FDS, or some other reason, but you fail to handle an error that occurred before so that it failed silently so that it is not notices before attempting to read?

Children
Related