<?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>S32 SDKのトピックLPUART Tx inside an ISR</title>
    <link>https://community.nxp.com/t5/S32-SDK/LPUART-Tx-inside-an-ISR/m-p/1073739#M1727</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to send a string message via LPUART1 inside a&amp;nbsp;PORTC Interrupt Service Routine. I configured the LPUART with DMA (Ch1 Rx and Ch2 Tx). Inside the ISR I call the function:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LPUART_DRV_SendData&lt;/STRONG&gt;(INST_LPUART1, (uint8_t *)&lt;STRONG&gt;msg&lt;/STRONG&gt;, strlen(&lt;STRONG&gt;msg&lt;/STRONG&gt;));&lt;/P&gt;&lt;P&gt;to send the string &lt;STRONG&gt;msg &lt;/STRONG&gt;on a terminal.&lt;/P&gt;&lt;P&gt;The result is that if i press SW3 or SW4 on the S32K148 EVB the ISR is called correctly, but on the terminal the message start a infinite loop.&amp;nbsp;My goal is to send&amp;nbsp;&lt;STRONG&gt;msg&amp;nbsp;&lt;/STRONG&gt;each time the ISR is executed.&lt;/P&gt;&lt;P&gt;If I use &lt;STRONG&gt;LPUART_DRV_SendData&lt;/STRONG&gt; to send a message in the main function it works as expected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone please help me to understand this behaviour?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Apr 2020 16:19:22 GMT</pubDate>
    <dc:creator>alberto_florio</dc:creator>
    <dc:date>2020-04-23T16:19:22Z</dc:date>
    <item>
      <title>LPUART Tx inside an ISR</title>
      <link>https://community.nxp.com/t5/S32-SDK/LPUART-Tx-inside-an-ISR/m-p/1073739#M1727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to send a string message via LPUART1 inside a&amp;nbsp;PORTC Interrupt Service Routine. I configured the LPUART with DMA (Ch1 Rx and Ch2 Tx). Inside the ISR I call the function:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LPUART_DRV_SendData&lt;/STRONG&gt;(INST_LPUART1, (uint8_t *)&lt;STRONG&gt;msg&lt;/STRONG&gt;, strlen(&lt;STRONG&gt;msg&lt;/STRONG&gt;));&lt;/P&gt;&lt;P&gt;to send the string &lt;STRONG&gt;msg &lt;/STRONG&gt;on a terminal.&lt;/P&gt;&lt;P&gt;The result is that if i press SW3 or SW4 on the S32K148 EVB the ISR is called correctly, but on the terminal the message start a infinite loop.&amp;nbsp;My goal is to send&amp;nbsp;&lt;STRONG&gt;msg&amp;nbsp;&lt;/STRONG&gt;each time the ISR is executed.&lt;/P&gt;&lt;P&gt;If I use &lt;STRONG&gt;LPUART_DRV_SendData&lt;/STRONG&gt; to send a message in the main function it works as expected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone please help me to understand this behaviour?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Apr 2020 16:19:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-SDK/LPUART-Tx-inside-an-ISR/m-p/1073739#M1727</guid>
      <dc:creator>alberto_florio</dc:creator>
      <dc:date>2020-04-23T16:19:22Z</dc:date>
    </item>
    <item>
      <title>Re: LPUART Tx inside an ISR</title>
      <link>https://community.nxp.com/t5/S32-SDK/LPUART-Tx-inside-an-ISR/m-p/1073740#M1728</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Alberto!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: bold;"&gt;LPUART_DRV_SendData&amp;nbsp;&lt;/STRONG&gt;function uses some interrupts itself (even when the transfer is DMA based - there is one interrupt at the end of the transfer), so it might be affected by the fact that it's called from an interrupt context (depending on latencies, priorities etc). A first piece of advise would be to only update a volatile flag inside the PORT ISR, then use that for triggering the UART transfer from the thread context.&lt;/P&gt;&lt;P&gt;If this still doesn't work, please try to attach your application code so we can take a closer look.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vlad Lionte&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Apr 2020 11:22:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-SDK/LPUART-Tx-inside-an-ISR/m-p/1073740#M1728</guid>
      <dc:creator>B46399</dc:creator>
      <dc:date>2020-04-24T11:22:05Z</dc:date>
    </item>
    <item>
      <title>Re: LPUART Tx inside an ISR</title>
      <link>https://community.nxp.com/t5/S32-SDK/LPUART-Tx-inside-an-ISR/m-p/1073741#M1729</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Vlad, I missed the interrupt at the end of DMA transfer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Alberto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Apr 2020 15:57:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-SDK/LPUART-Tx-inside-an-ISR/m-p/1073741#M1729</guid>
      <dc:creator>alberto_florio</dc:creator>
      <dc:date>2020-04-24T15:57:22Z</dc:date>
    </item>
  </channel>
</rss>

