Skip to content

mixmrt/i2s: Add I2S protocol support.#8322

Closed
miketeachman wants to merge 1 commit into
micropython:masterfrom
miketeachman:i2s-mimxrt
Closed

mixmrt/i2s: Add I2S protocol support.#8322
miketeachman wants to merge 1 commit into
micropython:masterfrom
miketeachman:i2s-mimxrt

Conversation

@miketeachman
Copy link
Copy Markdown
Contributor

@miketeachman miketeachman commented Feb 17, 2022

  • I2S API consistent with STM32, ESP32, and RP2 ports
  • I2S features:
    • controller transmit and controller receive
    • 16-bit and 32-bit sample sizes
    • mono and stereo formats
    • sampling frequencies from 8kHz to 48kHz
    • 3 modes of operation:
      • blocking
      • non-blocking with callback
      • uasyncio
    • configurable internal buffer
    • optional MCK
  • tested with the following development boards:
    • MIMXRT1010_EVK, MIMXRT1015_EVK, MIMXRT1020_EVK, MIMXRT1050_EVK
    • Teensy 4.0, Teensy 4.1
    • Olimex RT1010
    • Seeed ARCH MIX
  • tested with the following I2S hardware peripherals:
    • UDA1334
    • GY-SPH0645LM4H
    • WM8960 codec on board the MIMXRT boards and separate breakout board
    • INMP441
    • PCM5102
    • SGTL5000 on the Teensy audio shield
  • mimxrt build metric changes versus master branch: text(+7464), data(+28), bss(+128)
  • mimxrt quickref doc updates are missing and are dependent on mimxrt: Initial documentation for the mimxrt port. #7494 being accepted.
  • this PR is a collaborative effort between myself, @robert-hh, @alphaFred, and @rdagger

- I2S API consistent with STM32, ESP32, and RP2 ports
- I2S features:
  - controller transmit and controller receive
  - 16-bit and 32-bit sample sizes
  - mono and stereo formats
  - sampling frequencies from 8kHz to 48kHz
  - 3 modes of operation:
    - blocking
    - non-blocking with callback
    - uasyncio
  - configurable internal buffer
  - optional MCK
- tested with the following development boards:
  - MIMXRT1010_EVK, MIMXRT1015_EVK, MIMXRT1020_EVK, MIMXRT1050_EVK
  - Teensy 4.0, Teensy 4.1
  - Olimex RT1010
  - Seeed ARCH MIX
- tested with the following I2S hardware peripherals:
  - UDA1334
  - GY-SPH0645LM4H
  - WM8960 codec on board the MIMXRT boards and separate breakout board
  - INMP441
  - PCM5102
  - SGTL5000 on the Teensy audio shield

Signed-off-by: Mike Teachman <mike.teachman@gmail.com>
@dpgeorge
Copy link
Copy Markdown
Member

Thanks for this, it looks good! I tested it on a Teensy 4.0 with the new machine_i2s_rate.py test and it works.

Merged in 1f6cb8f

@dpgeorge dpgeorge closed this Mar 30, 2022
Comment thread ports/mimxrt/pin.c
}

mp_raise_ValueError(MP_ERROR_TEXT("Pin doesn't exist"));
mp_raise_ValueError(MP_ERROR_TEXT("Pin does not exist"));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reverted this change, it should use contracted form to match everywhere else.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The intent was to be more easily understood by users who have English as a 2nd language. I see the point about consistency.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was a commit/PR from a while ago that went through and contracted everything, with the main aim to reduce code size.

@miketeachman
Copy link
Copy Markdown
Contributor Author

Thanks for this, it looks good! I tested it on a Teensy 4.0 with the new machine_i2s_rate.py test and it works.

Merged in 1f6cb8f

Great! Thank you for pulling this in. I'll keep an eye out for the doc PR and then update the quickref for I2S

tannewt pushed a commit to tannewt/circuitpython that referenced this pull request Aug 28, 2023
Unconditionally use sphinx_rtd_theme when building docs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants