AnsweredAssumed Answered

usb host fails to read/write data on usb drive due to error FR_DISK_ERR

Question asked by sid.m on Nov 5, 2015
Latest reply on Sep 23, 2016 by mutti.andrea
     i am working on usbh+fatfs code generated from STM32CcubeMX. sometimes USBh fails to read/write data on usb drive. f_read/f_write/f_open returns FR_DISK_ERR

on going in little depth i found that data is written/read in while loop in msc layer. program will come out of this while loop only on completion of write/read process or if timeout(10sec) occurs. i found that sometimes timeout occurs and this causes FR_DISK_ERR.

i have two questions:

1). this write fail happens sometimes(not always). so what can be the reason that it happens sometimes. in what direction i should debug.

2) how to recover from this FR_DISK_ERR, as after this no USB operation works.

any ideas??