Hi there.
I'm trying to use as many SAI data pins as possible on the RT1176. I am aware that for SAI 1 data channels 2, 3, and 4, the Tx and Rx data lines share a pin, and so can only be assigned to Tx or Rx. Lets try and use all 3 of them all for Tx anyway..
So my configuration is
SAI 1 pins:
- Tx1
- Rx1
- Tx2
- Tx3
- Tx4
Using the config tool, I do this on the 'playback' tab
Then I generate the code and run, but I hit an assert in fsl_sai_edma.c:
#if defined(FSL_FEATURE_SAI_HAS_FIFO_COMBINE_MODE) && FSL_FEATURE_SAI_HAS_FIFO_COMBINE_MODE
/* Allow multi-channel transfer only if FIFO Combine mode is enabled */
assert(
(saiConfig->channelNums <= 1U) ||
((saiConfig->channelNums > 1U) && ((saiConfig->fifo.fifoCombine == kSAI_FifoCombineModeEnabledOnWrite) ||
(saiConfig->fifo.fifoCombine == kSAI_FifoCombineModeEnabledOnReadWrite))));
#endifCombining FIFOs for transmit data channels allows one data channel to use the FIFOs of all enabled channel FIFOs, with identical data output on each enabled data channel.
Combining FIFOs for receive data channels allows one data channel to use the FIFOs of all enabled channel FIFOs, with received data from channel 0 stored into each enabled data channel.
Hello @mttjcksn,
I highly recommend consulting this application note, where the multi-channel functionality is explained in greater detail.
Additionally, the FCOMB register indicates the following:
This means that the FIFO will store data for each enabled channel.
Also, if you exprience any issue, do not hesitate to let me know.
BR
Habib