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
C:\Keil\ARM\RV31\Inc\File_lib.c(58): error: #35: #error directive: multiple default drives enabled
Hi Pradeep, have you used keil file system stack for usb msc and sd card.
Yes. there can be only one default drive. In file configuration, uncheck one of the Default drive. Make USB MSC as a default drive or make NAND as default drive. If you are making USB as default drive that means you dont need to mention volume label in FILE I/O commands while accessing data from that drive. To make it more clear, I will give an example.
To open a file from USB which you have selected as default drive. then function call will be, fin = fopen(\\example.txt,r); If USB is not default drive then your function call will be, fin = fopen(U:\\example.txt); See the difference while accessing files.
"If you are making USB as default drive that means you dont need to mention volume label in FILE I/O commands while accessing data from that drive."
"fin = fopen(U:\\example.txt);"
Note that "U:" is not a volume label. The drive letter selects which drive to access. Current drive (default) gets used if no drive letter is specified.
But most file systems have some support for a volume label too. That is a name that can be seen when browsing the file system on that file system.
So a "dir" on my computer might say: "Volume in drive C is OS" - C is the drive letter and OS is the volume label.
Oopss sorry! Thats absolutely correct Per. Thanks for the reply.
Hi, finit("U0:") call hangs for me while file system initialization for USB1 works fine. usbh_init(0) is done and it hangs when it calls usbh_engine(0) multiple times. Does anyone know how to debug such an issue? I'm working on MCBSTM32F200.
Thanks in advance!