<?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>S32KのトピックS32K146 LPUART EDMA failed</title>
    <link>https://community.nxp.com/t5/S32K/S32K146-LPUART-EDMA-failed/m-p/956904#M5318</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi expert,&lt;/P&gt;&lt;P&gt;I have a problem, I use lpuart module of S32K146 to implement&amp;nbsp;UART transfer&amp;nbsp;function between Modem and MCU.&lt;/P&gt;&lt;P&gt;I Set the uart parameter: Baud Rate 230400, No parity, Stop Bit 1, 8 bit per char, DMA, using edmaController1, Rx DMA Channel 1, Tx DMA Channel 0.&lt;/P&gt;&lt;P&gt;Then i test&amp;nbsp;the data transfer(MCU Send and Receive Data), after&amp;nbsp;about 1 hour testing, the&amp;nbsp;Programm will Crash&amp;nbsp;in LPUART_SetReceiverCmd(base, false) , the LPUART CTRL Register bit RE is set&amp;nbsp; to 0(false), but when crash happend, i read its value is 1.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The while loop below can not break out:&lt;/P&gt;&lt;P&gt;static inline void LPUART_SetReceiverCmd(LPUART_Type * base, bool enable)&lt;/P&gt;&lt;P&gt;{&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;base-&amp;gt;CTRL = (base-&amp;gt;CRTL &amp;amp; ~LPUART_CTRL_RE_MASK) | ((enable ? 1UL : UL) &amp;lt;&amp;lt; LPUART_CTRL_RE_SHIFT);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;while((bool)((base-&amp;gt;CTRL &amp;amp; LPUART_CTRL_RE_MASK) != 0U) != enable){} //crash point loop can not break out.&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;I reaad the LPUART CTRL Register bits ORIE, NEIE, FEIE, PEIE, all of the 4 bit is 1.&lt;/P&gt;&lt;P&gt;I check the crash stack, find that:&lt;/P&gt;&lt;P&gt;EDMA_DRV_IRQHanler()&amp;nbsp; -&amp;gt; LPUART_DRV_RxDmaCallback() -&amp;gt; LPUART_DRV_StopRxDma().&lt;/P&gt;&lt;P&gt;In LPUART_DRV_RxDmaCallback()&amp;nbsp; it goes to the else branch to call StopRxDma function.&amp;nbsp;&lt;/P&gt;&lt;P&gt;if(lpuartState-&amp;gt;rxSize &amp;gt;0)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;............&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;LPUART_DRV_StopRxDma(instance);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;......&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;I want to know why in function LPUART_SetReceiverCmd(base, false);&lt;/P&gt;&lt;P&gt;Code:&amp;nbsp;base-&amp;gt;CTRL = (base-&amp;gt;CRTL &amp;amp; ~LPUART_CTRL_RE_MASK) | ((enable ? 1UL : UL) &amp;lt;&amp;lt; LPUART_CTRL_RE_SHIFT);already&amp;nbsp;set RE&amp;nbsp;bit to 0, but its value&amp;nbsp;keeps 1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;which cause the &amp;nbsp;while loop next line cannot break out.&lt;/P&gt;&lt;P&gt;What condition&amp;nbsp; can cause&amp;nbsp;the set register RE bit action fail?&lt;/P&gt;&lt;P&gt;How to fix the bug?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 Aug 2019 08:31:31 GMT</pubDate>
    <dc:creator>317336284</dc:creator>
    <dc:date>2019-08-06T08:31:31Z</dc:date>
    <item>
      <title>S32K146 LPUART EDMA failed</title>
      <link>https://community.nxp.com/t5/S32K/S32K146-LPUART-EDMA-failed/m-p/956904#M5318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi expert,&lt;/P&gt;&lt;P&gt;I have a problem, I use lpuart module of S32K146 to implement&amp;nbsp;UART transfer&amp;nbsp;function between Modem and MCU.&lt;/P&gt;&lt;P&gt;I Set the uart parameter: Baud Rate 230400, No parity, Stop Bit 1, 8 bit per char, DMA, using edmaController1, Rx DMA Channel 1, Tx DMA Channel 0.&lt;/P&gt;&lt;P&gt;Then i test&amp;nbsp;the data transfer(MCU Send and Receive Data), after&amp;nbsp;about 1 hour testing, the&amp;nbsp;Programm will Crash&amp;nbsp;in LPUART_SetReceiverCmd(base, false) , the LPUART CTRL Register bit RE is set&amp;nbsp; to 0(false), but when crash happend, i read its value is 1.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The while loop below can not break out:&lt;/P&gt;&lt;P&gt;static inline void LPUART_SetReceiverCmd(LPUART_Type * base, bool enable)&lt;/P&gt;&lt;P&gt;{&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;base-&amp;gt;CTRL = (base-&amp;gt;CRTL &amp;amp; ~LPUART_CTRL_RE_MASK) | ((enable ? 1UL : UL) &amp;lt;&amp;lt; LPUART_CTRL_RE_SHIFT);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;while((bool)((base-&amp;gt;CTRL &amp;amp; LPUART_CTRL_RE_MASK) != 0U) != enable){} //crash point loop can not break out.&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;I reaad the LPUART CTRL Register bits ORIE, NEIE, FEIE, PEIE, all of the 4 bit is 1.&lt;/P&gt;&lt;P&gt;I check the crash stack, find that:&lt;/P&gt;&lt;P&gt;EDMA_DRV_IRQHanler()&amp;nbsp; -&amp;gt; LPUART_DRV_RxDmaCallback() -&amp;gt; LPUART_DRV_StopRxDma().&lt;/P&gt;&lt;P&gt;In LPUART_DRV_RxDmaCallback()&amp;nbsp; it goes to the else branch to call StopRxDma function.&amp;nbsp;&lt;/P&gt;&lt;P&gt;if(lpuartState-&amp;gt;rxSize &amp;gt;0)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;............&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;LPUART_DRV_StopRxDma(instance);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;......&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;I want to know why in function LPUART_SetReceiverCmd(base, false);&lt;/P&gt;&lt;P&gt;Code:&amp;nbsp;base-&amp;gt;CTRL = (base-&amp;gt;CRTL &amp;amp; ~LPUART_CTRL_RE_MASK) | ((enable ? 1UL : UL) &amp;lt;&amp;lt; LPUART_CTRL_RE_SHIFT);already&amp;nbsp;set RE&amp;nbsp;bit to 0, but its value&amp;nbsp;keeps 1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;which cause the &amp;nbsp;while loop next line cannot break out.&lt;/P&gt;&lt;P&gt;What condition&amp;nbsp; can cause&amp;nbsp;the set register RE bit action fail?&lt;/P&gt;&lt;P&gt;How to fix the bug?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Aug 2019 08:31:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K146-LPUART-EDMA-failed/m-p/956904#M5318</guid>
      <dc:creator>317336284</dc:creator>
      <dc:date>2019-08-06T08:31:31Z</dc:date>
    </item>
    <item>
      <title>Re: S32K146 LPUART EDMA failed</title>
      <link>https://community.nxp.com/t5/S32K/S32K146-LPUART-EDMA-failed/m-p/956905#M5319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Xiaoyu,&lt;/P&gt;&lt;P&gt;When RE is written to 0, this register bit will read as 1 until the receiver finishes receiving the current character.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you, please, check the LPUART Status Register (STAT) when the issue occurs?&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Diana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Aug 2019 10:43:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K146-LPUART-EDMA-failed/m-p/956905#M5319</guid>
      <dc:creator>dianabatrlova</dc:creator>
      <dc:date>2019-08-14T10:43:31Z</dc:date>
    </item>
  </channel>
</rss>

