Hello,
I am running into the error on the RT685 using the audio evaluation kit of kStatus_I2S_Busy when I attempt to transmit data on flexcomm 4. My initialization of this bus is done at boot:
const i2s_config_t FC4_I2S_TX_config = {
.masterSlave = kI2S_MasterSlaveNormalMaster,
.mode = kI2S_ModeDspWsShort,
.rightLow = false,
.leftJust = false,
.sckPol = false,
.wsPol = true,
.divider = 2,
.oneChannel = false,
.dataLength = 32,
.frameLength = 256,
.position = 0,
.watermark = 4,
.txEmptyZero = true,
.pack48 = false
};
dma_handle_t FC4_I2S_TX_TX_Handle;
i2s_dma_handle_t FC4_I2S_Tx_Handle;
static void FC4_I2S_TX_init(void) {
/* Flexcomm I2S initialization */
I2S_TxInit(FC4_I2S_TX_PERIPHERAL, &FC4_I2S_TX_config);
/* Setup secondary channel 1 */
I2S_EnableSecondaryChannel(FC4_I2S_TX_PERIPHERAL, kI2S_SecondaryChannel1, false, 64U);
/* Setup secondary channel 2 */
I2S_EnableSecondaryChannel(FC4_I2S_TX_PERIPHERAL, kI2S_SecondaryChannel2, false, 128U);
/* Setup secondary channel 3 */
I2S_EnableSecondaryChannel(FC4_I2S_TX_PERIPHERAL, kI2S_SecondaryChannel3, false, 192U);
/* Enable the DMA 9 channel in the DMA */
DMA_EnableChannel(FC4_I2S_TX_TX_DMA_BASEADDR, FC4_I2S_TX_TX_DMA_CHANNEL);
/* Set the DMA 9 channel priority */
DMA_SetChannelPriority(FC4_I2S_TX_TX_DMA_BASEADDR, FC4_I2S_TX_TX_DMA_CHANNEL, kDMA_ChannelPriority3);
/* Create the DMA FC4_I2S_TX_TX_Handle handle */
DMA_CreateHandle(&FC4_I2S_TX_TX_Handle, FC4_I2S_TX_TX_DMA_BASEADDR, FC4_I2S_TX_TX_DMA_CHANNEL);
/* Create the I2S DMA handle */
I2S_TxTransferCreateHandleDMA(FC4_I2S_TX_PERIPHERAL, &FC4_I2S_Tx_Handle, &FC4_I2S_TX_TX_Handle, NULL, NULL);
}
Am I doing something wrong here? The clock for FC4 is attached to the audio pll and all of the pins are configured for I2S functionality.