<?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: Issue with UART Read Flags Not Triggering in MCX Microcontrollers</title>
    <link>https://community.nxp.com/t5/MCX-Microcontrollers/Issue-with-UART-Read-Flags-Not-Triggering/m-p/2022093#M2292</link>
    <description>&lt;P&gt;Hey &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/27788"&gt;@Alice_Yang&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;That seems to work. Thanks for the help.&lt;/P&gt;</description>
    <pubDate>Sat, 04 Jan 2025 18:24:15 GMT</pubDate>
    <dc:creator>andrtnnr</dc:creator>
    <dc:date>2025-01-04T18:24:15Z</dc:date>
    <item>
      <title>Issue with UART Read Flags Not Triggering</title>
      <link>https://community.nxp.com/t5/MCX-Microcontrollers/Issue-with-UART-Read-Flags-Not-Triggering/m-p/2018192#M2228</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I'm working on an NXP project that involves reading ADC values and transmitting them over UART, and receiving responses from a co processor over UART. I'm using the &lt;STRONG&gt;FRDM-MCXW71 evaluation board&lt;/STRONG&gt; and have encountered an issue where the UART RX read flags don't seem to work as expected when sending data to the RX line.&lt;/P&gt;&lt;H4&gt;Context&lt;/H4&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;Platform&lt;/STRONG&gt;: FRDM-MCXW71 evaluation board (details in code below).&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;UART Configuration&lt;/STRONG&gt;:&lt;UL&gt;&lt;LI&gt;Baud rate (9600) and other settings are correctly configured using LPUART_GetDefaultConfig.&lt;/LI&gt;&lt;LI&gt;TX and RX are both enabled.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;H4&gt;Problem&lt;/H4&gt;&lt;P&gt;The RX read flag (kLPUART_RxDataRegFullFlag) isn't triggering during runtime when I send data to the RX pin. This suggests that incoming data isn't being flagged for processing even though the UART peripheral is initialized and configured correctly.&lt;/P&gt;&lt;H4&gt;What Works&lt;/H4&gt;&lt;P&gt;When I switch to using &lt;STRONG&gt;blocking reads&lt;/STRONG&gt; via LPUART_ReadBlocking, the UART receives data without any issues. This confirms that the hardware setup and basic UART functionality are working fine.&lt;/P&gt;&lt;P&gt;Here’s the working example using LPUART_ReadBlocking:&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;uint8_t data[10];  
