<?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のトピックRe: S32K146 UART Rx interrupt</title>
    <link>https://community.nxp.com/t5/S32K/S32K146-UART-Rx-interrupt/m-p/1003340#M5976</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Diana, I actually made it work, it was the NVIC issue, LPURAT0 goes to the vector 0 and LPUART1 goes to 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also have another question, I am trying to make my application to work just with interrupts, RX as interrupt ( works fine ) and TX ( as interrupt ) the problem is that TX interrupt is always going to get triggered because the flag is always set ( Empty buffer ) until I put something in the buffer but I still don't want to send anything until I have data in my queue.&amp;nbsp; the problem I&amp;nbsp; have is that the erase mechanism for the flag is writing to DATA register, but I don't want to do it unless I have valid data. please refer to UartService.c&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void LPUART0_RxTx_IRQHandler(void) {&lt;/P&gt;&lt;P&gt;static uint8_t count;&lt;/P&gt;&lt;P&gt;if ( ( ( LPUART0-&amp;gt;STAT &amp;amp; LPUART_STAT_RDRF_MASK ) &amp;gt;&amp;gt; LPUART_STAT_RDRF_SHIFT ) != 0 ) { // Wait for received buffer to be full&lt;BR /&gt; NordicReceiveBuffer();&lt;BR /&gt; }&lt;BR /&gt; if ( ( ( LPUART0-&amp;gt;STAT &amp;amp; LPUART_STAT_TDRE_MASK ) &amp;gt;&amp;gt; LPUART_STAT_TDRE_SHIFT ) != 0 ) {&lt;BR /&gt; if ( nordicTxQueue.in == nordicTxQueue.out ) {&lt;BR /&gt; return;&lt;BR /&gt; }&lt;BR /&gt; else {&lt;BR /&gt; //for ( count = 0; nordicTxQueue.out != nordicTxQueue.in; count++ ) {&lt;BR /&gt; NEXT ( nordicTxQueue.out, BUFFER_SIZE );&lt;BR /&gt; SendNordicByte ( GET ( nordicTxQueue ) );&lt;BR /&gt; }&lt;BR /&gt; //}&lt;BR /&gt; }&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/************ HOW CAN I CLEAR THE TDRE FLAG HERE&amp;nbsp; WITHOUT WRITING TO&amp;nbsp; DATA REGISTER*************//////////&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if ( nordicTxQueue.in == nordicTxQueue.out ) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;return;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is there another way to clear the flag? is it possible to use RX and TX with interrupts at the same time?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Jan 2020 22:23:25 GMT</pubDate>
    <dc:creator>tonymor90</dc:creator>
    <dc:date>2020-01-07T22:23:25Z</dc:date>
    <item>
      <title>S32K146 UART Rx interrupt</title>
      <link>https://community.nxp.com/t5/S32K/S32K146-UART-Rx-interrupt/m-p/1003338#M5974</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;Hello,&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;I was trying to implement an RX interrupt but I can't make it work, I am able to send data through TX, I enable the interrupt just for RX and baudrate 115200. can you help if I am missing something please. I am using S32K146 DevBoard&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;I already enabled the Transmitter and Receiver and enable Receiver Interrupt. I can send but not receive anything. I am not using processor expert, I follow and example that I found but still can't figure it out.&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;Project is attached&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Dec 2019 15:29:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K146-UART-Rx-interrupt/m-p/1003338#M5974</guid>
      <dc:creator>tonymor90</dc:creator>
      <dc:date>2019-12-19T15:29:09Z</dc:date>
    </item>
    <item>
      <title>Re: S32K146 UART Rx interrupt</title>
      <link>https://community.nxp.com/t5/S32K/S32K146-UART-Rx-interrupt/m-p/1003339#M5975</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Hugo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tested your code with LPUART1 because I use the terminal to send the characters and the interrupt works without any issue. So, I assume that it should work also with LPUART0. Have you tested the simple example here?&amp;nbsp;&lt;A _jive_internal="true" class="link-titled" href="https://community.nxp.com/message/957747?commentID=957747#comment-957747" title="https://community.nxp.com/message/957747?commentID=957747#comment-957747"&gt;https://community.nxp.com/message/957747?commentID=957747#comment-957747&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does it work?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, I recommend you to use the faster clock source for LPUART baudrate.&amp;nbsp;&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>Thu, 02 Jan 2020 14:57:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K146-UART-Rx-interrupt/m-p/1003339#M5975</guid>
      <dc:creator>dianabatrlova</dc:creator>
      <dc:date>2020-01-02T14:57:07Z</dc:date>
    </item>
    <item>
      <title>Re: S32K146 UART Rx interrupt</title>
      <link>https://community.nxp.com/t5/S32K/S32K146-UART-Rx-interrupt/m-p/1003340#M5976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Diana, I actually made it work, it was the NVIC issue, LPURAT0 goes to the vector 0 and LPUART1 goes to 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also have another question, I am trying to make my application to work just with interrupts, RX as interrupt ( works fine ) and TX ( as interrupt ) the problem is that TX interrupt is always going to get triggered because the flag is always set ( Empty buffer ) until I put something in the buffer but I still don't want to send anything until I have data in my queue.&amp;nbsp; the problem I&amp;nbsp; have is that the erase mechanism for the flag is writing to DATA register, but I don't want to do it unless I have valid data. please refer to UartService.c&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void LPUART0_RxTx_IRQHandler(void) {&lt;/P&gt;&lt;P&gt;static uint8_t count;&lt;/P&gt;&lt;P&gt;if ( ( ( LPUART0-&amp;gt;STAT &amp;amp; LPUART_STAT_RDRF_MASK ) &amp;gt;&amp;gt; LPUART_STAT_RDRF_SHIFT ) != 0 ) { // Wait for received buffer to be full&lt;BR /&gt; NordicReceiveBuffer();&lt;BR /&gt; }&lt;BR /&gt; if ( ( ( LPUART0-&amp;gt;STAT &amp;amp; LPUART_STAT_TDRE_MASK ) &amp;gt;&amp;gt; LPUART_STAT_TDRE_SHIFT ) != 0 ) {&lt;BR /&gt; if ( nordicTxQueue.in == nordicTxQueue.out ) {&lt;BR /&gt; return;&lt;BR /&gt; }&lt;BR /&gt; else {&lt;BR /&gt; //for ( count = 0; nordicTxQueue.out != nordicTxQueue.in; count++ ) {&lt;BR /&gt; NEXT ( nordicTxQueue.out, BUFFER_SIZE );&lt;BR /&gt; SendNordicByte ( GET ( nordicTxQueue ) );&lt;BR /&gt; }&lt;BR /&gt; //}&lt;BR /&gt; }&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/************ HOW CAN I CLEAR THE TDRE FLAG HERE&amp;nbsp; WITHOUT WRITING TO&amp;nbsp; DATA REGISTER*************//////////&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if ( nordicTxQueue.in == nordicTxQueue.out ) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;return;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is there another way to clear the flag? is it possible to use RX and TX with interrupts at the same time?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jan 2020 22:23:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K146-UART-Rx-interrupt/m-p/1003340#M5976</guid>
      <dc:creator>tonymor90</dc:creator>
      <dc:date>2020-01-07T22:23:25Z</dc:date>
    </item>
    <item>
      <title>Re: S32K146 UART Rx interrupt</title>
      <link>https://community.nxp.com/t5/S32K/S32K146-UART-Rx-interrupt/m-p/1003341#M5977</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Hugo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TDRE can be cleared only by writing to the DATA register.&lt;/P&gt;&lt;P&gt;However, if there is no data to be sent you can disable&amp;nbsp;TX interrupt until you have data in your queue.&lt;/P&gt;&lt;P&gt;When&amp;nbsp;you have data to send just enable the TX interrupt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it helps.&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>Thu, 09 Jan 2020 09:56:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K146-UART-Rx-interrupt/m-p/1003341#M5977</guid>
      <dc:creator>dianabatrlova</dc:creator>
      <dc:date>2020-01-09T09:56:11Z</dc:date>
    </item>
  </channel>
</rss>

