<?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 UART Rx won't restart after interruption to Rx data in Model-Based Design Toolbox (MBDT)</title>
    <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/UART-Rx-won-t-restart-after-interruption-to-Rx-data/m-p/1968735#M9635</link>
    <description>&lt;P&gt;I have created a model to receive UART based on the Simulink example code 'lpuart_s32k14x.mdl'.&lt;/P&gt;&lt;P&gt;I had to modify it slightly, because I need to receive 10 continuous bytes of data sent at a 100ms cycle rate.&lt;/P&gt;&lt;P&gt;The code works fine, until the UART data is interrupted such as:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;disconnected from the external transmitter&lt;/LI&gt;&lt;LI&gt;external transmitter is powered down&lt;/LI&gt;&lt;LI&gt;debugger halted and restarted&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;When the UART data transmission restarts , the code does not receive the data unless the processor is reset.&lt;/P&gt;&lt;P&gt;I imported the generated code xml project into S32DS and set breakpoint in the function&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;LPUART_DRV_ErrIrqHandler&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;(in lpuart_driver.c).&amp;nbsp;&lt;/P&gt;&lt;P&gt;I set a break point in each of the error types...&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Overrun&lt;/LI&gt;&lt;LI&gt;Framing error&lt;/LI&gt;&lt;LI&gt;Parity error&lt;/LI&gt;&lt;LI&gt;Noise detect&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;When I disconnect the serial data, I get a framing error.&lt;/P&gt;&lt;P&gt;When I power down the transmitter, I get a noise error.&lt;/P&gt;&lt;P&gt;When I pause the debugger, I get an overrun error.&lt;/P&gt;&lt;P&gt;I also noticed that the LPUART0.CTRL register has the value 0x0F240000 when its working and&amp;nbsp;0x00000000 when it stops working.&lt;/P&gt;&lt;P&gt;I need the software to automatically recover from these errors once the fault has been removed (with the exception of the paused debugger as this would only happen during debugging).&lt;/P&gt;&lt;P&gt;How do I achieve this ?&lt;/P&gt;&lt;P&gt;The generated code xml project is attached for reference (HUMS_mbd_rtw.zip)&lt;/P&gt;</description>
    <pubDate>Tue, 08 Oct 2024 08:30:23 GMT</pubDate>
    <dc:creator>johngreenjets</dc:creator>
    <dc:date>2024-10-08T08:30:23Z</dc:date>
    <item>
      <title>UART Rx won't restart after interruption to Rx data</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/UART-Rx-won-t-restart-after-interruption-to-Rx-data/m-p/1968735#M9635</link>
      <description>&lt;P&gt;I have created a model to receive UART based on the Simulink example code 'lpuart_s32k14x.mdl'.&lt;/P&gt;&lt;P&gt;I had to modify it slightly, because I need to receive 10 continuous bytes of data sent at a 100ms cycle rate.&lt;/P&gt;&lt;P&gt;The code works fine, until the UART data is interrupted such as:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;disconnected from the external transmitter&lt;/LI&gt;&lt;LI&gt;external transmitter is powered down&lt;/LI&gt;&lt;LI&gt;debugger halted and restarted&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;When the UART data transmission restarts , the code does not receive the data unless the processor is reset.&lt;/P&gt;&lt;P&gt;I imported the generated code xml project into S32DS and set breakpoint in the function&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;LPUART_DRV_ErrIrqHandler&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;(in lpuart_driver.c).&amp;nbsp;&lt;/P&gt;&lt;P&gt;I set a break point in each of the error types...&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Overrun&lt;/LI&gt;&lt;LI&gt;Framing error&lt;/LI&gt;&lt;LI&gt;Parity error&lt;/LI&gt;&lt;LI&gt;Noise detect&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;When I disconnect the serial data, I get a framing error.&lt;/P&gt;&lt;P&gt;When I power down the transmitter, I get a noise error.&lt;/P&gt;&lt;P&gt;When I pause the debugger, I get an overrun error.&lt;/P&gt;&lt;P&gt;I also noticed that the LPUART0.CTRL register has the value 0x0F240000 when its working and&amp;nbsp;0x00000000 when it stops working.&lt;/P&gt;&lt;P&gt;I need the software to automatically recover from these errors once the fault has been removed (with the exception of the paused debugger as this would only happen during debugging).&lt;/P&gt;&lt;P&gt;How do I achieve this ?&lt;/P&gt;&lt;P&gt;The generated code xml project is attached for reference (HUMS_mbd_rtw.zip)&lt;/P&gt;</description>
      <pubDate>Tue, 08 Oct 2024 08:30:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/UART-Rx-won-t-restart-after-interruption-to-Rx-data/m-p/1968735#M9635</guid>
      <dc:creator>johngreenjets</dc:creator>
      <dc:date>2024-10-08T08:30:23Z</dc:date>
    </item>
  </channel>
</rss>

