Dear Sir,
I am using RL-FLASH FS with RTX for SD Card, USB HOST MSC, and FTP support.
In my application, there are two tasks which can access file system to perform file operation. 1. TCPnet Task and 2. File reading and writing task from both USB Host MSC and Micro SD Card.
Application works fine without any issue with all my USB sticks except one.
I am able to read all files from that faulty USB stick but while opening a file for writing, it gives continuous hard faults and my other system tasks doesnt hang. But those two tasks which are accessing file system hangs forever.
One more important things to tell you that same USB Stick works successfully if I am using any another USB stick before inserting this faulty one till next power cycle.
is anybuddy faced same issue???? how should I debug it??
Regards, Pradeep Pol
Thanks for your reply.
Actually finit function was returning value 4. I didnt checked that point (sorry!). Now I formatted the drive and now it is working fine. On Keil forum, i came to know that return value 4 means invalid FAT table.
I should check if finit function is returning null value. If not then user should not be allowed to copy any data.