ATOM TF-CARD Kit SPI pins are not default SPI pins?
-
Hi,
I just wanted to ask if the pins used for SD card interface on ATOM TF-CARD Kit are just GPIO pins and they not default SPI pins of ESP32 Pico?
Because I tried to use it with esp-idf and it does not work. Because SD card driver of esp-idf uses default SPI pins.Can you please suggest any way to use ATOM TF-CARD Kit with esp-idf?
Thanks
-
-
How to use the ATOM TF-Card in Python?
I tried to mount the TF-CARD as below with my ATOM Matrix but it when I load my code I get a red cross on the display. (I use cs=21 because it is not used in the ATOM)
import uos
uos.sdconfig(uos.SDMODE_SPI,clk=23,mosi=19,miso=33,cs =21)
uos.mountsd() -
Hello @pieter
this works for me:
from machine import SDCard from machine import Pin import os try: sd = SDCard(slot=3, miso=Pin(33), mosi=Pin(19), sck=Pin(23), cs=Pin(4)) sd.info() os.mount(sd, '/sd') print("SD card mounted at \"/sd\"") except (KeyboardInterrupt, Exception) as e: print('SD mount caught exception {} {}'.format(type(e).__name__, e)) pass print(os.listdir('/sd'))Note: mostly taken from
boot.pyfrom an M5Core2 with modified pin config. CS pin is not really required as the SD card always selected anyways.Thanks
Felix -
@felmue said in ATOM TF-CARD Kit SPI pins are not default SPI pins?:
sd.info()
Hi Felix,
Thanks a lot.
Your solution also works for me.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login