<?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: 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/1966880#M9614</link>
    <description>&lt;P&gt;I imported the xml project into S32DS and set breakpoint in the function &lt;STRONG&gt;LPUART_DRV_ErrIrqHandler&lt;/STRONG&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 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;</description>
    <pubDate>Fri, 04 Oct 2024 11:06:17 GMT</pubDate>
    <dc:creator>johngreenjets</dc:creator>
    <dc:date>2024-10-04T11:06:17Z</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/1966434#M9597</link>
      <description>&lt;P&gt;I have created a model to receive UART based on the 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 cannot find what is causing the fault or how to handle resetting the fault so that it automatically starts receiving data again.&lt;/P&gt;&lt;P&gt;The only thing I've noticed is 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;Whats causing the issue and how can I resolve this ?&lt;/P&gt;&lt;P&gt;The model is attached for reference (LPUART_RX.zip)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="johngreenjets_1-1727967095635.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/302596i10FFCB98BC437CD0/image-size/large?v=v2&amp;amp;px=999" role="button" title="johngreenjets_1-1727967095635.png" alt="johngreenjets_1-1727967095635.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For reference, below is a scope trace of the UART data....&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="johngreenjets_2-1727967511006.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/302597i0E4694E6511C60ED/image-size/large?v=v2&amp;amp;px=999" role="button" title="johngreenjets_2-1727967511006.png" alt="johngreenjets_2-1727967511006.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The UART data contains the following parameters:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Byte 0: Temperature&lt;/LI&gt;&lt;LI&gt;Byte 1: Voltage high byte&lt;/LI&gt;&lt;LI&gt;Byte 2: Voltage low byte&lt;/LI&gt;&lt;LI&gt;Byte 3: Current high byte&lt;/LI&gt;&lt;LI&gt;Byte 4: Current low byte&lt;/LI&gt;&lt;LI&gt;Byte 5: Consumption high byte&lt;/LI&gt;&lt;LI&gt;Byte 6: Consumption low byte&lt;/LI&gt;&lt;LI&gt;Byte 7: Rpm high byte&lt;/LI&gt;&lt;LI&gt;Byte 8: Rpm low byte&lt;/LI&gt;&lt;LI&gt;Byte 9: 8-bit CRC&lt;/LI&gt;&lt;/UL&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>Thu, 03 Oct 2024 15:09:56 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/1966434#M9597</guid>
      <dc:creator>johngreenjets</dc:creator>
      <dc:date>2024-10-03T15:09:56Z</dc:date>
    </item>
    <item>
      <title>Re: 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/1966438#M9598</link>
      <description>&lt;P&gt;Also, I noticed that the LPUART0 ISR block has options for:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Transmit buffer empty&lt;/LI&gt;&lt;LI&gt;End of transfer&lt;/LI&gt;&lt;LI&gt;Error event&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="johngreenjets_0-1727968351564.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/302599i51447CB55AFAB413/image-size/large?v=v2&amp;amp;px=999" role="button" title="johngreenjets_0-1727968351564.png" alt="johngreenjets_0-1727968351564.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If these are enabled, it means the subsystem will be triggered if any one of those events occur.&lt;/P&gt;&lt;P&gt;But then when the subsystem is triggered, how do you determine which event caused the trigger ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2024 15:17:18 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/1966438#M9598</guid>
      <dc:creator>johngreenjets</dc:creator>
      <dc:date>2024-10-03T15:17:18Z</dc:date>
    </item>
    <item>
      <title>Re: 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/1966880#M9614</link>
      <description>&lt;P&gt;I imported the xml project into S32DS and set breakpoint in the function &lt;STRONG&gt;LPUART_DRV_ErrIrqHandler&lt;/STRONG&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 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;</description>
      <pubDate>Fri, 04 Oct 2024 11:06:17 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/1966880#M9614</guid>
      <dc:creator>johngreenjets</dc:creator>
      <dc:date>2024-10-04T11:06:17Z</dc:date>
    </item>
  </channel>
</rss>