LPUART_ReadBlocking(LPUART0, data, sizeof(data));  
PRINTF("Received: %s", data);  &lt;/LI-CODE&gt;&lt;H4&gt;What I Tried&lt;/H4&gt;&lt;OL&gt;&lt;LI&gt;Ensured that RX is enabled (config.enableRx = true).&lt;/LI&gt;&lt;LI&gt;Verified interrupt configurations (though they aren't relevant for blocking reads).&lt;/LI&gt;&lt;LI&gt;Confirmed the TX functionality works perfectly, and RX behaves as expected in blocking mode.&lt;/LI&gt;&lt;/OL&gt;&lt;H4&gt;Code Snippet&lt;/H4&gt;&lt;P&gt;Here’s the part of the UART setup code:&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;static void configureLPUART(void)  
{  
    lpuart_config_t config;  
    LPUART_GetDefaultConfig(&amp;amp;config);  
    config.baudRate_Bps = UART_BAUD_RATE;  
    config.enableTx = true;  
    config.enableRx = true;  

    LPUART_Init(LPUART0, &amp;amp;config, DEMO_LPUART_CLK_FREQ);  
    LPUART_EnableInterrupts(LPUART0, kLPUART_RxDataRegFullInterruptEnable);  
}  &lt;/LI-CODE&gt;&lt;P&gt;However, checking LPUART_GetStatusFlags(LPUART0) &amp;amp; kLPUART_RxDataRegFullFlag doesn't seem to indicate any data received, even when valid data is sent to RX.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Mex config&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="andrtnnr_0-1734880060734.png" style="width: 710px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/316948i9664DFCF039318F8/image-dimensions/710x55?v=v2" width="710" height="55" role="button" title="andrtnnr_0-1734880060734.png" alt="andrtnnr_0-1734880060734.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;H4&gt;Question&lt;/H4&gt;&lt;P&gt;Has anyone experienced similar issues with the RX flags not being triggered? Could this be related to clock settings, buffer configuration, .mex config or something I might be overlooking in the LPUART setup?&lt;/P&gt;&lt;P&gt;Any insights would be greatly appreciated!&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;BR /&gt;Andrew&lt;/P&gt;</description>
      <pubDate>Sun, 22 Dec 2024 15:10:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCX-Microcontrollers/Issue-with-UART-Read-Flags-Not-Triggering/m-p/2018192#M2228</guid>
      <dc:creator>andrtnnr</dc:creator>
      <dc:date>2024-12-22T15:10:16Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with UART Read Flags Not Triggering</title>
      <link>https://community.nxp.com/t5/MCX-Microcontrollers/Issue-with-UART-Read-Flags-Not-Triggering/m-p/2018193#M2229</link>
      <description>&lt;P&gt;How I am accessing the flags&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt; while (LPUART_GetStatusFlags(LPUART0) &amp;amp; kLPUART_RxDataRegFullFlag) {&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 22 Dec 2024 15:13:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCX-Microcontrollers/Issue-with-UART-Read-Flags-Not-Triggering/m-p/2018193#M2229</guid>
      <dc:creator>andrtnnr</dc:creator>
      <dc:date>2024-12-22T15:13:19Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with UART Read Flags Not Triggering</title>
      <link>https://community.nxp.com/t5/MCX-Microcontrollers/Issue-with-UART-Read-Flags-Not-Triggering/m-p/2018282#M2232</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/211818"&gt;@andrtnnr&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your question.&lt;/P&gt;
&lt;P&gt;Do you want to use Interrupt mode or Polling mode? If interrupt, please refer to lpuart_interrupt_transfer under SDK demo. It calls&amp;nbsp;&lt;SPAN&gt;RX read flag (kLPUART_RxDataRegFullFlag)&amp;nbsp;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Alice_Yang_0-1734924334976.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/316978i66E53F558C5051E1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Alice_Yang_0-1734924334976.png" alt="Alice_Yang_0-1734924334976.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Alice&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Dec 2024 03:26:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCX-Microcontrollers/Issue-with-UART-Read-Flags-Not-Triggering/m-p/2018282#M2232</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2024-12-23T03:26:17Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with UART Read Flags Not Triggering</title>
      <link>https://community.nxp.com/t5/MCX-Microcontrollers/Issue-with-UART-Read-Flags-Not-Triggering/m-p/2019364#M2252</link>
      <description>&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/27788"&gt;@Alice_Yang&lt;/a&gt;&amp;nbsp;&lt;SPAN&gt;lpuart_interrupt_transfer doesnt use&amp;nbsp;LPUART_TransferHandleIRQ.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Im not sure this is helpful.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I would love to learn what to debug if my current methods arent working&lt;/P&gt;</description>
      <pubDate>Wed, 25 Dec 2024 15:03:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCX-Microcontrollers/Issue-with-UART-Read-Flags-Not-Triggering/m-p/2019364#M2252</guid>
      <dc:creator>andrtnnr</dc:creator>
      <dc:date>2024-12-25T15:03:17Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with UART Read Flags Not Triggering</title>
      <link>https://community.nxp.com/t5/MCX-Microcontrollers/Issue-with-UART-Read-Flags-Not-Triggering/m-p/2019489#M2256</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/211818"&gt;@andrtnnr&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The demos "lpuart_interrupt_rb_transfer" and "lpuart_interrupt_transfer"&amp;nbsp;&lt;/P&gt;
&lt;P&gt;use&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;LPUART_TransferHandleIRQ(). You can refer to.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Alice_Yang_0-1735184431327.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/317325iDE2A9D226DC10E0D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Alice_Yang_0-1735184431327.png" alt="Alice_Yang_0-1735184431327.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Alice&lt;/P&gt;</description>
      <pubDate>Thu, 26 Dec 2024 03:40:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCX-Microcontrollers/Issue-with-UART-Read-Flags-Not-Triggering/m-p/2019489#M2256</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2024-12-26T03:40:56Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with UART Read Flags Not Triggering</title>
      <link>https://community.nxp.com/t5/MCX-Microcontrollers/Issue-with-UART-Read-Flags-Not-Triggering/m-p/2020163#M2269</link>
      <description>&lt;P&gt;Thanks &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/27788"&gt;@Alice_Yang&lt;/a&gt;&amp;nbsp;. I have this demo running and receiving data.&lt;/P&gt;&lt;P&gt;But I have a problem with understanding how to modify the example to fit my needs. I want to use this similar to an Arduino serial call like Serial.Available() but this one seems to wait until the rx buffer size hit its limit (in this example its 8 characters). How would I trigger a read if I want to read once my coprocessor is done sending regards if its hits the limit.&lt;/P&gt;</description>
      <pubDate>Sat, 28 Dec 2024 16:14:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCX-Microcontrollers/Issue-with-UART-Read-Flags-Not-Triggering/m-p/2020163#M2269</guid>
      <dc:creator>andrtnnr</dc:creator>
      <dc:date>2024-12-28T16:14:44Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with UART Read Flags Not Triggering</title>
      <link>https://community.nxp.com/t5/MCX-Microcontrollers/Issue-with-UART-Read-Flags-Not-Triggering/m-p/2020639#M2271</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/211818"&gt;@andrtnnr&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;In this demo, it will call the function LPUART_ReadByte() to read data from the receiver register after receiving one dataword.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Alice_Yang_1-1735615533518.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/317700i7134A7AF8C536B42/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Alice_Yang_1-1735615533518.png" alt="Alice_Yang_1-1735615533518.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Alice&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Dec 2024 03:26:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCX-Microcontrollers/Issue-with-UART-Read-Flags-Not-Triggering/m-p/2020639#M2271</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2024-12-31T03:26:12Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with UART Read Flags Not Triggering</title>
      <link>https://community.nxp.com/t5/MCX-Microcontrollers/Issue-with-UART-Read-Flags-Not-Triggering/m-p/2022093#M2292</link>
      <description>&lt;P&gt;Hey &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/27788"&gt;@Alice_Yang&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;That seems to work. Thanks for the help.&lt;/P&gt;</description>
      <pubDate>Sat, 04 Jan 2025 18:24:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCX-Microcontrollers/Issue-with-UART-Read-Flags-Not-Triggering/m-p/2022093#M2292</guid>
      <dc:creator>andrtnnr</dc:creator>
      <dc:date>2025-01-04T18:24:15Z</dc:date>
    </item>
  </channel>
</rss>

