i am currently using lpc2468 usbhostlite code and getting the required results. can anyone please help me make the necessary changes in the code to use it with fat32 formatted pendrives also
> I have replaced disk_initialize(), disk_status(), disk_read(), disk_write(), disk_ioctl() with MS_Init(), usb_status, MS_BulkRecv(), MS_BulkSend(), blkSize/numBlks of usbhost_ms.c, respectively
Sound like you've directly replaced above routines in ff.c. I meant, you have to provide your custom diskio.c, without touching to ff.c
Your diskio.c should be a simplified version of THOMAS's diskio.c, just for USB support.
Tsuneo
Sir, I have added the fatfs module to the Hostlite for LPC24xx to convert the code to fat32. I have replaced disk_initialize(), disk_status(), disk_read(), disk_write(), disk_ioctl() with MS_Init(), usb_status, MS_BulkRecv(), MS_BulkSend(), blkSize/numBlks of usbhost_ms.c, respectively But while simulating I get the following errors :
.\Obj\UsbHostLite.axf: Error: L6218E: Undefined symbol numBlks (referred from ff.o). .\Obj\UsbHostLite.axf: Error: L6218E: Undefined symbol usb_status (referred from ff.o).
Kindly help us find solution to these errors.
Thank you very much for your kind gesture..Tsuneo...
> Where should I attach the FatFs library in the HostLite?
Did you download the FatFs / USBHostLite (LPC17xx) example on above Martin THOMAS's web page? www.siwawi.arubi.uni-kl.de/.../lpc17xx_chanfat_mthomas_20100715c_pub.zip
He've already done it for you :-)
FatFs accesses to physical media using these routines in diskio.c disk_initialize(), disk_status(), disk_read(), disk_write(), disk_ioctl()
Fill the contents of these routines using, MS_Init(), usb_status, MS_BulkRecv(), MS_BulkSend(), blkSize/numBlks of usbhost_ms.c, respectively.
THOMAS's implementation is, lpc17xx_chanfat_mthomas 2\project\Libraries\fat_sd\diskio.c Look in "case USB:" of each routine.
Hi Tsuneo! I am doing the same project of making LPC2468 a USB Host. I downloaded the Library from the link elm-chan.org/.../00index_e.html which you gave in your reply. But what changes I have to make to Hostlite so that it works with Fatfs module..? Where should I attach the FatFs library in the HostLite?
USBHostLite includes just FAT16 file system library. Replace it to another one, such as FatFs (FAT12, FAT16 and FAT32) elm-chan.org/.../00index_e.html
Here is an example of FatFs over USBHostLite (LPC17xx).
Interfacing ARM controllers with Memory-Cards www.siwawi.arubi.uni-kl.de/.../index.html Find "ChaN's FAT-Module with LPC17xx SPI/SSP and USB-MSD" paragraph near the bottom.
The host stack interface of LPC17xx USBHostLite (usbhost_lpc17xx.h) is common with LPC2468 (usbhost_lpc2468.h) except for Host_Isr(). Just minor change of above example will run it on LPC2468.
View all questions in Keil forum