Raspberry CM4 to SD-Card via SDIO

Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Locked
User avatar
JuMu
 
Posts: 1
Joined: Mon Jul 26, 2021 10:56 am

Raspberry CM4 to SD-Card via SDIO

Post by JuMu »

Hi there

I have an RPi Compute Module 4 (with eMMc) on the associated IO board and would like to connect another SD card there. I bought the MicroSD SPI or SDIO Card Breakout Board from Adafruit to connect it via SDIO. For this purpose, I have configured pins 22-27 with an overlay for access via SDIO. Now I'm looking for the right library to access the SD card with the Raspberry. Can anyone help me there?

Thanks a lot!
Julien

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: Raspberry CM4 to SD-Card via SDIO

Post by mikeysklar »

Julien,

I believe you would use the sdioio library.

https://circuitpython.readthedocs.io/en ... index.html

Code: Select all

Example usage:

import os

import board
import sdioio
import storage

sd = sdioio.SDCard(
    clock=board.SDIO_CLOCK,
    command=board.SDIO_COMMAND,
    data=board.SDIO_DATA,
    frequency=25000000)
vfs = storage.VfsFat(sd)
storage.mount(vfs, '/sd')
os.listdir('/sd')

Locked
Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/

Return to “Adafruit Raspberry Pi® accessories”