Skip to content
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

Makerfab 7tft has no CS for sdcard operation #9914

Open
mwalimu opened this issue Dec 25, 2024 · 2 comments
Open

Makerfab 7tft has no CS for sdcard operation #9914

mwalimu opened this issue Dec 25, 2024 · 2 comments
Labels

Comments

@mwalimu
Copy link

mwalimu commented Dec 25, 2024

CircuitPython version

Adafruit CircuitPython 9.2.1 on 2024-11-20; MakerFabs-ESP32-S3-Parallel-TFT-With-Touch-7inch with ESP32S3
Board ID:makerfabs_tft7
UID:48CF6E86FA45

Code/REPL

>>> import board
>>> dir(board)
['__class__', '__name__', 'BUTTON', 'DISPLAY', 'GPIO19', 'GPIO20', 'I2C', 'RX', 'SCL', 'SDA', 'SDIO_CLK', 'SDIO_CMD', 'SDIO_D0', 'TFT_BACKLIGHT', 'TFT_PINS', 'TFT_TIMINGS', 'TFT_TIMINGS1024', 'TFT_TIMINGS800', 'TOUCH_RESET', 'TX', '__dict__', 'board_id']
>>>

Behavior

Can't use SD card since there is no chip select defined in "board".

Description

No response

Additional information

CS pin in schematic is IO10

@mwalimu mwalimu added the bug label Dec 25, 2024
@snkYmkrct
Copy link

snkYmkrct commented Dec 26, 2024

@mwalimu
The interface used for the SD card on this board is SDIO, not SPI, so it doesn't need the CS pin.
It's not clear from the schematic, and the documentation wiki is broken, but there are comments in their sdcard code example.

The sdioio module should be used instead of sdcardio , see: https://docs.circuitpython.org/en/latest/shared-bindings/sdioio/index.html and https://learn.adafruit.com/adafruit-microsd-spi-sdio/using-sdioio

@RetiredWizard
Copy link

RetiredWizard commented Dec 26, 2024

I loaded this on the Makerfab 7tft to mount an SD card:

import os, storage, board, sdioio
sd =sdioio.SDCard(clock=board.SDIO_CLK,command=board.SDIO_CMD,data=[board.SDIO_D0],frequency=25000000)
vfs = storage.VfsFat(sd)
storage.mount(vfs,'/sd')
os.listdir('/sd')

Edit: IO10 is used for the screen backlight so using it for an SD card CS would be a problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants