<?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: iMX93 FIFO underruns when using SAI1 on M33 in MCX Microcontrollers</title>
    <link>https://community.nxp.com/t5/MCX-Microcontrollers/iMX93-FIFO-underruns-when-using-SAI1-on-M33/m-p/2417602#M5973</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Unfortunately, we do not have examples in SDK to use CODECs in our SDK.&lt;/P&gt;
&lt;P&gt;You could try to use the examples in SDK as reference and you can find in the next path:&lt;/P&gt;
&lt;P&gt;mcuxsdk\examples\driver_examples\sai&lt;/P&gt;
&lt;P&gt;If you see FIFO underrun warnings, could be caused by an empty TX FIFO because data is not being pushed fast enough or the transmitter is not properly enabled.&lt;/P&gt;
&lt;P&gt;A reason that could be causing this issue is resource availability/configuration. First, I suggest you confirm that you do not have issues where the Cortex-A processor is not using the same resources from Cortex-M that could cause the issue.&lt;/P&gt;
&lt;P&gt;Did you confirm that Transmitter Enable bit from SAI Transmit Control Register (TCSR) register is enable?&lt;/P&gt;
&lt;P&gt;Best regards.&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2026 20:46:32 GMT</pubDate>
    <dc:creator>JorgeCas</dc:creator>
    <dc:date>2026-09-30T20:46:32Z</dc:date>
    <item>
      <title>iMX93 FIFO underruns when using SAI1 on M33</title>
      <link>https://community.nxp.com/t5/MCX-Microcontrollers/iMX93-FIFO-underruns-when-using-SAI1-on-M33/m-p/2417260#M5969</link>
      <description>&lt;P&gt;I'm using SAI1 to drive an external I2S device.&amp;nbsp; 40MHz BCLK, 1.25MHz WCLK.&lt;/P&gt;&lt;P&gt;Boot from Linux, code running on M33 via remoteproc.&lt;/P&gt;&lt;P&gt;Getting FIFO underruns for the SAI1 interface.&lt;/P&gt;&lt;P&gt;Can't figure out why?&lt;/P&gt;&lt;P&gt;Did same code using SAI3 on M33 (A55 was held in uboot) and no problems.&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2026 22:41:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCX-Microcontrollers/iMX93-FIFO-underruns-when-using-SAI1-on-M33/m-p/2417260#M5969</guid>
      <dc:creator>wirelessguy</dc:creator>
      <dc:date>2026-09-29T22:41:37Z</dc:date>
    </item>
    <item>
      <title>Re: iMX93 FIFO underruns when using SAI1 on M33</title>
      <link>https://community.nxp.com/t5/MCX-Microcontrollers/iMX93-FIFO-underruns-when-using-SAI1-on-M33/m-p/2417602#M5973</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Unfortunately, we do not have examples in SDK to use CODECs in our SDK.&lt;/P&gt;
