micropython/ports/mimxrt
MikeTeachman 1f6cb8f047 mixmrt/machine_i2s: Add I2S protocol support.
This commit adds support for machine.I2S on the mimxrt port.  The I2S API
is consistent with the existing stm32, esp32, and rp2 implementations.

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>
2022-03-30 14:12:40 +11:00
..
boards mixmrt/machine_i2s: Add I2S protocol support. 2022-03-30 14:12:40 +11:00
hal mimxrt/hal/pwm_backport: Make PWM symmetric, and round division calcs. 2022-03-08 23:11:17 +11:00
lwip_inc
mbedtls mimxrt/mbedtls: Add NULL pointer check in m_free_mbedtls. 2022-03-17 13:11:39 +11:00
modules
Makefile mixmrt/machine_i2s: Add I2S protocol support. 2022-03-30 14:12:40 +11:00
README.md
board_init.c mixmrt/machine_i2s: Add I2S protocol support. 2022-03-30 14:12:40 +11:00
dma_manager.c mixmrt/machine_i2s: Add I2S protocol support. 2022-03-30 14:12:40 +11:00
dma_manager.h mixmrt/machine_i2s: Add I2S protocol support. 2022-03-30 14:12:40 +11:00
eth.c mimxrt/eth: Avoid a race condition for Ethernet. 2022-03-08 23:11:01 +11:00
eth.h
fatfs_port.c
led.c
led.h
machine_adc.c
machine_bitstream.c
machine_i2c.c mimxrt: Replace Pin-config constants by a function call. 2022-01-27 16:53:30 +11:00
machine_i2s.c mixmrt/machine_i2s: Add I2S protocol support. 2022-03-30 14:12:40 +11:00
machine_led.c
machine_pin.c mimxrt/machine_pin: Change pin drive constants to DRIVE_x naming. 2022-03-08 22:30:33 +11:00
machine_pwm.c mimxrt/machine_pin: Change pin drive constants to DRIVE_x naming. 2022-03-08 22:30:33 +11:00
machine_rtc.c
machine_sdcard.c
machine_spi.c mixmrt/machine_i2s: Add I2S protocol support. 2022-03-30 14:12:40 +11:00
machine_timer.c
machine_uart.c mimxrt/machine_pin: Change pin drive constants to DRIVE_x naming. 2022-03-08 22:30:33 +11:00
machine_wdt.c
main.c mixmrt/machine_i2s: Add I2S protocol support. 2022-03-30 14:12:40 +11:00
mimxrt_flash.c
mimxrt_sdram.c
modmachine.c mixmrt/machine_i2s: Add I2S protocol support. 2022-03-30 14:12:40 +11:00
modmachine.h mixmrt/machine_i2s: Add I2S protocol support. 2022-03-30 14:12:40 +11:00
modmimxrt.c
modmimxrt.h
moduos.c mimxrt/moduos: Convert module to use extmod version. 2022-03-09 10:03:23 +11:00
modutime.c
mpconfigport.h mixmrt/machine_i2s: Add I2S protocol support. 2022-03-30 14:12:40 +11:00
mphalport.c mimxrt/boards: Add board files for MIMXRT1015 and MIMXRT1015_EVK. 2022-03-08 23:08:44 +11:00
mphalport.h
mpnetworkport.c
network_lan.c
pendsv.c
pendsv.h
pin.c mimxrt/machine_pin: Change pin drive constants to DRIVE_x naming. 2022-03-08 22:30:33 +11:00
pin.h mimxrt/machine_pin: Change pin drive constants to DRIVE_x naming. 2022-03-08 22:30:33 +11:00
qstrdefsport.h
sdcard.c mixmrt/machine_i2s: Add I2S protocol support. 2022-03-30 14:12:40 +11:00
sdcard.h
systick.c
systick.h
ticks.c
ticks.h
tusb_config.h
tusb_port.c mimxrt: Add USB ID elements. 2022-01-27 17:05:34 +11:00

README.md

Port of MicroPython to NXP iMX RT 10xx

Currently supports Teensy 4.0, Teensy 4.1, and the MIMXRT1010_EVK, MIMXRT1020_EVK, MIMXRT1050_EVK, MIMXRT1060_EVK and MIMXRT1064_EVK boards.

Features:

  • REPL over USB VCP
  • machine.ADC
  • machine.I2C
  • machine.LED
  • machine.Pin
  • machine.PWM
  • machine.RTC
  • machine.SDCard
  • machine.SPI
  • machine.Signal
  • machine.SoftI2C
  • machine.SoftSPI
  • machine.Timer
  • machine.UART
  • LFS2 file system at the internal Flash
  • SDCard support (not on MIMXRT1010_EVK)
  • Ethernet (not on Teensy 4.0 and MIMXRT1010_EVK)

Known issues:

TODO:

  • More peripherals (Counter, I2S, CAN, etc)
  • More Python options