atsamd icon indicating copy to clipboard operation
atsamd copied to clipboard

I2S Support

Open ane opened this issue 5 years ago • 10 comments

ATSAMD21/51 both support I2S. Is there a plan to add this to the HAL?

edit: should this issue be named "Implement I2S abstraction"?

Unless I'm mistaken, there is no standard embedded-hal trait for I2S just yet.

ane avatar May 20 '19 13:05 ane

Yeah, there's a lot of peripherals we don't support yet. Even basic stuff like ADCs and DACs, which should probably take priority over I2S. PRs are always welcome, It won't be on the top of my todo list for quite some time.

sajattack avatar May 20 '19 22:05 sajattack

I figured as much. I have a MEMS I2S microphone breakout board and a bunch of ATSAMD boards from Adafruit lying around so I'll see if I can write something like this for the STM32F429. I also have an analog mic as well so maybe I'll take a look at ADC as well.

ane avatar May 21 '19 10:05 ane

I've worked on ADC here https://github.com/atsamd-rs/atsamd/pull/56

sajattack avatar May 21 '19 10:05 sajattack

Cool! Are you making good progress with it?

I guess I'll see what I can come up with regarding I2S.

ane avatar May 21 '19 10:05 ane

It's done for SAMD51, not started for SAMD21, I've been working on other things lately.

sajattack avatar May 21 '19 10:05 sajattack

I've started on the I2S peripheral - the project that prompted the work is for TDM, but the differences from I2S (and maybe PDM) look fairly minor. https://github.com/ianrrees/samd-i2s

ianrrees avatar Nov 14 '20 01:11 ianrrees

I've moved the I2S work to a branch in my fork here, and have ordered an I2S DAC board and a couple PDM mics to make up a couple examples with.

ianrrees avatar Jun 28 '21 00:06 ianrrees

Hi, I would be highly interested in I²S support for the ATSAMD51J. If there is any interest in contributing to the HAL instead of me writing a custom solution for my custom problem, I would gladly help and take a look at @ianrrees code.

backtail avatar Jul 08 '23 22:07 backtail

I'm happy to answer any questions, though my memory is a bit fuzzy and the project that prompted me to work on this seems perpetually stuck in the near future at work...

ianrrees avatar Jul 09 '23 08:07 ianrrees

Thank you very much for your help! There is a PCB with an ATMSAMD51J20 and an off-the-shelf codec as my next project in the making (for work). Once hardware development is finished and the PCB is on my desk, I'll let you know!

backtail avatar Jul 10 '23 19:07 backtail