<?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: FreeRTOS LPUART driver problem in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/FreeRTOS-LPUART-driver-problem/m-p/2292771#M243377</link>
    <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/212331"&gt;@Oliver_R&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Could you help me with the following question?&lt;/P&gt;
&lt;P&gt;Are you using VS Code or MCUXpresso?&lt;/P&gt;
&lt;P&gt;If you test with mcuxsdk , does the problem persist?&lt;/P&gt;
&lt;P&gt;In VS Code, there is an example project: evkbmimxrt1170_freertos_lpuart_cm7. Could you help me test whether it works with your hardware?&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Pablo&lt;/P&gt;</description>
    <pubDate>Tue, 13 Jan 2026 19:00:42 GMT</pubDate>
    <dc:creator>Pablo_Ramos</dc:creator>
    <dc:date>2026-01-13T19:00:42Z</dc:date>
    <item>
      <title>FreeRTOS LPUART driver problem</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/FreeRTOS-LPUART-driver-problem/m-p/2292566#M243361</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm using a RT1176 based board with (currently the older) mcux-sdk, but the problem looks identical in the mcuxsdk (really confusing names!):&lt;/P&gt;&lt;P&gt;The Freertos-LPUART driver (fsl_lpuart_freertos.c) does not call HAL_UartInit (fsl_adapter_lpuart.c) in the LPUART_RTOS_Init function. Instead it calls just LPUART_Init, which is not enough!&lt;/P&gt;&lt;P&gt;The problem is that the field s_UartState (line 719 in fsl_fsl_adapter_lpuart.c) is not written in LPUART_Init which then leads to an assertion if a receive interrupt from the UART occurs:&lt;/P&gt;&lt;P&gt;ASSERT ERROR " NULL != uartHandle ": file "D:\usr\TQM\mcuxsdk\core\components\uart\fsl_adapter_lpuart.c" Line "433" function name "HAL_UartInterruptHandle"&lt;/P&gt;&lt;P&gt;So I wonder, how this driver could ever worked, because the array s_UartState is read for the handle in the interrupt driver (and then it is NULL).&lt;/P&gt;&lt;P&gt;So, did I anything wrong or has this driver a problem? Maybe I have to rewrite the code to use a lower API driver for the LPUARTS?&lt;/P&gt;&lt;P&gt;Thanks and bye,&lt;BR /&gt;Oliver&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jan 2026 12:21:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/FreeRTOS-LPUART-driver-problem/m-p/2292566#M243361</guid>
      <dc:creator>Oliver_R</dc:creator>
      <dc:date>2026-01-13T12:21:57Z</dc:date>
    </item>
    <item>
      <title>Re: FreeRTOS LPUART driver problem</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/FreeRTOS-LPUART-driver-problem/m-p/2292771#M243377</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/212331"&gt;@Oliver_R&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Could you help me with the following question?&lt;/P&gt;
&lt;P&gt;Are you using VS Code or MCUXpresso?&lt;/P&gt;
&lt;P&gt;If you test with mcuxsdk , does the problem persist?&lt;/P&gt;
&lt;P&gt;In VS Code, there is an example project: evkbmimxrt1170_freertos_lpuart_cm7. Could you help me test whether it works with your hardware?&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Pablo&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jan 2026 19:00:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/FreeRTOS-LPUART-driver-problem/m-p/2292771#M243377</guid>
      <dc:creator>Pablo_Ramos</dc:creator>
      <dc:date>2026-01-13T19:00:42Z</dc:date>
    </item>
    <item>
      <title>Re: FreeRTOS LPUART driver problem</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/FreeRTOS-LPUART-driver-problem/m-p/2293028#M243394</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm using the VSCode plugin with the latest mcux-sdk. We're using a TQMa117xL based board and unfortunately the BSP is not yet ready for mcuxsdk.&lt;/P&gt;&lt;P&gt;This means I can't test it right now with mcuxsdk but in the future we will change to it.&lt;/P&gt;&lt;P&gt;The mentioned example is new, as I can't find it in mcux-sdk? I will check it out.&lt;/P&gt;&lt;P&gt;The assertion happens right after the Init function:&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;lpuart_rtos_config_t mSerConfig;
