-
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
ported to V2.2.2 modifications by PaufStoffregen to SdioTeensy.cpp #445
base: master
Are you sure you want to change the base?
Conversation
I wrote this assuming all microSD cards supported High Speed mode since the standard said this:
I recently found this is actually optional for older V 1.10 cards. Since this pull is already in the Teensy version of SdFat I will add it with other major changes to SDIO later. I have developed a RP2040 SDIO controller using the PIO module. I am also experimenting with SDIO for other chips. In experiments with the RP2040 controller I can overclock modern cards to over 30 MB/sec in Standard Speed mode. I experimented with Teensy 4.1 and was able to get over 40 MB/sec in High Speed mode. I may add an optional overclock speed setting to SDIO. |
I look forward to updated SDIO (especially Teeny4.x and RP2040) |
It appears Raspberry Pi has a new micro-controller that could replace the RP2040. A first version handles IO on the PI 5. It is a dual core Cortex M3 with lots of interesting features. Here is a draft datasheet. It has an interesting SDIO controller and many other features, PCI Express, Ethernet, displays and cameras. I hope they release a version as a RP2040 upgrade. The RP1 is clearly a support chips but:
|
I probably won't do much with Teensy 4.x. I don't use it anymore. |
@greiman, where is this implementation located, and how stable is it? I have noticed your comments in ZuluSCSI/ZuluSCSI-firmware#269 about SD performance. |
I have a core version for SD Default Speed that seems reliable even with overclocking to 50 MHz. This is for a CPU clock of 200 MHz. Almost all cards even work with CPU clock 250 MHz for 62.5 MHz SD clock. I know what needs to be done for High Speed mode. Basically SD output changes from data valid on clock high to data valid clock low. The timing was changed since 50 MHz was very fast 18 years ago when High Speed mode was specified. Most modern cards have no problem with overclocking Default Speed timing but I want to provide a correct High Speed mode. There is also the problem of providing options for GPIO pins. All of these options complicate managing PIO options and memory. I also want to make it possible for users to add SDIO drivers. So I am trying to implement all of this and make backward compatible changes to the SdFat SDIO APIs. Not sure when I will release this. |
I have also written a fast PIO SPI for RP2040. For many apps it will be fast enough. I also want to provide it with SdFat. Here is a result with the bench example at 250 MHz CPU:
I attached the files used in this test. |
Added modifications from https://forum.pjrc.com/threads/69460-Builtin-Sd-Card-Teensy-4-1-SD-begin()-errors?p=333363&viewfull=1#post333363