<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Using SAI1 to drive 3 audio outputs with 2 TX_Data in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Using-SAI1-to-drive-3-audio-outputs-with-2-TX-Data/m-p/2019822#M232413</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/242687"&gt;@DigitalBrain&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your update information.&lt;/P&gt;
&lt;P&gt;I did a validation on my side, I can set TCE as 0x03, Please refer to what I did.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mayliu1_0-1735265076973.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/317429iA75E7F925AF24C9D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mayliu1_0-1735265076973.png" alt="mayliu1_0-1735265076973.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;1: First , I think you should set your SAI&amp;nbsp; TX DATA1 .&lt;/P&gt;
&lt;P&gt;Please note that the GPIO&amp;nbsp;TX DATA1&amp;nbsp; is not real connect, your code should be based on your customed board. &lt;SPAN&gt;The modified configurations I made are just for giving you a demonstration. Please develop your code strictly base on your customed board.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mayliu1_1-1735265147286.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/317430i08E6F6611D5FBEAF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mayliu1_1-1735265147286.png" alt="mayliu1_1-1735265147286.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2: Second, you need call &lt;SPAN&gt;SAI_TxSetChannelFIFOMask(DEMO_SAI, 0x03) in your project&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;I import SDK demo "evkmimxrt1020_sai_interrupt_transfer" , and use MIMXRT1020-EVK board .&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mayliu1_2-1735265253628.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/317431i7F106471457554E3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mayliu1_2-1735265253628.png" alt="mayliu1_2-1735265253628.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Wish it helps you.&lt;BR /&gt;If you still have question about it, please kindly let me know.&lt;/P&gt;
&lt;P&gt;If you have other question, Please create a new case, Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;mayliu&lt;/P&gt;</description>
    <pubDate>Fri, 27 Dec 2024 02:16:25 GMT</pubDate>
    <dc:creator>mayliu1</dc:creator>
    <dc:date>2024-12-27T02:16:25Z</dc:date>
    <item>
      <title>Using SAI1 to drive 3 audio outputs with 2 TX_Data</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Using-SAI1-to-drive-3-audio-outputs-with-2-TX-Data/m-p/2011263#M231812</link>
      <description>&lt;P&gt;Hello, I'm running RT1024 on a custom board.&lt;BR /&gt;SAI1 is configured as an I2S master to control 1 PCM4104. This DAC is capable of driving 4 output channels, it drives 2 channels per logic state of LRCK:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DigitalBrain_0-1733853392160.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/315122iDF77D912B5180B79/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DigitalBrain_0-1733853392160.png" alt="DigitalBrain_0-1733853392160.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;when LRCK is high, CH1 reproduces whatever comes to DATA0 and CH3 reproduces whatever comes to DATA1.&lt;BR /&gt;&lt;BR /&gt;I'm trying to play sounds taking the "evkmimxrt1024_sai_interrupt_transfer" example and changing SAI3 to SAI1 with the next configuration:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DigitalBrain_1-1733853467091.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/315123iA15EE22402488DFE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DigitalBrain_1-1733853467091.png" alt="DigitalBrain_1-1733853467091.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The routine is as follows:&lt;BR /&gt;-Initialize clocks&lt;BR /&gt;-Initialize SAI1&lt;BR /&gt;-Create SAI_TransferTxCreateHandle&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;STATE_EMITTING_RIGHT&lt;BR /&gt;&lt;/STRONG&gt;-Turn on LED1&lt;BR /&gt;-Configure SAI as left justified, monoright and channel 1 (I leave this channel 1 as the example but don't fully understand why is this value), asynchronous mode, master.&lt;BR /&gt;-Configure the&amp;nbsp;SAI_TransferTxSetConfig&lt;BR /&gt;-Set the BCK with&amp;nbsp;SAI_TxSetBitClockRate&lt;BR /&gt;-Reproduces sound with&amp;nbsp;SAI_TransferSendNonBlocking&lt;BR /&gt;-Turn off LED1&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;STATE_EMITTING_LEFT&lt;BR /&gt;&lt;/STRONG&gt;-Turn on LED2 and LED3&lt;BR /&gt;-Configure SAI as left justified, monoleft and channel 1 (I leave this channel 1 as the example but don't fully understand why is this value), asynchronous mode, master.&lt;BR /&gt;-Configure the&amp;nbsp;SAI_TransferTxSetConfig&lt;BR /&gt;-Set the BCK with&amp;nbsp;SAI_TxSetBitClockRate&lt;BR /&gt;-Reproduces sound with&amp;nbsp;SAI_TransferSendNonBlocking&lt;BR /&gt;-Turn off LED2 and LED3&lt;/P&gt;&lt;P&gt;Then repeats alternating playing sound between left and right.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Results:&lt;/STRONG&gt;&lt;BR /&gt;So far, debugging with MCUxpresso I've been able to reproduce sounds through channel 1 (left) and channel 2 (right).&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Issues:&lt;/STRONG&gt;&lt;BR /&gt;1)This doesn't work all the time, if I try to toggle both LED2 and LED3, the program reproduces 10 times the sound on the left and 9 times on the right and then completely freezes. If I remove writing1&amp;amp;writing0 to LED2 or LED3, the program has no freezing, it alternates reproducing sounds left&amp;amp;right without problem.&lt;BR /&gt;1.1) In order to reproduce sounds, I need to run the program through MCUXpresso debugging mode. If I run the program without it, volume goes very low and it only reproduces sound through monoLeft. This doesn't make any sense to me. I'm using the same code I tested on another custom board with the same RT1024 and the same audio DAC, but using SAI3 instead of SAI1&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;2)I see the audio data coming out from TX_DATA0 but not from TX_DATA1. How could I get data to come out from TX_DATA1 pin too?&lt;BR /&gt;&lt;BR /&gt;I've attached the main programming code files for further detail.&lt;BR /&gt;&lt;BR /&gt;Please, any help would be appreciated!!&lt;BR /&gt;Thanks!!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2024 18:27:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Using-SAI1-to-drive-3-audio-outputs-with-2-TX-Data/m-p/2011263#M231812</guid>
      <dc:creator>DigitalBrain</dc:creator>
      <dc:date>2024-12-10T18:27:48Z</dc:date>
    </item>
    <item>
      <title>Re: Using SAI1 to drive 3 audio outputs with 2 TX_Data</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Using-SAI1-to-drive-3-audio-outputs-with-2-TX-Data/m-p/2012454#M231886</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/242687"&gt;@DigitalBrain&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Thank you for your interest in the NXP MIMXRT product, I would&amp;nbsp; like to provide service for you.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Question:&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;1)This doesn't work all the time, if I try to toggle both LED2 and LED3, the program reproduces 10 times the sound on the left and 9 times on the right and then completely freezes. If I remove writing1&amp;amp;writing0 to LED2 or LED3, the program has no freezing, it alternates reproducing sounds left&amp;amp;right without problem.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Answer:&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;I have download your code, but there are no LED1,LED2,LED3 definition.&lt;/P&gt;
