-
Notifications
You must be signed in to change notification settings - Fork 521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SdFat SDIO on RP2040 with USB stick support #453
Comments
I have no interest in USB MSC for RP2040 using Adafruit_TinyUSB_Library and Pico_PIO_USB. PIO SDIO would be total overkill for access to the SD. SPI would probably be fast enough. I did a PIO SPI for SdFat here. I get about 7,100 KB/sec read/write to a SD. At some point I will release PIO SDIO for SD cards on SdFat. I currently get about 25,000 KB/Sec read/write. Let me know how fast read is from the USB drive. Edit: Here is a SDIO result for RP2040. |
Forget about using any of my fast PIO with the Adafruit_TinyUSB_Library and Pico_PIO_USB. Pico_PIO_USB uses almost all of the two PIO memories. I suspect it will be slow since the decode loops for USB NRZI decoding take lots of instructions. |
I'm trying to implement copying, but I can't do it. The code in this form simply reads the file, but the reading never ends. I do not understand why(
|
For now I want to try regular SPI and PIO USB. Lines like: File srcFile = fatfs.open(srcFileName, O_READ); File32 srcFile = fatfs.open(srcFileName, O_READ); |
I looked at the PIO USB and don't want to waste my time. I am closing this. |
For now, the question is to quickly copy files from a USB drive to an SD card, using SDIO for the memory card and GPIO to implement a USB host on the RPI PICO. I found a possibility to implement a USB host:
PIO_USB.zip
To run the example you need to install the libraries:
As you may have noticed, this example uses the SdFat Adafruit Fork library, however, you can remove it and install the latest version of SdFat, you just need to edit the parameter:
#ifndef USE_BLOCK_DEVICE_INTERFACE
#define USE_BLOCK_DEVICE_INTERFACE 1
#endif // USE_BLOCK_DEVICE_INTERFACE
In this case, the compiler produces a lot of Warnings (unlike the SdFat Adafruit Fork library), but the sketch still compiles and works.
So I would like to know from you, as the author, whether it is possible to somehow copy files from a USB drive to an SD card using SDIO?
A very interesting board for implementing this.
Thank you very much for your answer and help.
The text was updated successfully, but these errors were encountered: