You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
July 2024: The Pico Evaluation Board was was modified by adding 3 connecting wires to convert the SDCard SDIO interface to a standard 1-bit SD interface. Remove pins GP5 GP18 GP19 from the Pico MCU male header. Then use the female Pico SMD header connections on the display board to connect the three wires as indicated below:
D3 CS GP22 stay as is
CLK GP5 disconnect from Pico and connect to GP10 SPI-1 CLK
CMD GP18 disconnect from Pico and connect to GP11 SPI-1 MOSI
D0 GP19 disconnect from Pico and connect to GP12 SPI-1 MISO
As an alternative implement SPI using PIO is also a solution - three sources that I know of:
(1) PioSpiTest.zip available here
(2) PIO-SPI the code is in the drivers/sdcard subdirectory - based on the comments here
(3) PIOSpi - Arduino spi driver over PIO to enable SPI over any GPIO
June 2024: From the description here, which
is also applicable to the Waveshare Eval Board, this can be made to have a functional SDCard using PIO SDIO:
You'll have to modify the PIO code:
You need SDIO_CLK offset from D0 by -14, which is 18 in mod32 arithmetic.
(19 + 18) % 32 = 5
In rp2040_sdio.pio you'll need to change this line:
.define PUBLIC SDIO_CLK_PIN_D0_OFFSET 30 ; (-2 in mod32 arithmetic)
to
.define PUBLIC SDIO_CLK_PIN_D0_OFFSET 18 ; (-14 in mod32 arithmetic)
There is a note that "For SDIO, data lines D0 - D3 must be on consecutive GPIOs, with D0 being the lowest numbered GPIO. Furthermore, the CMD signal must be on GPIO D0 GPIO number - 2, modulo 32. (This can be changed in the PIO code.)"
Similarly at Visrealm it notes: Six GPIOs for signal pins, and, optionally, another for CD (Card Detect). Four pins must be at fixed offsets from D0 (which itself can be anywhere):
CLK_gpio = D0_gpio - 2.
D1_gpio = D0_gpio + 1;
D2_gpio = D0_gpio + 2;
D3_gpio = D0_gpio + 3;
The text was updated successfully, but these errors were encountered:
Oct 2024: Test SDIO for RP2040/RP2350 by Bill Greimann
July 2024: The Pico Evaluation Board was was modified by adding 3 connecting wires to convert the SDCard SDIO interface to a standard 1-bit SD interface. Remove pins GP5 GP18 GP19 from the Pico MCU male header. Then use the female Pico SMD header connections on the display board to connect the three wires as indicated below:
As an alternative implement SPI using PIO is also a solution - three sources that I know of:
(1) PioSpiTest.zip available here
(2) PIO-SPI the code is in the drivers/sdcard subdirectory - based on the comments here
(3) PIOSpi - Arduino spi driver over PIO to enable SPI over any GPIO
June 2024: From the description here, which
is also applicable to the Waveshare Eval Board, this can be made to have a functional SDCard using PIO SDIO:
Store a collection of PC editable macro definitions or music files or picture files on the SDCard and then have the Pico read it on power-up. This Waveshare IPS ST7789 LCD Pico Board 320x240 2.8 inch hardwired the LCD, Touch controller and SDCard to SPI-1 which makes the SDCard usable. But this Waveshare IPS ILI9488 Pico Evaluation Board Touch LCD 480x320 3.5 inch has the SDCard hardwired to SDIO pins which are not in the correct sequence for the current PIO drivers. The RPi SDK example is a wip (https://github.com/raspberrypi/pico-extras/tree/master/src/rp2_common/pico_sd_card)
Sep 2022: There is an implementation for the RP2040 here:
https://github.com/ZuluSCSI/ZuluSCSI-firmware/tree/main/lib/ZuluSCSI_platform_RP2040
Also see here:
https://forums.raspberrypi.com/viewtopic.php?t=337143
https://forums.raspberrypi.com/viewtopic.php?t=356274
https://forums.raspberrypi.com/viewtopic.php?t=361335&start=50
And this could be a solution: https://github.com/carlk3/no-OS-FatFS-SD-SDIO-SPI-RPi-Pico or https://github.com/carlk3/no-OS-FatFS-SD-SPI-RPi-Pico/tree/sdio - D0 to D3 are offset correctly (each D0 + 1) but SDIO-CLK is not at the required D0 - 2 offset.
There is a note that "For SDIO, data lines D0 - D3 must be on consecutive GPIOs, with D0 being the lowest numbered GPIO. Furthermore, the CMD signal must be on GPIO D0 GPIO number - 2, modulo 32. (This can be changed in the PIO code.)"
Similarly at Visrealm it notes: Six GPIOs for signal pins, and, optionally, another for CD (Card Detect). Four pins must be at fixed offsets from D0 (which itself can be anywhere):
CLK_gpio = D0_gpio - 2.
D1_gpio = D0_gpio + 1;
D2_gpio = D0_gpio + 2;
D3_gpio = D0_gpio + 3;
The text was updated successfully, but these errors were encountered: