<?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>Kinetis MicrocontrollersのトピックSAI lock up after receive</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/SAI-lock-up-after-receive/m-p/617742#M36852</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On our KL27 device we have observed that SAI receive transfers will put the SAI peripheral in a certain state that it will not be able to transmit anymore.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have to functions, play() and record() which make repeated calls to SAI_TransferSendDMA() and&amp;nbsp;SAI_TransferReceiveDMA() respectively.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are able to call play() repeatedly, and the audio is transferred to the codec.&lt;/P&gt;&lt;P&gt;We are able to call record() repeatedly, and the audio is received from the codec.&lt;/P&gt;&lt;P&gt;We are able to call record() after play(), &lt;STRONG&gt;but a play() following a record will not work&lt;/STRONG&gt;.&amp;nbsp; No DMA callbacks are invoked, and the FIFO Error Flag (&lt;CODE&gt;I2S0_TCSR:FEF&lt;/CODE&gt;) is set before initiating the transmission and cannot be cleared.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In our configuration TX is in Async mode, and RX is in Sync mode, which is the default configuration for that driver.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have seen other similar discussions on the forums regarding SAI problems.&amp;nbsp; One of them recommended clearing the FIFO error flag before every enable operation, but that did not solve the issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions on how to resolve this issue would be gladly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 14 Jan 2017 22:14:06 GMT</pubDate>
    <dc:creator>javiercardona</dc:creator>
    <dc:date>2017-01-14T22:14:06Z</dc:date>
    <item>
      <title>SAI lock up after receive</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/SAI-lock-up-after-receive/m-p/617742#M36852</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On our KL27 device we have observed that SAI receive transfers will put the SAI peripheral in a certain state that it will not be able to transmit anymore.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have to functions, play() and record() which make repeated calls to SAI_TransferSendDMA() and&amp;nbsp;SAI_TransferReceiveDMA() respectively.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are able to call play() repeatedly, and the audio is transferred to the codec.&lt;/P&gt;&lt;P&gt;We are able to call record() repeatedly, and the audio is received from the codec.&lt;/P&gt;&lt;P&gt;We are able to call record() after play(), &lt;STRONG&gt;but a play() following a record will not work&lt;/STRONG&gt;.&amp;nbsp; No DMA callbacks are invoked, and the FIFO Error Flag (&lt;CODE&gt;I2S0_TCSR:FEF&lt;/CODE&gt;) is set before initiating the transmission and cannot be cleared.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In our configuration TX is in Async mode, and RX is in Sync mode, which is the default configuration for that driver.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have seen other similar discussions on the forums regarding SAI problems.&amp;nbsp; One of them recommended clearing the FIFO error flag before every enable operation, but that did not solve the issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions on how to resolve this issue would be gladly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Jan 2017 22:14:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/SAI-lock-up-after-receive/m-p/617742#M36852</guid>
      <dc:creator>javiercardona</dc:creator>
      <dc:date>2017-01-14T22:14:06Z</dc:date>
    </item>
    <item>
      <title>Re: SAI lock up after receive</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/SAI-lock-up-after-receive/m-p/617743#M36853</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Javier,&lt;/P&gt;&lt;P&gt;Could you paste your project here so that we can have a review for the code?&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Xiangjun Rong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jan 2017 09:24:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/SAI-lock-up-after-receive/m-p/617743#M36853</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2017-01-18T09:24:06Z</dc:date>
    </item>
    <item>
      <title>Re: SAI lock up after receive</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/SAI-lock-up-after-receive/m-p/617744#M36854</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've had the &lt;STRONG&gt;exact same problem&lt;/STRONG&gt;. &amp;nbsp;You need to service both FIFOs in synchronous mode, it sounds like your record is operating synchronously but only reading the RX FIFO while&amp;nbsp;using TX asynchronously. &amp;nbsp;When you run the record the TX FIFO is put in an error state that you don't seem to be resetting. &amp;nbsp;That's why the order&amp;nbsp;matters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's not obvious and not mentioned in the reference manual&amp;nbsp;but makes sense once you think about it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Two ways to solve it for anyone else who stumbles on I2S or SAI hanging:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Mask the other peripheral words if you aren't going to be reading/writing to it (DMA or direct I think) use the I2S_TMR and I2S_RMR registers.&lt;/LI&gt;&lt;LI&gt;Disable the unused FIFO using the RCE and TCE bits.&lt;/LI&gt;&lt;/OL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jan 2017 03:34:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/SAI-lock-up-after-receive/m-p/617744#M36854</guid>
      <dc:creator>2bluesc</dc:creator>
      <dc:date>2017-01-20T03:34:12Z</dc:date>
    </item>
  </channel>
</rss>

