<?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のトピックInterrupt UART problem</title>
    <link>https://community.nxp.com/t5/S32K/Interrupt-UART-problem/m-p/1525908#M17866</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Before I work on S32K146.&lt;/P&gt;&lt;P&gt;I have an issue with UART's interruption, let me explain you the topic:&lt;/P&gt;&lt;P&gt;the UART behavior is perfect, in reception and transmission, and the interruption is correct too.&lt;/P&gt;&lt;P&gt;But when I have a glitch on Tx pin (only one glitch not other data), it generates an interruption, but when the SW goes out interruption, it comes back directly in this interruption, and this continously up to the watchdog reset the µc.&lt;/P&gt;&lt;P&gt;I do not understand why because the interruption is always called because just before out the interruption I refresh the STATUS register like this&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;EM&gt;LPUART0-&amp;gt;STAT = FEATURE_LPUART_STAT_REG_FLAGS_MASK;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;with&amp;nbsp;&lt;EM&gt;FEATURE_LPUART_STAT_REG_FLAGS_MASK &amp;nbsp;= 0xC01FC000&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;as described in the datasheet&lt;/P&gt;&lt;P&gt;So do you konw why and what's happen ?&lt;/P&gt;</description>
    <pubDate>Wed, 21 Sep 2022 13:30:29 GMT</pubDate>
    <dc:creator>Sebast</dc:creator>
    <dc:date>2022-09-21T13:30:29Z</dc:date>
    <item>
      <title>Interrupt UART problem</title>
      <link>https://community.nxp.com/t5/S32K/Interrupt-UART-problem/m-p/1525908#M17866</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Before I work on S32K146.&lt;/P&gt;&lt;P&gt;I have an issue with UART's interruption, let me explain you the topic:&lt;/P&gt;&lt;P&gt;the UART behavior is perfect, in reception and transmission, and the interruption is correct too.&lt;/P&gt;&lt;P&gt;But when I have a glitch on Tx pin (only one glitch not other data), it generates an interruption, but when the SW goes out interruption, it comes back directly in this interruption, and this continously up to the watchdog reset the µc.&lt;/P&gt;&lt;P&gt;I do not understand why because the interruption is always called because just before out the interruption I refresh the STATUS register like this&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;EM&gt;LPUART0-&amp;gt;STAT = FEATURE_LPUART_STAT_REG_FLAGS_MASK;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;with&amp;nbsp;&lt;EM&gt;FEATURE_LPUART_STAT_REG_FLAGS_MASK &amp;nbsp;= 0xC01FC000&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;as described in the datasheet&lt;/P&gt;&lt;P&gt;So do you konw why and what's happen ?&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2022 13:30:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Interrupt-UART-problem/m-p/1525908#M17866</guid>
      <dc:creator>Sebast</dc:creator>
      <dc:date>2022-09-21T13:30:29Z</dc:date>
    </item>
    <item>
      <title>Re: Interrupt UART problem</title>
      <link>https://community.nxp.com/t5/S32K/Interrupt-UART-problem/m-p/1526411#M17877</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Sebast,&lt;/P&gt;
