Hi,
I want to implement a USB module as V drive for pendrive where I can get commands through uart such as make directory ,open file etc and then dump the file onto pendrive. I am aware of how USB works, I want to know the feasibility of this project and a starting guide to how can it be achieved.
Regards Sanket
You could do something like this on an STM32F4-Discovery, the Firmware Update example provides for a USB Mass Storage access layer, with FatFs. The USB Flash drive would attach to a small cable onto the MicroAB connector. To access via a serial port you'd need to add interfacing hardware, code to read/write to the USART, and parse commands and data.
This could probably be done with other NXP, TI or ATMEL processors, you'd need to review the examples and libraries provided by the vendors.
How should i go about it. Can I get some kind of examples for such an application. Is the circuitry for the USART thing available or an example code for this. I am already done with the mass storage device example for tiva C series controllers. My pendrive is working fine , now I want this to be implemented as a V drive as mentioned above . Any suggestions please
I tried to implement a ls command from uart where once i receive the ls coomand I send all the entries in a root directory to the hyperterminal . Now how can i delete a file , write to a file and read from a file. I am working on it but any suggestions are welcome
elm-chan.org/.../unlink.html
elm-chan.org/.../readdir.html
Thanks for the response. I am almost done with everything on file handling, but i am facing some issues with writing to files from command line. Before creating a file i have to check whether it is created or not. Once I get this info I write the text from the command line to the file. Now this is where i face the problem. Here I copy the arguments to temp buffer and then i use f_write function. Instead should I use f_printf function here will it work. Also if I want to write to a file in between how can i do this, I know i have to use lseek function but how.
My command would be something like this
wrf hello.txt hello all, this is fatfs world
any suggestions