<?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: RW61X USART FIFOSTAT-&amp;gt;RXTIMEOUT in Wi-Fi® + Bluetooth® + 802.15.4</title>
    <link>https://community.nxp.com/t5/Wi-Fi-Bluetooth-802-15-4/RW61X-USART-FIFOSTAT-gt-RXTIMEOUT/m-p/2043860#M3681</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I just configured the timeout:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ricardo_Zamora_0-1739480458814.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/323898iB0800F134CFA3CE3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ricardo_Zamora_0-1739480458814.png" alt="Ricardo_Zamora_0-1739480458814.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Ricardo&lt;/P&gt;</description>
    <pubDate>Thu, 13 Feb 2025 21:01:14 GMT</pubDate>
    <dc:creator>Ricardo_Zamora</dc:creator>
    <dc:date>2025-02-13T21:01:14Z</dc:date>
    <item>
      <title>RW61X USART FIFOSTAT-&gt;RXTIMEOUT</title>
      <link>https://community.nxp.com/t5/Wi-Fi-Bluetooth-802-15-4/RW61X-USART-FIFOSTAT-gt-RXTIMEOUT/m-p/2034080#M3593</link>
      <description>&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;Working with RW612's USART I stumble into the following problem:&lt;BR /&gt;&lt;BR /&gt;I'm enabling the USART RXTIMEOUT interrupt using the SDK-provided API:&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;USART_EnableInterrupts(USART3, kUSART_RxTimeoutInterruptEnable);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;and I'm also setting the interrupt using the provided API to configure it:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;    USART_CalcTimeoutConfig(timeMicroSec,
                            &amp;amp;rxTimeoutCfg.prescaler,
                            &amp;amp;rxTimeoutCfg.counter,
                            CLOCK_GetFlexCommClkFreq(flexCommId));
    rxTimeoutCfg.enable = true;
    rxTimeoutCfg.resetCounterOnEmpty = false;
    rxTimeoutCfg.resetCounterOnReceive = true;

    // Disable UART in order to configure timeout
    mp_uartBase-&amp;gt;CFG &amp;amp;= ~USART_CFG_ENABLE_MASK;

    USART_SetRxTimeoutConfig(mp_uartBase, &amp;amp;rxTimeoutCfg);
    USART_EnableInterrupts(mp_uartBase, kUSART_RxTimeoutInterruptEnable);

    // Re-enable timeout
    mp_uartBase-&amp;gt;CFG |= USART_CFG_ENABLE_MASK;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The interrupt is triggering as expected, however I'm unable to clear the interrupt.&lt;BR /&gt;&lt;BR /&gt;According to RM00278 28.1.12:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="aar_0-1737755838196.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/321312iFD420B5D084DBA4F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="aar_0-1737755838196.png" alt="aar_0-1737755838196.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, from the fsl_usart.c driver (SDK 24.12) we have:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;    /* Only TXERR, RXERR fields support write. Remaining fields should be set to zero */
    base-&amp;gt;FIFOSTAT = mask &amp;amp; (USART_FIFOSTAT_TXERR_MASK | USART_FIFOSTAT_RXERR_MASK);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;As the fsl driver wouldn't even attempt to clear write the FIFOSTAT-&amp;gt;RXTIMEOUT timeout bit I tried to write to it directly:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;        // Clear the timeout interrupt
        mp_uartBase-&amp;gt;FIFOSTAT |= USART_FIFOSTAT_RXTIMEOUT_MASK;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately, this doesn't work and the interrupt is never cleared.&lt;BR /&gt;&lt;BR /&gt;Could you please advise on how RXTIMEOUT interrupt is cleared?&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jan 2025 21:59:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wi-Fi-Bluetooth-802-15-4/RW61X-USART-FIFOSTAT-gt-RXTIMEOUT/m-p/2034080#M3593</guid>
      <dc:creator>aar</dc:creator>
      <dc:date>2025-01-24T21:59:03Z</dc:date>
    </item>
    <item>
      <title>Re: RW61X USART FIFOSTAT-&gt;RXTIMEOUT</title>
      <link>https://community.nxp.com/t5/Wi-Fi-Bluetooth-802-15-4/RW61X-USART-FIFOSTAT-gt-RXTIMEOUT/m-p/2034825#M3600</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope you are doing well. Let me check this internally.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Ricardo&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2025 23:12:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wi-Fi-Bluetooth-802-15-4/RW61X-USART-FIFOSTAT-gt-RXTIMEOUT/m-p/2034825#M3600</guid>
      <dc:creator>Ricardo_Zamora</dc:creator>
      <dc:date>2025-01-27T23:12:05Z</dc:date>
    </item>
    <item>
      <title>Re: RW61X USART FIFOSTAT-&gt;RXTIMEOUT</title>
      <link>https://community.nxp.com/t5/Wi-Fi-Bluetooth-802-15-4/RW61X-USART-FIFOSTAT-gt-RXTIMEOUT/m-p/2038003#M3622</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your patience!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was able to clear that bit using the following code on the DEMO_USART_IRQHandler from the usart_interrupt example:&lt;/P&gt;