lpuart_rtos_handle_t mRtosHandle;
_lpuart_handle       mUartHandle;
mRtosHandle = {};
mUartHandle = {};
mSerConfig             = {};
mSerConfig.srcclk = CLOCK_GetRootClockFreq(kCLOCK_Root_Lpuart9);
mSerConfig.base   = LPUART9;
mSerConfig.baudrate    = aBaudrate;
mSerConfig.parity      = kLPUART_ParityDisabled;
mSerConfig.stopbits    = kLPUART_OneStopBit;
mSerConfig.buffer      = mReadBuf;
mSerConfig.buffer_size = sizeof(mReadBuf);
mSerConfig.enableRxRTS = true;
mSerConfig.enableTxCTS = true;
int status = LPUART_RTOS_Init(&amp;amp;mRtosHandle, &amp;amp;mUartHandle, &amp;amp;mSerConfig);&lt;/LI-CODE&gt;&lt;P&gt;The code is in a C++ class but I will compare the init code with the example.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Bye,&lt;/P&gt;&lt;P&gt;Oliver&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jan 2026 07:40:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/FreeRTOS-LPUART-driver-problem/m-p/2293028#M243394</guid>
      <dc:creator>Oliver_R</dc:creator>
      <dc:date>2026-01-14T07:40:55Z</dc:date>
    </item>
    <item>
      <title>Re: FreeRTOS LPUART driver problem</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/FreeRTOS-LPUART-driver-problem/m-p/2294017#M243421</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;in the meantime I discovered, that this is not related only to the FreeRTOS-Uart driver, but also to the underlying lpuart driver.&lt;/P&gt;&lt;P&gt;Unfortunately, I found nothing in the SDK documentation or in the forums to the HAL_Uart-driver&lt;/P&gt;&lt;P&gt;For what reason is the HAL_Uartxxx-API (fsl_adapter_lpuart.c)? Why and when should I use it? There are only two sources in the whole SDK which are using HAL_UartInit at all: fsl_component_serial_port_uart.c and fsl_debug_console.c in the debug_console_lite folder.&lt;/P&gt;&lt;P&gt;The problem I have with this API is that when fsl_adapter_lpuart.c is compiled WITHOUT the define "HAL_UART_TRANSFER_MODE=1" then all lpuart interrupts are defined in this source and then I HAVE to use HAL_UartInit in order to avoid the assertion in the receive IRQ. And as the IRQs are already defined, I have no change to register my own IRQ anymore.&lt;/P&gt;&lt;P&gt;But all UART examples do not set HAL_UART_TRANSFER_MODE=1 and some examples are defining their own IRQs, so I wonder how this could work. I define DEBUG_CONSOLE_TRANSFER_NON_BLOCKING and I'm not using the "utility_debug_console_lite" component.&lt;/P&gt;&lt;P&gt;BTW: What is the difference between "utility_debug_console" and "utility_debug_console_lite"? The SDK documentation is the same for both components?&lt;/P&gt;&lt;P&gt;All of this driver code is very very hard to understand as there is so much preprocessor magic and so few documentation for it.&lt;/P&gt;&lt;P&gt;So I have the impression, that the source "fsl_adapter_lpuart.c" should not be compiled in at all as it defines the lpuart IRQs in an unwanted way which lead to assertions when using other lpuarts than the debug console lpuart.&lt;/P&gt;&lt;P&gt;Bye,&lt;BR /&gt;Oliver&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jan 2026 07:48:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/FreeRTOS-LPUART-driver-problem/m-p/2294017#M243421</guid>
      <dc:creator>Oliver_R</dc:creator>
      <dc:date>2026-01-15T07:48:04Z</dc:date>
    </item>
    <item>
      <title>Re: FreeRTOS LPUART driver problem</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/FreeRTOS-LPUART-driver-problem/m-p/2296193#M243468</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;You mention that the issue appears to be directly on the lpuart drivers and not the implementation of freertos.&lt;/P&gt;
&lt;P&gt;If you test an LPUART example in bare‑metal, does it work?&lt;/P&gt;
&lt;P&gt;Could you also test this using MCUXpresso?&lt;/P&gt;
&lt;P&gt;You can find a full description of utility_debug_console and utility_debug_console_lite in the SDK API Reference Manual.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://mcuxpresso.nxp.com/api_doc/dev/4482/a00180.html" target="_blank" rel="noopener"&gt;MCUXpresso SDK API Reference Manual: Debug Console&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://mcuxpresso.nxp.com/api_doc/dev/4482/a00182.html" target="_blank" rel="noopener"&gt;MCUXpresso SDK API Reference Manual: Debug Console Lite&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Pablo&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jan 2026 23:31:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/FreeRTOS-LPUART-driver-problem/m-p/2296193#M243468</guid>
      <dc:creator>Pablo_Ramos</dc:creator>
      <dc:date>2026-01-19T23:31:00Z</dc:date>
    </item>
    <item>
      <title>Re: FreeRTOS LPUART driver problem</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/FreeRTOS-LPUART-driver-problem/m-p/2296388#M243475</link>
      <description>&lt;P&gt;So after hours of debugging the driver code and trying to understand all the preprocessor magic in the UART code I finally found the reason for this behaviour. And it is indeed not related to the FreeRTOS API!&lt;/P&gt;&lt;P&gt;The problem begins if you set a flag which is mentioned in the hello world example of the SDK:&amp;nbsp;&lt;/P&gt;&lt;P&gt;"just define DEBUG_CONSOLE_TRANSFER_NON_BLOCKING in your project to use the advanced debug console utility."&lt;/P&gt;&lt;P&gt;I thought it is a good idea to do so, as a non-blocking console doesn't disturb the code timing so much. But this option has a catastrophic side effect which is not mentioned or documented anywhere:&lt;/P&gt;&lt;P&gt;The startup-code (startup_mimxrt1176_cm7.c) defines the LPUART IRQs as follows:&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;WEAK void LPUART10_IRQHandler(void) { LPUART10_DriverIRQHandler(); }&lt;/LI-CODE&gt;&lt;P&gt;So the IRQs are routed to the LPUART driver which is fine.&lt;/P&gt;&lt;P&gt;But if you define&amp;nbsp;DEBUG_CONSOLE_TRANSFER_NON_BLOCKING then the IRQs of ALL LPUARTS (and not only the IRQ of the console LPUART1) are overwritten in&amp;nbsp;fsl_adapter_lpuart.c then:&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;void LPUART10_IRQHandler(void); 
