Hello @mayliu1
Thanks for your reply!!
Utilizing kSAI_Channel#Mask got me to transmit data through TX_DATA1, however I'm wondering how is it possible to control which data is sent to each of the TX_DATAX.
For example, is it necessary to reconfigure all each time I want to transmit through audio jack1, audiojack2 audiojack3?
Right now, I need to run all of this routine each time I want to transmit through a jack:
SAI_GetLeftJustifiedConfig(&saiConfig, AUDIO_BIT_WIDTH, kSAI_MonoRight,kSAI_Channel0Mask);
saiConfig.syncMode = SAI_TX_SYNC_MODE;
saiConfig.masterSlave = SAI_MASTER_SLAVE;
SAI_TransferTxSetConfig(SAI_MODULE, &txHandle, &saiConfig);
/* set bit clock divider */
SAI_TxSetBitClockRate(SAI_MODULE, AUDIO_MASTER_CLOCK, AUDIO_SAMPLE_RATE, AUDIO_BIT_WIDTH,
AUDIO_DATA_CHANNEL);
GPIO_PinWrite(BOARD_INITPINS_LED_IZDA_GPIO, BOARD_INITPINS_LED_IZDA_PIN, 1);
/* xfer structure */
temp = (uint32_t)music;
xfer.data = (uint8_t *)temp;
xfer.dataSize = MUSIC_LEN;
isFinished = false;
status_t result_IZDA = SAI_TransferSendNonBlocking(SAI_MODULE, &txHandle, &xfer);
/* Wait until finished */
while (isFinished != true)
{
}
GPIO_PinWrite(BOARD_INITPINS_LED_IZDA_GPIO, BOARD_INITPINS_LED_IZDA_PIN, 0);
delay_msec(800);
Then, if I want to transmit through audiojack 2 I do all the same just changing kSAI_MonoRight to kSAI_MonoLeft.
And finally, if I want to transmit through audiojack3 (this is the one connected to TX_DATA1) I do all the same changing to kSAI_MonoLeft, kSAI_Channel1Mask . This time kSAI_Channel1Mask because (as far as I understand) will transmit through TX_DATA1
Thanks!!