&lt;P&gt;when the project freezing, Please check Register, Fault, Peripherals-&amp;gt;SAI status.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mayliu1_1-1733971150320.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/315496i80D1B187CC237D67/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mayliu1_1-1733971150320.png" alt="mayliu1_1-1733971150320.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;You can also read SAI status in your code project.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mayliu1_2-1733971457550.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/315497i0000F8FAF38951A8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mayliu1_2-1733971457550.png" alt="mayliu1_2-1733971457550.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Question:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;1.1) In order to reproduce sounds, I need to run the program through MCUXpresso debugging mode. If I run the program without it, volume goes very low and it only reproduces sound through monoLeft. This doesn't make any sense to me. I'm using the same code I tested on another custom board with the same RT1024 and the same audio DAC, but using SAI3 instead of SAI1&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;Answer:&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If the volume changed, I suggest you double check Audio format.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;STRONG&gt;Question:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;2)I see the audio data coming out from TX_DATA0 but not from TX_DATA1. How could I get data to come out from TX_DATA1 pin too?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Answer:&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&gt;If you want to use TX_DATA0 and TX_DATA1 of SAI1 , please refer to the content of Section 34.5.1.7 "Transmit Configuration 3 (TCR3)" in the MIMXRT1024RM. You should set the Transmit Enable (TCE) bit in Transmit Configuration 3 (TCR3) when initializing the SAI1.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mayliu1_4-1733972318070.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/315505iEF4CB4D91B3BFF83/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mayliu1_4-1733972318070.png" alt="mayliu1_4-1733972318070.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Wish it helps you.&lt;BR /&gt;If you still have question about it, please kindly let me know.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;mayliu&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Dec 2024 03:06:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Using-SAI1-to-drive-3-audio-outputs-with-2-TX-Data/m-p/2012454#M231886</guid>
      <dc:creator>mayliu1</dc:creator>
      <dc:date>2024-12-12T03:06:29Z</dc:date>
    </item>
    <item>
      <title>Re: Using SAI1 to drive 3 audio outputs with 2 TX_Data</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Using-SAI1-to-drive-3-audio-outputs-with-2-TX-Data/m-p/2018664#M232286</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/239163"&gt;@mayliu1&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;initialization is as follows:&lt;BR /&gt;&lt;BR /&gt;SAI_Init(DEMO_SAI);&lt;BR /&gt;SAI_TransferTxCreateHandle(DEMO_SAI, &amp;amp;txHandle, callback, NULL);&lt;BR /&gt;&lt;STRONG&gt;SAI_TxSetChannelFIFOMask(DEMO_SAI,3);&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;I thought that adding the last line would be enough to transmit through TX_DATA1 but it wasn't. What am I missing?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks!!&lt;/P&gt;</description>
      <pubDate>Mon, 23 Dec 2024 16:59:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Using-SAI1-to-drive-3-audio-outputs-with-2-TX-Data/m-p/2018664#M232286</guid>
      <dc:creator>DigitalBrain</dc:creator>
      <dc:date>2024-12-23T16:59:25Z</dc:date>
    </item>
    <item>
      <title>Re: Using SAI1 to drive 3 audio outputs with 2 TX_Data</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Using-SAI1-to-drive-3-audio-outputs-with-2-TX-Data/m-p/2018826#M232298</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/242687"&gt;@DigitalBrain&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Thanks for your reply.&lt;/P&gt;
