47.5.12.1 Audio at Start Up
This section describes how the Audio Protocol behaves immediately after startup. Audio startup is defined as AUDEN = 1 and the ON bit being written from a 0 to a 1.
After startup, when configured for Client Mode, the SPI drives zeros out of SDO but does not send data out or in (SDI) until it receives the leading edge of LRC (i.e. the edge that precedes the left channel). Once it receives the leading edge of LRC, it starts receiving data (if DISSDI = 0). If there is no data in the TX FIFO, the I2S continues to transmit zeros.
After audio startup, when configured for Host Mode, the SPI drives the leading edge of LRC and SCK within 1 SCK period. If the TX FIFO is empty the SPI continues to transmit zeros.
For either Client or Host Mode, the SPI does not generate an underrun on the TX FIFO after startup. This allows software to setup the SPI, setup the DMA, turn on the SPI’s Audio Protocol and then turn on the DMA without getting an error. After the first write to the TX FIFO (SPIxBUF), the SPI enables underrun detection and generation.
Also, to keep the RX FIFO empty until the DMA is enabled, set DISSDI = 1. After enabling the DMA, set DISSDI = 0 to start receiving.