22.5.5. I2S Slave
22.5.5.1. Overview
I2S slave example shows i2s controller as slave with DMA communicate with master between board and board. I2S slave sends a piece of audio data in a loop to master.
22.5.5.2. Workflow
Configure system audio clock:
Use external MCLK, BCLK and FCLK
Configure I2S Slave:
Set FIFO threshold
Configure DMA request
Configure sample rate and bit width
Configure as slave mode
Configure DMA transfer:
Set source address to audio data buffer
Set destination address to I2S_SLAVE transmit FIFO
Configure source address increment mode
Configure destination address fixed mode
Enable DMA interrupt
Start transfer:
Enable I2S Slave
Start DMA transfer
Send audio data in loop
22.5.5.3. Known Issues
None
22.5.5.4. Board Setting
Connect I2S Pins between the two boards:
Connect Master FCLK with Slave FCLK
Connect Master BCLK with Slave BCLK
Connect Master RXD with Slave TXD
Connect GND together between boards
22.5.5.5. Running the Example
When the example runs successfully:
Terminal output:
I2S Slave Demo
I2S Slave will continuously send audio data to I2S Master
22.5.5.6. Debugging Tips
Check if I2S connections are correct
Verify if DMA transfer is working properly