&lt;P&gt;Could you check your SAI1 TCR3 register value.&lt;/P&gt;
&lt;P&gt;You can check MCUXpresso IDE -&amp;gt; Peripherals -&amp;gt; SAI1 -&amp;gt; TCR3-&amp;gt;TCE&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mayliu1_1-1735011387354.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/317137i57CF26B68DDC8D3A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mayliu1_1-1735011387354.png" alt="mayliu1_1-1735011387354.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Wish it helps you.&lt;BR /&gt;If you still have question about it, please kindly let me know.&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;mayliu&lt;/P&gt;</description>
      <pubDate>Tue, 24 Dec 2024 03:37:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Using-SAI1-to-drive-3-audio-outputs-with-2-TX-Data/m-p/2018826#M232298</guid>
      <dc:creator>mayliu1</dc:creator>
      <dc:date>2024-12-24T03:37:57Z</dc:date>
    </item>
    <item>
      <title>Re: Using SAI1 to drive 3 audio outputs with 2 TX_Data</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Using-SAI1-to-drive-3-audio-outputs-with-2-TX-Data/m-p/2019699#M232401</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/239163"&gt;@mayliu1&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thanks for your reply. These are the values:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DigitalBrain_0-1735208746335.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/317395iF51D7134D73787FB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DigitalBrain_0-1735208746335.png" alt="DigitalBrain_0-1735208746335.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;TCE is set to 0x1.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Maybe I need to use a different function to transmit through TX_DATA1?&lt;BR /&gt;Currently I'm using:&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;sai_handle_t txHandle = {0};&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;sai_transfer_t xfer;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;SAI_TransferSendNonBlocking(SAI1, &amp;amp;txHandle, &amp;amp;xfer);&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;I understood this function would send the same data at the same time through all the enabled TX_DATA channels. Is it correct?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks!!&lt;/P&gt;</description>
      <pubDate>Thu, 26 Dec 2024 10:52:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Using-SAI1-to-drive-3-audio-outputs-with-2-TX-Data/m-p/2019699#M232401</guid>
      <dc:creator>DigitalBrain</dc:creator>
      <dc:date>2024-12-26T10:52:16Z</dc:date>
    </item>
    <item>
      <title>Re: Using SAI1 to drive 3 audio outputs with 2 TX_Data</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Using-SAI1-to-drive-3-audio-outputs-with-2-TX-Data/m-p/2019701#M232402</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/242687"&gt;@DigitalBrain&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your update information.&lt;/P&gt;
