Hi Jing Pan,
Thanks for the reply.
Later what i found while doing debug is , BCK clock is not seen properly in the scope.
As per hardware document I2s is connected on PTC1, PTC2,PTC3 on GPIOC.
I have done the configurations as below.
Can you please let me know is this correct way of initilizing the hardware and I2S.
CLOCK_EnableClock(kCLOCK_PortC);
PORT_SetPinMux(PORTC, 1, kPORT_MuxAlt6);
PORT_SetPinMux(PORTC, 2, kPORT_MuxAlt6);
PORT_SetPinMux(PORTC, 3, kPORT_MuxAlt6);
/* Set the system clock dividers in SIM to safe value. */
CLOCK_SetSimSafeDivs();
/* Set MCG to HIRC mode. */
CLOCK_SetMcgliteConfig(&mcgliteConfig_BOARD_BootClockRUN);
/* Set the clock configuration in SIM module. */
CLOCK_SetSimConfig(&simConfig_BOARD_BootClockRUN);
/* Set SystemCoreClock variable. */
SystemCoreClock = 48000000U;
SAI_TxGetDefaultConfig(&config);
SAI_TxInit(DEMO_SAI, &config);
format.bitWidth = kSAI_WordWidth16bits;
format.channel = 0U;
format.sampleRate_Hz = kSAI_SampleRate32KHz;
format.masterClockHz = DEMO_SAI_CLK_FREQ;
format.protocol = config.protocol;
format.stereo = kSAI_MonoLeft;
format.isFrameSyncCompact = false;
SAI_TransferTxCreateHandle(DEMO_SAI, &txHandle, callback, NULL);
mclkSourceClockHz = DEMO_SAI_CLK_FREQ;
//SAI_TransferTxSetFormat(DEMO_SAI, &txHandle, &format, mclkSourceClockHz, format.masterClockHz);
SAI_TransferTxSetFormat(DEMO_SAI, &txHandle, &format, mclkSourceClockHz, 48000000);
temp = (uint32_t)music;
xfer.data = (uint8_t *)temp;
xfer.dataSize = MUSIC_LEN;
SAI_TransferSendNonBlocking(DEMO_SAI, &txHandle, &xfer);