This NXP application note explains how the K32L2B MCU FlexIO module emulates an I2S bus master for audio data transfer.
This application note from NXP describes using the FlexIO peripheral on the K32L2B microcontroller as an I2S audio bus master. The FlexIO module can generate all required I2S bus signals and transfer audio data without significant restrictions in functionality or CPU resources.
The demonstration uses the FRDM-K32L2B Board and the NXP Mic/Audio/Oled Shield (MAO) with the WM8904 audio codec. Audio is recorded at 48.000 kHz, mono, 16-bit resolution, with a 32-bit I2S word size, and stored in the MCU internal flash memory.
| Audio sample rate | 48.000 kHz |
|---|---|
| Audio resolution | 16-bit |
| I2S word size | 32 bit |
| Bit clock frequency | 1.536 MHz |
| Master clock frequency | 12 MHz |
| FlexIO resources | 4 shifters, 4 timers, 8 pins |
The FRDM-K32L2B Board is used for the demonstration.
The WM8904 audio codec IC on the NXP Mic/Audio/Oled Shield (MAO) is used.
FlexIO can emulate UART, I2C, SPI, I2S, and other serial/parallel protocols.
The FlexIO input frequency is the bus clock at 48.000 MHz.