&lt;P&gt;I notice that your TCE is 1,&amp;nbsp; I don't think it is a right value.&lt;/P&gt;
&lt;P&gt;TCE should be 0x03(0b0011) if you want both channel1 and channel 2&amp;nbsp; working.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mayliu1_0-1735211471634.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/317396i8A3AE7780DEF7D59/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mayliu1_0-1735211471634.png" alt="mayliu1_0-1735211471634.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please double check your config function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;mayliu&lt;/P&gt;</description>
      <pubDate>Thu, 26 Dec 2024 11:11:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Using-SAI1-to-drive-3-audio-outputs-with-2-TX-Data/m-p/2019701#M232402</guid>
      <dc:creator>mayliu1</dc:creator>
      <dc:date>2024-12-26T11:11:54Z</dc:date>
    </item>
    <item>
      <title>Re: Using SAI1 to drive 3 audio outputs with 2 TX_Data</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Using-SAI1-to-drive-3-audio-outputs-with-2-TX-Data/m-p/2019708#M232404</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/239163"&gt;@mayliu1&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;That's true. I've set it to 3:&lt;BR /&gt;&lt;STRONG&gt;SAI_TxSetChannelFIFOMask(SAI1,3);&lt;BR /&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DigitalBrain_0-1735213166427.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/317397i1A4FF070DD98E69E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DigitalBrain_0-1735213166427.png" alt="DigitalBrain_0-1735213166427.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;but after executing the function, the register gets set to 0x1 instead of 0x3.&lt;BR /&gt;&lt;BR /&gt;For some reason, I'm not being able to set it to 0x3&lt;/P&gt;</description>
      <pubDate>Thu, 26 Dec 2024 11:40:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Using-SAI1-to-drive-3-audio-outputs-with-2-TX-Data/m-p/2019708#M232404</guid>
      <dc:creator>DigitalBrain</dc:creator>
      <dc:date>2024-12-26T11:40:48Z</dc:date>
    </item>
    <item>
      <title>Re: Using SAI1 to drive 3 audio outputs with 2 TX_Data</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Using-SAI1-to-drive-3-audio-outputs-with-2-TX-Data/m-p/2019715#M232405</link>
      <description>&lt;P&gt;Furthermore, even placing the value directly to 0x3 gets 0x1 as result&lt;BR /&gt;&lt;BR /&gt;void SAI_TxSetChannelFIFOMask(I2S_Type *base, uint8_t mask)&lt;BR /&gt;{&lt;BR /&gt;base-&amp;gt;TCR3 &amp;amp;= ~I2S_TCR3_TCE_MASK;&lt;BR /&gt;base-&amp;gt;TCR3 |= I2S_TCR3_TCE(&lt;STRONG&gt;0x3&lt;/STRONG&gt;);&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Dec 2024 12:06:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Using-SAI1-to-drive-3-audio-outputs-with-2-TX-Data/m-p/2019715#M232405</guid>
      <dc:creator>DigitalBrain</dc:creator>
      <dc:date>2024-12-26T12:06:44Z</dc:date>
    </item>
    <item>
      <title>Re: Using SAI1 to drive 3 audio outputs with 2 TX_Data</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Using-SAI1-to-drive-3-audio-outputs-with-2-TX-Data/m-p/2019822#M232413</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/242687"&gt;@DigitalBrain&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your update information.&lt;/P&gt;
&lt;P&gt;I did a validation on my side, I can set TCE as 0x03, Please refer to what I did.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mayliu1_0-1735265076973.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/317429iA75E7F925AF24C9D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mayliu1_0-1735265076973.png" alt="mayliu1_0-1735265076973.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;1: First , I think you should set your SAI&amp;nbsp; TX DATA1 .&lt;/P&gt;
&lt;P&gt;Please note that the GPIO&amp;nbsp;TX DATA1&amp;nbsp; is not real connect, your code should be based on your customed board. &lt;SPAN&gt;The modified configurations I made are just for giving you a demonstration. Please develop your code strictly base on your customed board.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mayliu1_1-1735265147286.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/317430i08E6F6611D5FBEAF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mayliu1_1-1735265147286.png" alt="mayliu1_1-1735265147286.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2: Second, you need call &lt;SPAN&gt;SAI_TxSetChannelFIFOMask(DEMO_SAI, 0x03) in your project&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;I import SDK demo "evkmimxrt1020_sai_interrupt_transfer" , and use MIMXRT1020-EVK board .&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mayliu1_2-1735265253628.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/317431i7F106471457554E3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mayliu1_2-1735265253628.png" alt="mayliu1_2-1735265253628.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Wish it helps you.&lt;BR /&gt;If you still have question about it, please kindly let me know.&lt;/P&gt;
&lt;P&gt;If you have other question, Please create a new case, Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;mayliu&lt;/P&gt;</description>
      <pubDate>Fri, 27 Dec 2024 02:16:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Using-SAI1-to-drive-3-audio-outputs-with-2-TX-Data/m-p/2019822#M232413</guid>
      <dc:creator>mayliu1</dc:creator>
      <dc:date>2024-12-27T02:16:25Z</dc:date>
    </item>
    <item>
      <title>Re: Using SAI1 to drive 3 audio outputs with 2 TX_Data</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Using-SAI1-to-drive-3-audio-outputs-with-2-TX-Data/m-p/2020008#M232429</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/239163"&gt;@mayliu1&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thanks for your input!&lt;BR /&gt;&lt;BR /&gt;Could you please&amp;nbsp; show me the value you set for DEMO_SAI_CHANNEL?&lt;BR /&gt;&lt;BR /&gt;If I do the following:&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;#define DEMO_SAI_CHANNEL (0) //Now it doesn't matter as 3 is being hardcoded&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;SAI_TxSetChannelFIFOMask(DEMO_SAI,5);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;SAI_GetLeftJustifiedConfig(&amp;amp;saiConfig, DEMO_AUDIO_BIT_WIDTH, kSAI_MonoRight,3);&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;The register sets to 3, seems like the value that matters is the sent on SAI_GetLeftJustifiedConfig&lt;BR /&gt;&lt;BR /&gt;Also, how is it possible to select the data to transfer through TX_DATA0 and TX_DATA1 ?&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 27 Dec 2024 09:34:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Using-SAI1-to-drive-3-audio-outputs-with-2-TX-Data/m-p/2020008#M232429</guid>
      <dc:creator>DigitalBrain</dc:creator>
      <dc:date>2024-12-27T09:34:43Z</dc:date>
    </item>
    <item>
      <title>Re: Using SAI1 to drive 3 audio outputs with 2 TX_Data</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Using-SAI1-to-drive-3-audio-outputs-with-2-TX-Data/m-p/2020040#M232432</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/242687"&gt;@DigitalBrain&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think&amp;nbsp;&lt;SPAN&gt;DEMO_SAI_CHANNEL depend on your needs, what I show you is just a demo.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You can also set&amp;nbsp;saiChannelMask, this param can also set multiple SAI channel.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mayliu1_1-1735296067458.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/317494i6A3CC7B5CA4B49F3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mayliu1_1-1735296067458.png" alt="mayliu1_1-1735296067458.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;function -&amp;gt; SAI_TransferTxSetConfig will call&amp;nbsp;SAI_TxSetConfig&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mayliu1_2-1735296153019.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/317495iA67E04A381FB49A1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mayliu1_2-1735296153019.png" alt="mayliu1_2-1735296153019.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;In&amp;nbsp;&lt;SPAN&gt;SAI_TxSetConfig function ,&amp;nbsp;saiChannelMask&amp;nbsp; set TCR3 register.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;BR&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;mayliu&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Dec 2024 10:45:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Using-SAI1-to-drive-3-audio-outputs-with-2-TX-Data/m-p/2020040#M232432</guid>
      <dc:creator>mayliu1</dc:creator>
      <dc:date>2024-12-27T10:45:00Z</dc:date>
    </item>
    <item>
      <title>Re: Using SAI1 to drive 3 audio outputs with 2 TX_Data</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Using-SAI1-to-drive-3-audio-outputs-with-2-TX-Data/m-p/2024222#M232795</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/239163"&gt;@mayliu1&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thanks for your reply!!&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;For example, is it necessary to reconfigure all each time I want to transmit through audio jack1, audiojack2 audiojack3?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Right now, I need to run all of this routine each time I want to transmit through a jack:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;SAI_GetLeftJustifiedConfig(&amp;amp;saiConfig, AUDIO_BIT_WIDTH, &lt;STRONG&gt;kSAI_MonoRight&lt;/STRONG&gt;,&lt;STRONG&gt;kSAI_Channel0Mask&lt;/STRONG&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;saiConfig.syncMode&amp;nbsp; &amp;nbsp; = SAI_TX_SYNC_MODE;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;saiConfig.masterSlave = SAI_MASTER_SLAVE;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SAI_TransferTxSetConfig(SAI_MODULE, &amp;amp;txHandle, &amp;amp;saiConfig);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;/* set bit clock divider */&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SAI_TxSetBitClockRate(SAI_MODULE, AUDIO_MASTER_CLOCK, AUDIO_SAMPLE_RATE, AUDIO_BIT_WIDTH,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; AUDIO_DATA_CHANNEL);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;GPIO_PinWrite(BOARD_INITPINS_LED_IZDA_GPIO, BOARD_INITPINS_LED_IZDA_PIN, 1);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;/*&amp;nbsp; xfer structure */&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;temp&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = (uint32_t)music;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;xfer.data&amp;nbsp; &amp;nbsp; &amp;nbsp;= (uint8_t *)temp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;xfer.dataSize = MUSIC_LEN;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;isFinished = false;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;status_t result_IZDA = SAI_TransferSendNonBlocking(SAI_MODULE, &amp;amp;txHandle, &amp;amp;xfer);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;/* Wait until finished */&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;while (isFinished != true)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;GPIO_PinWrite(BOARD_INITPINS_LED_IZDA_GPIO, BOARD_INITPINS_LED_IZDA_PIN, 0);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;delay_msec(800);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Then, if I want to transmit through audiojack 2 I do all the same just changing&amp;nbsp;&lt;STRONG&gt;kSAI_MonoRight&lt;/STRONG&gt;&amp;nbsp;to &lt;STRONG&gt;kSAI_MonoLeft.&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;And finally, if I want to transmit through audiojack3 (this is the one connected to TX_DATA1) I do all the same changing to&amp;nbsp;&lt;STRONG&gt;kSAI_MonoLeft, kSAI_Channel1Mask&lt;/STRONG&gt; . This time kSAI_Channel1Mask because (as far as I understand) will transmit through TX_DATA1&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks!!&lt;/DIV&gt;</description>
      <pubDate>Wed, 08 Jan 2025 17:54:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Using-SAI1-to-drive-3-audio-outputs-with-2-TX-Data/m-p/2024222#M232795</guid>
      <dc:creator>DigitalBrain</dc:creator>
      <dc:date>2025-01-08T17:54:04Z</dc:date>
    </item>
    <item>
      <title>Re: Using SAI1 to drive 3 audio outputs with 2 TX_Data</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Using-SAI1-to-drive-3-audio-outputs-with-2-TX-Data/m-p/2025714#M232864</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/242687"&gt;@DigitalBrain&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your update information.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Sorry I don't know the corresponding relationship between audio jack1, audiojack2 ,jack3&amp;nbsp; with your SAI interface.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;But I can tell you that&amp;nbsp;SAI_GetClassicI2SConfig, SAI_GetLeftJustifiedConfig, SAI_GetRightJustifiedConfig all can support 2 slot.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Please modify your code, set sai_mono_stereo_t as kSAI_Stereo.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mayliu1_0-1736504277923.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/318960i5F2B69DDFD3B5322/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mayliu1_0-1736504277923.png" alt="mayliu1_0-1736504277923.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I also suggest you can refer to this link.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.nxp.com/docs/en/application-note/AN12090.pdf" target="_blank"&gt;https://www.nxp.com/docs/en/application-note/AN12090.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;If you still have question, Please create a new case, I will do my best to help you.&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;mayliu&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2025 10:21:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Using-SAI1-to-drive-3-audio-outputs-with-2-TX-Data/m-p/2025714#M232864</guid>
      <dc:creator>mayliu1</dc:creator>
      <dc:date>2025-01-10T10:21:51Z</dc:date>
    </item>
    <item>
      <title>Re: Using SAI1 to drive 3 audio outputs with 2 TX_Data</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Using-SAI1-to-drive-3-audio-outputs-with-2-TX-Data/m-p/2028456#M233029</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/239163"&gt;@mayliu1&lt;/a&gt;&amp;nbsp;!!&lt;BR /&gt;&lt;BR /&gt;I've checked your previous answer as the solution as now data comes out through TX_DATA1. Also, I'll create a new case to troubleshoot the actual control of the data as suggested&lt;BR /&gt;&lt;BR /&gt;Thanks again!!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jan 2025 17:09:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Using-SAI1-to-drive-3-audio-outputs-with-2-TX-Data/m-p/2028456#M233029</guid>
      <dc:creator>DigitalBrain</dc:creator>
      <dc:date>2025-01-15T17:09:25Z</dc:date>
    </item>
  </channel>
</rss>