void LPUART10_IRQHandler(void) 
#endif /* LP_FLEXCOMM10 */ 
{ 
HAL_UartInterruptHandle(10); 
SDK_ISR_EXIT_BARRIER; 
} 
#endif 
#endif /* LPUART10 */&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;and in HAL_UartInterruptHandle there's the line&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;hal_uart_state_t *uartHandle = s_UartState[instance];&lt;/LI-CODE&gt;&lt;P&gt;which leads to an assertion afterwards if you're not using&amp;nbsp;HAL_UartInit.&lt;/P&gt;&lt;P&gt;Or in other words: All your existing (non HAL_xxx) UART-Code will blow up, if you set&amp;nbsp;DEBUG_CONSOLE_TRANSFER_NON_BLOCKING.&lt;/P&gt;&lt;P&gt;Please have a look in the driver code, this is really a bad, intrusive and malicious option which should have a BIG FAT WARNING if you're really using it.&lt;/P&gt;&lt;P&gt;In my opinion this definition should be killed from the SDK as it has so bad side effects. No wonder that none of the SDK exapmles is setting this option.&lt;/P&gt;&lt;P&gt;Unfortunately nobody answered some of my questions, so here once again:&lt;/P&gt;&lt;P&gt;1.&amp;nbsp;For what reason is the HAL_Uartxxx-API (fsl_adapter_lpuart.c)? Why and when should I use it?&lt;/P&gt;&lt;P&gt;2.&amp;nbsp;What is the difference between "utility_debug_console" and "utility_debug_console_lite"? The SDK documentation is the same for both components?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So please, do not point me again to the SDK documentation, I already read it and the "full description" doesn't mention any differences.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Bye,&lt;/P&gt;&lt;P&gt;Oliver&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jan 2026 07:44:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/FreeRTOS-LPUART-driver-problem/m-p/2296388#M243475</guid>
      <dc:creator>Oliver_R</dc:creator>
      <dc:date>2026-01-20T07:44:11Z</dc:date>
    </item>
    <item>
      <title>Re: FreeRTOS LPUART driver problem</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/FreeRTOS-LPUART-driver-problem/m-p/2297628#M243519</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Regarding the HAL, it is normally used if you want portability between different MCU platforms.&lt;/P&gt;
&lt;P&gt;You can find more details about this in &lt;A href="https://www.nxp.com/company/about-nxp/smarter-world-blog/BL-MCUS-NEEDS-A-NEW-WAY-OF-THINKING#:~:text=MCUXpresso%20Hardware%20Abstraction%20Layer,to%20a%20device-agnostic%20future." target="_blank"&gt;Why Expanding the Potential of MCUs Needs a New Way of Thinking | NXP Semiconductors&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;The supported debug console hardware device type varies between them, one supporting only UART (lite), and the other one UART, USB and SWO.&lt;/P&gt;
&lt;P&gt;Something that is mentioned in the web pages of the documentation are for example that the serial interfaces supported , which are the parameters needed to use the APIs, for example for the advance there a full table showing how the information will be printed depending on the interface and the lite does not support the same amount of interfaces so it will show limited information .&lt;/P&gt;
&lt;P&gt;Please let us know if there is any further question&lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Pablo&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jan 2026 22:08:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/FreeRTOS-LPUART-driver-problem/m-p/2297628#M243519</guid>
      <dc:creator>Pablo_Ramos</dc:creator>
      <dc:date>2026-01-21T22:08:12Z</dc:date>
    </item>
  </channel>
</rss>