&lt;P&gt;What kind of glitch on TX pin can generate interrupt? (How can I reproduce this problem)&lt;/P&gt;
&lt;P&gt;Have you test it on S32K146EVB with SDK or RTD example, will the glitch caused same interrupt too?&lt;/P&gt;
&lt;P&gt;Which interrupt did it cause? Did you check the relevant flags after entering the interrupt to see which flag is caused it?&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Robin&lt;/P&gt;</description>
      <pubDate>Thu, 22 Sep 2022 05:17:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Interrupt-UART-problem/m-p/1526411#M17877</guid>
      <dc:creator>Robin_Shen</dc:creator>
      <dc:date>2022-09-22T05:17:08Z</dc:date>
    </item>
    <item>
      <title>Re: Interrupt UART problem</title>
      <link>https://community.nxp.com/t5/S32K/Interrupt-UART-problem/m-p/1526444#M17879</link>
      <description>&lt;P&gt;Hello Robin,&lt;/P&gt;&lt;P&gt;In normal condition, the UART communication works perfectly, that means the interruption function works perfectly. But when there is a short glitch on Tx pin (just glitch no other data), due to USB adaptor, unplug and plug to my laptop), a flag (I do not know which one is&amp;nbsp; it) seems not remove whereas, for me, I clear all flags before going out to IT function.&lt;/P&gt;&lt;P&gt;I do not use the eval board, and I do not use the RTD example.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have a nice day&lt;/P&gt;</description>
      <pubDate>Thu, 22 Sep 2022 06:07:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Interrupt-UART-problem/m-p/1526444#M17879</guid>
      <dc:creator>Sebast</dc:creator>
      <dc:date>2022-09-22T06:07:06Z</dc:date>
    </item>
    <item>
      <title>Re: Interrupt UART problem</title>
      <link>https://community.nxp.com/t5/S32K/Interrupt-UART-problem/m-p/1526505#M17881</link>
      <description>&lt;P&gt;To debug the UART's interruption problem you mentioned, please turn off the watchdog and just check which flag is causing the repeated entry interrupt.&lt;BR /&gt;Set a breakpoint at the UART's interruption entry. Without send and receive, just let the USB adaptor unplug and plug to your laptop. Check the value of the STAT register at this time during debug.&lt;/P&gt;
