0

I2S + SDHC/SDIO on any SAMD51 MCU board?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

I2S + SDHC/SDIO on any SAMD51 MCU board?

by jonlab on Fri Jul 23, 2021 5:19 am

Hi there!

I am working on a project where I need to be able to play many simultaneous wav files (up to 12) from a MCU.
My plan is to stream several wav files from micro SD card (using high speed SDIO) mix them on board (simple summing and filtering) and send a stereo mix over I2S to a codec breakout board such as the UDA1334A : https://www.adafruit.com/product/3678.

According to my preliminary tests, I really need SDIO: simple SPI SD card access gives speeds of 300 to 500 kB/s while SDIO gives sustainable 4 MB/s (with 12 streams in parallel) and even up to 15 MB with contiguous blocks access). So I could definitely stream from the SD card, and send a stream to I2S using DMA.

I am currently evalutating teensy boards (3.5, 4.0, 4.1) but I think that SAMD51 / m4 boards could also fit the need (and I like this architecture). But having I2S and SDIO signals on one of the SAMD51/m4 boards (feather m4 express, metro m4 express, Grand central m4 express) seems to be quite a challenge...

Looking on the samd51 datasheet, it seems that I would need many multiplexed signals, to summarize:

SDHC0 (on PA08 to PA11 and PB10 to PB13) or SDHC1 (on PA20/PA21 and PB16 to PB21)
and
I2S which is to be found on the same ports than SDHC0.

First, the only board that seems to breakout the most pins is the grand central.

But additionnaly, the grand central uses PA08 to PA11 and also PB10/11 for onboard FLASH.

So there seems to be 2 solutions:
SDHC1 + I2S : but in this case there seems to be a collision (I would need I2S and SDHC1 signal on this pin) on PA21 and there is the onboard flash that takes PA08 to PA11 and PB10 that I would need for I2S.
SDHC0 + I2S : no collisions but then the onboard FLASH takes PA08 to PA11 and also PB10/11 that I would need for SDHC0.

So my conclusion is that I can't use a standard Adafruit m4 board for this.
Is there anything I am missing? Would there be a way to easily disconnect the onboard FLASH? (apart from desoldering it)
Do I have to make my own samd51/m4 board design, maybe starting from on of the standard boards? Any tricks or tips?
Ideally I would like to go on the smallest board that fit this need (I also need I2C and a couple of additional generic I/O).

Thanks for any advices !
Jonathan.

jonlab
 
Posts: 47
Joined: Mon Jun 03, 2013 4:15 am

Re: I2S + SDHC/SDIO on any SAMD51 MCU board?

by jonlab on Sat Jul 24, 2021 3:43 am

I am looking at modifying the Metro express m4 design according to the attached png (changes in blue). So basically I would remove the SPI onboard Flash and replace by a SD card SDIO interface.
Attachments
adafruit_metro_express_m4_annotated_I2S_SDHC0.png
adafruit_metro_express_m4_annotated_I2S_SDHC0.png (109.92 KiB) Viewed 73 times

jonlab
 
Posts: 47
Joined: Mon Jun 03, 2013 4:15 am

Please be positive and constructive with your questions and comments.