0

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/
Please be positive and constructive with your questions and comments.

Raspberry CM4 to SD-Card via SDIO

by JuMu on Mon Jul 26, 2021 11:05 am

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

JuMu
 
Posts: 1
Joined: Mon Jul 26, 2021 10:56 am

Re: Raspberry CM4 to SD-Card via SDIO

by mikeysklar on Mon Jul 26, 2021 9:49 pm

Julien,

I believe you would use the sdioio library.

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

Code: Select all | TOGGLE FULL SIZE
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')

mikeysklar
 
Posts: 5577
Joined: Mon Aug 01, 2016 8:10 pm

Please be positive and constructive with your questions and comments.