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

FatFs question

I used nRF5_SDK_14.1.0_1dda907.

I used fatfs example.

Wirted data in the same file to sd card.

I discoverd that Max size of the file is 16KB.

Over the max size of file, when i write data to sd card, will be failure.

Can i change the max size to one file, or no limit size ?

Parents
  • The line is 3423.

    if (disk_read(fs->drv, fp->buf, fp->sect, 1) != RES_OK) res = FR_DISK_ERR;

    I discovered that :

    In the disk_read(BYTE drv, BYTE *buff, DWORD sector, UINT count) function.

    err_code = nrf_blk_dev_read_req(m_drives[drv].config.p_block_device, &req); 

    The err_code is 0x11.

    How to debug?

  • Hey woody Sorry for the long wait.

    An error code of 0x11 is NRF_ERROR_BUSY. It can be returned from line 250, 256, and 283 in nrf_block_dev_sdc.c. 

    250: (m_active_sdc_dev != p_sdc_dev) is true. /* SDC instance is busy. */

    256: app_sdc_busy_check() returns true.  /* Previous asynchronous operation in progress. */

    283: app_sdc_block_read() returns NRF_ERROR_BUSY, possible reasons are on line 1000 (m_cb.state.op != SDC_OP_IDLE), or line 1025(sdc_cmd()) of app_sdcard.c. 

     

     

    Cheers,

    Håkon.

Reply
  • Hey woody Sorry for the long wait.

    An error code of 0x11 is NRF_ERROR_BUSY. It can be returned from line 250, 256, and 283 in nrf_block_dev_sdc.c. 

    250: (m_active_sdc_dev != p_sdc_dev) is true. /* SDC instance is busy. */

    256: app_sdc_busy_check() returns true.  /* Previous asynchronous operation in progress. */

    283: app_sdc_block_read() returns NRF_ERROR_BUSY, possible reasons are on line 1000 (m_cb.state.op != SDC_OP_IDLE), or line 1025(sdc_cmd()) of app_sdcard.c. 

     

     

    Cheers,

    Håkon.

Children
  • Excuse me,
    Previous error is not occurrence.

    But i discovery another error.

    Q1: New error is :
    line : 221 in diskio_blkdev.c.

    m_drives[drv].last_result is NRF_BLOCK_DEV_RESULT_IO_ERROR.

    I know that error occurr line : 106 in nrf_block_dev_sdc.c.

    How to debug it?

    And,

    If an error code of 0x1 is returned from line 256 in nrf_block_dev_sdc.c. 

    Q2 : What is mean that  previous asynchronous operation in progress?

    Thx.

Related