&lt;P&gt;You could try to use the examples in SDK as reference and you can find in the next path:&lt;/P&gt;
&lt;P&gt;mcuxsdk\examples\driver_examples\sai&lt;/P&gt;
&lt;P&gt;If you see FIFO underrun warnings, could be caused by an empty TX FIFO because data is not being pushed fast enough or the transmitter is not properly enabled.&lt;/P&gt;
&lt;P&gt;A reason that could be causing this issue is resource availability/configuration. First, I suggest you confirm that you do not have issues where the Cortex-A processor is not using the same resources from Cortex-M that could cause the issue.&lt;/P&gt;
&lt;P&gt;Did you confirm that Transmitter Enable bit from SAI Transmit Control Register (TCSR) register is enable?&lt;/P&gt;
&lt;P&gt;Best regards.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2026 20:46:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCX-Microcontrollers/iMX93-FIFO-underruns-when-using-SAI1-on-M33/m-p/2417602#M5973</guid>
      <dc:creator>JorgeCas</dc:creator>
      <dc:date>2026-09-30T20:46:32Z</dc:date>
    </item>
    <item>
      <title>Re: iMX93 FIFO underruns when using SAI1 on M33</title>
      <link>https://community.nxp.com/t5/MCX-Microcontrollers/iMX93-FIFO-underruns-when-using-SAI1-on-M33/m-p/2417870#M5977</link>
      <description>&lt;P&gt;I've moved the SAI1 code to the A55 under Linux.&lt;/P&gt;&lt;P&gt;Still getting FIFO errors.&lt;/P&gt;&lt;P&gt;Here are the details of the configuration and questions:&lt;/P&gt;&lt;P&gt;Platform&lt;BR /&gt;Board: i.MX93 EVK; /sys/devices/soc0/soc_id=i.MX93,&lt;BR /&gt;/sys/devices/soc0/revision=1.1. Package marking/mask not yet recorded.&lt;BR /&gt;Linux: 6.12.20-lts-next-gdfaf2136deb2, PREEMPT, A55.&lt;BR /&gt;SAI1 at 0x443b0000, TX via 44000000.dma-controller-CH21.&lt;BR /&gt;SAI1 serial root: 40 MHz from VIDEO_PLL; 40 MHz BCLK, 1.25 MHz frame rate.&lt;BR /&gt;SAI3/WM8962 is Linux-owned and was idle for the reproductions below.&lt;BR /&gt;LMX2571 I2S FSK sink: signed 16-bit code in active slot, zero in other slot.&lt;BR /&gt;Constant code +8500 produces the expected +17 kHz RF offset.&lt;/P&gt;&lt;P&gt;Minimal Linux reproduction (M33 remoteproc offline)&lt;BR /&gt;Custom DTB exposes SAI1 as an ALSA playback device; SAI1 PCM card 0.&lt;BR /&gt;Static ALSA PCM: hw:0,0, S16_LE, 2 channels, 1,250,000 frames/s;&lt;BR /&gt;period 2,400 frames, buffer 19,200 frames. No Gaussian filter or other&lt;BR /&gt;real-time waveform generation. TX FIFO depth 32 words, TX DMA burst 8 words,&lt;BR /&gt;FIFO watermark 24. Static data: slot 0=8500, slot 1=0.&lt;BR /&gt;Command: python3 /root/cp7g_static_playback.py --device hw:0,0 --seconds 600&lt;BR /&gt;Latest result: 750,000,000 frames written in 599.958 s, ALSA xruns=0.&lt;BR /&gt;SAI1 FEF IRQ diagnostic: 1 episode, 9 IRQ entries over 2.685 ms.&lt;BR /&gt;First observed at monotonic uptime about 675.892537 s, approximately&lt;BR /&gt;7.16 s before playback stopped; not an end-of-stream drain event.&lt;/P&gt;&lt;P&gt;First-IRQ instrumentation (timings are after the hardware FEF assertion)&lt;BR /&gt;TCSR=0x90150c01; consecutive time reads=41 ns; handler work before first&lt;BR /&gt;TCSR read=209 ns; first TCSR regmap read=120,607 ns (return 0).&lt;BR /&gt;FEF W1C regmap write=241,007 ns (return 0), before detailed snapshot.&lt;BR /&gt;Post-ACK TFR0=0x00020001, read=242,799 ns.&lt;BR /&gt;Post-ACK eDMA CH21 first raw register read=241,423 ns; total CH21&lt;BR /&gt;snapshot time=487,722 ns. CH_CSR=0x80000005, CH_ES=0x00000000,&lt;BR /&gt;CH_INT=0x00000000, CH_SBR=0x00208003, CH_PRI=0x00000000.&lt;BR /&gt;The TFR0 and CH21 values were sampled after the acknowledgment, not at&lt;BR /&gt;initial FEF assertion. The long reads/writes cannot establish that they&lt;BR /&gt;caused the initial FIFO error; CH_ES=0 only says no channel error was&lt;BR /&gt;latched when sampled. The FEF is a hardware event despite ALSA xruns=0.&lt;/P&gt;&lt;P&gt;Independent simplified firmware reproduction&lt;BR /&gt;With Linux booted and ALSA capture idle, M33 code drove the same SAI1 TX&lt;BR /&gt;using a single self-linked eDMA CH21 TCD, constant +8500 / zero slots,&lt;BR /&gt;no major-loop callbacks, no foreground buffer refill, no Gaussian filter.&lt;BR /&gt;At 40 MHz BCLK, FIFO depth 32, watermark 24, DMA minor loop 16 bytes,&lt;BR /&gt;it stopped on SAI1 FEF after 216 s (Rev R). In the post-FEF fault snapshot,&lt;BR /&gt;CH21_ES=0 and DMA global ES=0; the TCD was still self-linked. Similar faults occurred&lt;BR /&gt;in later priority and internal-BCLK trials. A half-rate trial also failed.&lt;BR /&gt;Thus neither Python nor M33 waveform computation/refill is necessary to&lt;BR /&gt;reproduce the intermittent SAI1 FEF. Linux playback also fails with the&lt;BR /&gt;M33 offline. Probe loading and external wire length changes did not remove&lt;BR /&gt;the problem.&lt;/P&gt;&lt;P&gt;Additional observation&lt;BR /&gt;A burst-4 / watermark-28 Linux run had one FEF episode at uptime about&lt;BR /&gt;676.889 s on a separate boot; the latest burst-8 fault was at 675.893 s.&lt;BR /&gt;A system journal search around 670–682 s in the latest boot found no&lt;BR /&gt;logged activity. Similar uptime is suggestive only, not proof of a timer.&lt;/P&gt;&lt;P&gt;Questions for NXP&lt;BR /&gt;1. Is there a known i.MX93 rev 1.1 mask erratum or low-power/interconnect&lt;BR /&gt;condition that can delay SAI1 and eDMA CH21 register access and/or DMA&lt;BR /&gt;service by 100–250 us while SAI1 TX and its clocks are enabled?&lt;BR /&gt;2. What hardware status, clock-gating, interconnect, or eDMA traces can&lt;BR /&gt;identify the first missed SAI1 FIFO service request before FEF?&lt;BR /&gt;3. Does SAI1 TX FEF indicate any condition other than an actual FIFO&lt;BR /&gt;underrun in this asynchronous master configuration?&lt;BR /&gt;4. Are there documented SAI1/eDMA burst, watermark, or clock constraints&lt;BR /&gt;for continuous 40 MHz BCLK / 1.25 MHz stereo frame output on i.MX93?&lt;/P&gt;&lt;P&gt;Can provide custom DTB, Linux fsl_sai.c/h changes and static playback&lt;BR /&gt;script, M33 self-linked TCD source, full boot clock tree, and scope/RF data.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Oct 2026 16:24:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCX-Microcontrollers/iMX93-FIFO-underruns-when-using-SAI1-on-M33/m-p/2417870#M5977</guid>
      <dc:creator>wirelessguy</dc:creator>
      <dc:date>2026-10-01T16:24:20Z</dc:date>
    </item>
  </channel>
</rss>

