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
Hardware Information :
I am using LPC1788 Microcontroller. Pen drive is having FAT32 file system with 8 GB capacity. I tried other 16 gb and 8 gb pen drives and they work fine. It stucks in f() function
www.uploadimage.in/.../FS Error.jpg
Above is the link for images showing Register status and local stack information of calling task.
Can I refer you to this
http://www.keil.com/forum/21384/
I have provided heap of 8192 Bytes. My code is working fine with all usb pen drive except one.
Is the USB device a composite ? eg I have a memstick that behaves as CD rom as well as standard USB msd so two drives appear on a PC when the USB memstick is inserted.
The standard ST usb code detects and says the device is not a supported device could you be having a similar issue with the Keil usb lib ?
I am having composite pen drives and they are working without any issue with RL-FlashFS. Pen drive with which i am facing problem that is not Composite.
in that case its not something I have come accross so its outside of my experience
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.
Hi, I am implementing RL-FLASH FS with RTX for USB HOST MSC and nand flash. my question is how will i integrate file system for both drivers because keil provides file system example code for standalone application and whenever i select both drives (nand and usb) it gives error.
Please mention errors that you are using!
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!