This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320C6748: f_write function gives FR_DISK_ERR while running in timer function

Part Number: TMS320C6748
Other Parts Discussed in Thread: OMAPL138

Hello,

We are using LCDKC6748 module and "pdk_omapl138_1_0_3" sdk. and we are using TIRTOS. Our application is Data logging.

When I use the "USB_HostMsc_lcdkOMAPL138_c674xExampleProject" to store data in 16 GB pendrive. The example is working fine.

When I modify the program to store the data which I aquire in a Timer function which runs at10ms I get FR_DISK_ERR  while using f_write funciton. I am trying to write only 10bytes to the file in the timer function very frequently I am getting FR_DISK_ERR  error. We I check the byteswritten variable during this error it was less than 10 bytes.

Kindly suggest me how to solve this problem

Thanks & regards

Navaneetha krishnan

  • Hello Navaneetha,

    The error code "FR_DISK_ERR" indicates "A hard error occurred in the low level disk I/O layer." I looked through the FatFs code (pdk_omapl138_1_0_7\packages\ti\fs\fatfs\src\ff.c) and there are many places where this error can occur. Perhaps the write is being interrupted before completion given that the written bytes during the error is less than 10 bytes. Have you tried increasing the timer interval to see if the problem goes away?

    EDIT: Another thing to check are your stack and heap sizes. You can check these in ROV when the error occurs by going to Tools > ROV Classic in CCS. 

    Regards,
    Sahin