🎁📬❄️📦 Holiday Shipping Deadlines are approaching! International customers and domestic ground - get your orders in 12/9/2020 📦❄️📬🎁
0

Can't find SDIOIO
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Can't find SDIOIO

by Akew9898 on Wed Nov 18, 2020 12:06 pm

I downloaded and installed CP 6.0.0, but I can't find the module SDIOIO anywhere! I've spent hours searching, where is it? Please help!

Akew9898
 
Posts: 16
Joined: Sat Sep 05, 2020 8:27 pm

Re: Can't find SDIOIO

by tannewt on Wed Nov 18, 2020 12:45 pm

It's only available on the STM boards, Spresense, GrandCentral M4 Express and SAME54 Xplained boards. It's only enabled on those because they have the SDIO lines connected.

What board are you trying to use it with?

tannewt
 
Posts: 1922
Joined: Thu Oct 06, 2016 8:48 pm

Re: Can't find SDIOIO

by Akew9898 on Wed Nov 18, 2020 1:15 pm

TEENSY 4.1, which also has native SDIO.
I've bought 2 Adalogger feathers, fried the first one, and while waiting for the second to arrive, I started my project on the Teensy instead.

Akew9898
 
Posts: 16
Joined: Sat Sep 05, 2020 8:27 pm

Re: Can't find SDIOIO

by tannewt on Wed Nov 18, 2020 2:43 pm

Sorry, the iMX RT port that runs on the Teensy doesn't have the `sdioio` module implemented yet.

tannewt
 
Posts: 1922
Joined: Thu Oct 06, 2016 8:48 pm

Re: Can't find SDIOIO

by Akew9898 on Wed Nov 18, 2020 8:44 pm

tannewt wrote:Sorry, the iMX RT port that runs on the Teensy doesn't have the `sdioio` module implemented yet.

Uh, OK, Thanks. I have no idea what iMX RT port is, but I get that it will not work.
I don't understand how to implement SDIO here because they say it's native, but I can't find any circuitpython libraries to use the SD card. Will it work with SPI to write to the SD card? Or should I just switch to the Adalogger I have to make it easiest? I'd appreciate any advice you can give me.

Akew9898
 
Posts: 16
Joined: Sat Sep 05, 2020 8:27 pm

Re: Can't find SDIOIO

by tannewt on Thu Nov 19, 2020 2:41 pm

The iMX RT port is the portion of CircuitPython that adds support for the chip on the Teensy 4.x.

It may work with SPI. Here is an guide about using SD cards with CircuitPython: https://learn.adafruit.com/micropython- ... cuitpython

tannewt
 
Posts: 1922
Joined: Thu Oct 06, 2016 8:48 pm

Re: Can't find SDIOIO

by Akew9898 on Thu Nov 19, 2020 5:19 pm

Thank you! This looks helpful. I was following a similar or related guide before I pursued the SDIO route, but I apparently fried the SD card. Glad I bought a 5-pack! :-) Wish me luck.

Akew9898
 
Posts: 16
Joined: Sat Sep 05, 2020 8:27 pm

Re: Can't find SDIOIO

by Akew9898 on Thu Nov 19, 2020 10:16 pm

Well, I followed the guide, and again, I fried another uSD card. I used the following code:

spi = busio.SPI(board.D45, MOSI=board.D43, MISO=board.D42)
cs = digitalio.DigitalInOut(board.D44)
sdcard = adafruit_sdcard.SDCard(spi, cs)
vfs = storage.VfsFat(sdcard)

When it ran, the error messages below showed (Line 34 is the 3rd line above, "sdcard = ..." )

Traceback (most recent call last):
File "code.py", line 34, in <module>
File "adafruit_sdcard.py", line 116, in __init__
File "adafruit_sdcard.py", line 177, in _init_card
File "adafruit_sdcard.py", line 145, in _init_card
OSError: no SD card

When I took the SD card out and plugged it into my PC with a USB adapter, it takes time to show in Windows, but after clicking the USB drive, Windows says to please insert a disk...
Windows can't access it, SD Card Formatter can't see it, it's there but unuseable.

? I'm at a total loss, just don't understand what's going on.

Akew9898
 
Posts: 16
Joined: Sat Sep 05, 2020 8:27 pm

Re: Can't find SDIOIO

by Akew9898 on Thu Nov 19, 2020 11:48 pm

I think these off-brand cheap SD cards are bad. The 2 I 'fried' did work in Windows before I put them in the Teensy, but 2 more of the 5 exhibit the same failed behavior as the 2 I thought I fried, before I ever used them. Only 1 of the 5 cards actually seems to work in Windows. Who knows???

Akew9898
 
Posts: 16
Joined: Sat Sep 05, 2020 8:27 pm

Please be positive and constructive with your questions and comments.