&lt;DIV id="tinyMceEditorRicardo_Zamora_1" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV id="tinyMceEditorRicardo_Zamora_2" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV id="tinyMceEditorRicardo_Zamora_3" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV id="tinyMceEditorRicardo_Zamora_4" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV id="tinyMceEditorRicardo_Zamora_5" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV id="tinyMceEditorRicardo_Zamora_6" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV id="tinyMceEditorRicardo_Zamora_7" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="rxtimeput.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/322389iEB72F9856EFB92A8/image-size/large?v=v2&amp;amp;px=999" role="button" title="rxtimeput.png" alt="rxtimeput.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Ricardo&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2025 20:37:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wi-Fi-Bluetooth-802-15-4/RW61X-USART-FIFOSTAT-gt-RXTIMEOUT/m-p/2038003#M3622</guid>
      <dc:creator>Ricardo_Zamora</dc:creator>
      <dc:date>2025-02-04T20:37:29Z</dc:date>
    </item>
    <item>
      <title>Re: RW61X USART FIFOSTAT-&gt;RXTIMEOUT</title>
      <link>https://community.nxp.com/t5/Wi-Fi-Bluetooth-802-15-4/RW61X-USART-FIFOSTAT-gt-RXTIMEOUT/m-p/2042778#M3675</link>
      <description>&lt;P&gt;Ricardo,&lt;/P&gt;&lt;P&gt;Could you please share all the modifications you made to the example code? I'm still unable to clear this flag.&lt;BR /&gt;&lt;BR /&gt;This is how I'm enabling RXTIMEOUT:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;DoEnableRxTimeout(double timeoutBytes)
{
    const double rxTimeoutMicroSec{
      std::ceil(((timeoutBytes * m_transmissionSize) / m_baud) * 1000000)};

    usart_rx_timeout_config rxTimeoutCfg{};
    const std::uint32_t flexCommId{GetFlexcommId(mp_uartBase)};

    USART_CalcTimeoutConfig(static_cast&amp;lt;uint32_t&amp;gt;(rxTimeoutMicroSec),
                            &amp;amp;rxTimeoutCfg.prescaler,
                            &amp;amp;rxTimeoutCfg.counter,
                            CLOCK_GetFlexCommClkFreq(flexCommId));
    rxTimeoutCfg.enable = true;
    rxTimeoutCfg.resetCounterOnEmpty = false;
    rxTimeoutCfg.resetCounterOnReceive = true;

    // Disable UART to configure timeout
    mp_uartBase-&amp;gt;CFG &amp;amp;= ~USART_CFG_ENABLE_MASK;

    USART_SetRxTimeoutConfig(mp_uartBase, &amp;amp;rxTimeoutCfg);
    USART_EnableInterrupts(mp_uartBase, kUSART_RxTimeoutInterruptEnable);

    // Re-enable UART
    mp_uartBase-&amp;gt;CFG |= USART_CFG_ENABLE_MASK;
}&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 12 Feb 2025 17:54:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wi-Fi-Bluetooth-802-15-4/RW61X-USART-FIFOSTAT-gt-RXTIMEOUT/m-p/2042778#M3675</guid>
      <dc:creator>aar</dc:creator>
      <dc:date>2025-02-12T17:54:08Z</dc:date>
    </item>
    <item>
      <title>Re: RW61X USART FIFOSTAT-&gt;RXTIMEOUT</title>
      <link>https://community.nxp.com/t5/Wi-Fi-Bluetooth-802-15-4/RW61X-USART-FIFOSTAT-gt-RXTIMEOUT/m-p/2043860#M3681</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I just configured the timeout:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ricardo_Zamora_0-1739480458814.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/323898iB0800F134CFA3CE3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ricardo_Zamora_0-1739480458814.png" alt="Ricardo_Zamora_0-1739480458814.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Ricardo&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2025 21:01:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wi-Fi-Bluetooth-802-15-4/RW61X-USART-FIFOSTAT-gt-RXTIMEOUT/m-p/2043860#M3681</guid>
      <dc:creator>Ricardo_Zamora</dc:creator>
      <dc:date>2025-02-13T21:01:14Z</dc:date>
    </item>
  </channel>
</rss>

