We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi guys,
I'm looking at using RL-FlashFS with an NXP LPC11U24 to work with USB in offering-up FAT-based removable storage.
I'm a little unclear on the FAT capabilities of the library however. The cheapest solution for us is typically an SPI-based sectored flash chip. Does RL-FlashFS support FAT storage on these types of devices?
Any advice is much appreciated.
I have an application running on a stm32f2xx RTX has 14 tasks at the moment it uses uses the FS lib and fat_fs at the moment I am trying to move from the ST provided USB code and fat_fs to the Keil USB lib
So using a demo board STM3220G-EVAL
I am able to log data to the SD card eg 322 files (~11mb) then when the USB memstick is detected I transfer the data from the SD card to the USB memstick
the data is stored to the SD card in something like the following structure
M0:\DATA\DEVICE_ID\MxxYxx\D01.txt M0:\DATA\DEVICE_ID\MxxYxx\D02.txt M0:\DATA\DEVICE_ID\MxxYxx\D03.txt
the MxxYxx being set the TRC
THE SD card has been formatted with FAT and I have tried the USB memstick formatted with FAT and FAT32
works with no problems on the demo board but I do have an issue with the Keil drivers.
Basically you need to be aware if you hardware does not exactly match the Keil platforms the drivers were written for, you have to adapt them to suit your hardware.
For the FS I use different inputs to detect the SD card etc
For the USB ah well its a real can of worms
for example ST provide a tool to allow hardware engineers to wotk out what pins are needed so you can use both USB ports and it shows what are the min pins required
But with the Keil drivers if you use the HS port on the stm32F2xx you need to have an external Phy. you need to use the Vbus sense pins (unless you want to go into the Keil code and turn off vbus sens. Its certainly not a clear cut issue.
I actually use the ports in the following manner HS port as a USB device when the bootloader is running The FS port as a USB host only supporting a MS device
I have a "strange" USB MSD that all PCs find but the ST provided code has issues with running ( it either fails to enumerate properly or continulay resets and seems to have issues finding the MSD file structures occasionally) on their eval board and the Keil code runs okay (well not quite Keils I ahve taken the RL host MSD FS exampkle and added the RTX blinky stuff)
I actually quite like the FS flash I can compare it directly to fat_fs and it appears quicker.
FS flash will open a file and allow you to write to it without having to create the file path where as fat_fs you have to create each dir before opening a file
I think Keil need to get a ffind next function sorted eg it suggests you have to clear a vaiable in a structure you pass to the function and it will match and tell you if the file is available but if you clear this vairable e.g.
msSearch.infoL2.fileID = 0; /* info.fileID must be set to 0 */
it will find the first file repeatably and if you dont clear .fileID next time you run it it will find the next file
It was interesting finding out how to deal with my data structure eg find the
M0:\DATA\DEVICE_ID\MxxYxx\D01.txt
By just searching for directory entries from the DEVICE_ID downwards rather then by brute force trying each day and month year combination.
But I will say it works well and seems fast.
This is my experince, others may have a different experience.