&lt;P&gt;What does the USB adaptor do in your system, is it just powering the system?&lt;/P&gt;
&lt;P&gt;Why this glitch only affects the Tx Pin, doesn't it interfere with other places, such as Reset_b or Rx Pin?&lt;/P&gt;</description>
      <pubDate>Thu, 22 Sep 2022 07:10:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Interrupt-UART-problem/m-p/1526505#M17881</guid>
      <dc:creator>Robin_Shen</dc:creator>
      <dc:date>2022-09-22T07:10:57Z</dc:date>
    </item>
    <item>
      <title>Re: Interrupt UART problem</title>
      <link>https://community.nxp.com/t5/S32K/Interrupt-UART-problem/m-p/1527274#M17907</link>
      <description>&lt;P&gt;Hello Robin,&lt;/P&gt;&lt;P&gt;I did some tests to understand what's happened. But let me explain you, before, how my interruption function is built:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;void LPUART0_RxTx_IRQHandler(void)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;{&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp;/* Check if error */&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp;{&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; /* Clear the error/interrupt flags */&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; LPUART0-&amp;gt;STAT = FEATURE_LPUART_STAT_REG_FLAGS_MASK;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; return;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp;}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp;if ( Check if data received )&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp;{&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; /* Save data received in buffer */&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp;}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp;if ( Check if data transmited finished )&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp;{&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; /* check if other data to send */&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; /* If yes, load data transmitted register with new */&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp;}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp;/* Clear the error/interrupt flags */&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp;LPUART0-&amp;gt;STAT = FEATURE_LPUART_STAT_REG_FLAGS_MASK;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;To test the SW behaviors, I use a µc pin the check in real time&lt;/P&gt;&lt;P&gt;See below the tests done:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1 - Remove watchdog&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;When the glith occurs, and without watchdog, the UART interruption is called continously (infinitely)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2 - In debug mode&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;When the glitch occurs, the STAT register is&lt;/P&gt;&lt;P&gt;STAT = 0x50FAC000&amp;nbsp; (flags :RXEDGI, RXINV, RWUID, BRKDE, LBKDE, RAF, OR, FE, MA1F &amp;amp; MA2F)&lt;/P&gt;&lt;P&gt;after clear register:&lt;/P&gt;&lt;P&gt;STAT = 0x10F00000&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;3 - Interrupt function&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;When the glith occurs, the interruption function is called permanently up to watchdog --&amp;gt; Not normal&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;4 - Error data&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;When the glith occurs, the Error data is detected only one time --&amp;gt; Normal it is only one glitch&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;5 - Received data&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;When the glith occurs, the received data is detected one time --&amp;gt; Not normal, why read data if it is an error ?&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;6 - Transmited data&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;When the glith occurs, the transmited data are sent correctly --&amp;gt; Normal&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope my tests will help you in your analyse.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have a nice day&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sebastien&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2022 09:24:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Interrupt-UART-problem/m-p/1527274#M17907</guid>
      <dc:creator>Sebast</dc:creator>
      <dc:date>2022-09-23T09:24:57Z</dc:date>
    </item>
    <item>
      <title>Re: Interrupt UART problem</title>
      <link>https://community.nxp.com/t5/S32K/Interrupt-UART-problem/m-p/1528001#M17962</link>
      <description>&lt;P&gt;Your&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;LPUART0_RxTx_IRQHandler&lt;/EM&gt; &lt;/STRONG&gt;looks similar to &lt;STRONG&gt;&lt;EM&gt;LPUART_DRV_IRQHandler&lt;/EM&gt; &lt;/STRONG&gt;in SDK. Please check&amp;nbsp;&lt;STRONG&gt;lpuart_echo_s32k146&lt;/STRONG&gt;&amp;nbsp;example in SDK, will the glitch cause this phenomenon too?(I don't know which S32DS are you using. Here is the link of latest &lt;A href="https://community.nxp.com/t5/S32-Design-Studio-Knowledge-Base/S32-Design-Studio-v3-4-S32K1-Service-Pack-1-released/ta-p/1299799" target="_self"&gt;SDK RTM4.0.2&lt;/A&gt;)&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lpuart_echo_s32k146 LPUART_DRV_IRQHandler.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/194892iC34F5E5A030FC6DF/image-size/large?v=v2&amp;amp;px=999" role="button" title="lpuart_echo_s32k146 LPUART_DRV_IRQHandler.png" alt="lpuart_echo_s32k146 LPUART_DRV_IRQHandler.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;2. Did you enable all those listed interrupt&amp;nbsp;of Flag in LPUART Control Register (CTRL)?&amp;nbsp;Can you disable some of them so you can easily filter out which flag caused it?&lt;/P&gt;</description>
      <pubDate>Mon, 26 Sep 2022 08:42:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Interrupt-UART-problem/m-p/1528001#M17962</guid>
      <dc:creator>Robin_Shen</dc:creator>
      <dc:date>2022-09-26T08:42:34Z</dc:date>
    </item>
    <item>
      <title>Re: Interrupt UART problem</title>
      <link>https://community.nxp.com/t5/S32K/Interrupt-UART-problem/m-p/1529389#M18029</link>
      <description>&lt;P&gt;Hello Robin,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the issue is fixed, in fact, in the interrupt function, as explained before, the first thing that I do is to test if there is an error. And if there is an error, I clear all the flags with:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;LPUART0-&amp;gt;STAT = FEATURE_LPUART_STAT_REG_FLAGS_MASK;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;And I go out of function.&lt;/P&gt;&lt;P&gt;But if the error is due to wrong received data, the receive data register is not flush (because I do not read this register), that means the IT function is always called.&lt;/P&gt;&lt;P&gt;So the solution is :&lt;/P&gt;&lt;P&gt;&lt;FONT color="#339966"&gt;&lt;EM&gt;/* Clear the error/interrupt flags */&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;LPUART0-&amp;gt;STAT = FEATURE_LPUART_STAT_REG_FLAGS_MASK;&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;&lt;EM&gt;/* Flush the receive data register to avoid to call continously the interruption function, if error is due to wrong data received */&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;ch = (uint8_t)LPUART0-&amp;gt;DATA;&lt;/EM&gt; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;</description>
      <pubDate>Wed, 28 Sep 2022 08:37:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Interrupt-UART-problem/m-p/1529389#M18029</guid>
      <dc:creator>Sebast</dc:creator>
      <dc:date>2022-09-28T08:37:58Z</dc:date>
    </item>
  </channel>
</rss>

