<?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>Kinetis Microcontrollers中的主题 Re: KL82 LPURT Interrupt Stuck</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL82-LPURT-Interrupt-Stuck/m-p/1286284#M60698</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;with an oscilloscope I figured the hardware is not sending the message in the first place. It turns out this is not a fault at the receiving end (as I suspected) but actually the message is not sent out.&lt;/P&gt;&lt;P&gt;Workaround currently in use: Reinitialize UART (only INIT not DEINIT) before sending any message. This is working fine.&lt;/P&gt;</description>
    <pubDate>Wed, 02 Jun 2021 19:04:08 GMT</pubDate>
    <dc:creator>mldevw</dc:creator>
    <dc:date>2021-06-02T19:04:08Z</dc:date>
    <item>
      <title>KL82 LPURT Interrupt Stuck</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL82-LPURT-Interrupt-Stuck/m-p/1280715#M60600</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a KL82 which I attached a modem to it. It communicates via UART.&lt;BR /&gt;If the bus is busy (message every second) everything works fine. But if there is rarely any activity (about once a minute) the interrupt for UART RX does not fire when the modem sends data.&lt;/P&gt;&lt;P&gt;This is resolved by reinitializing the UART.&lt;/P&gt;&lt;P&gt;Do you know why this occurs or how I can debug more deeply? Thanks a lot in advance.&lt;/P&gt;&lt;P&gt;Here is my ISR code for reference&lt;/P&gt;&lt;P&gt;void MODEM_LPUART_IRQHandler(void)&lt;BR /&gt;{&lt;BR /&gt;#ifdef TRACE_SYSVIEW_LPUART_CALLBACK&lt;BR /&gt;SEGGER_SYSVIEW_RecordEnterISR();&lt;BR /&gt;#endif&lt;BR /&gt;interfaceModem_hasWoken = pdFALSE;&lt;/P&gt;&lt;P&gt;/** if new data is in buffer */&lt;BR /&gt;if ((kLPUART_RxDataRegFullFlag)&amp;amp;LPUART_GetStatusFlags(MODEM_LPUART))&lt;BR /&gt;{&lt;BR /&gt;TPM_StopTimer(TPM0); /** stop timer for timeout detection */&lt;BR /&gt;interfaceModem_data = LPUART_ReadByte(MODEM_LPUART); /** read data from buffer */&lt;BR /&gt;if (uxQueueMessagesWaitingFromISR(InterfaceModem::rxQueue)&amp;lt;INTERFACE_MODEM_RX_QUEUE_SIZE-3)&lt;BR /&gt;{ /** Submit to queue */&lt;BR /&gt;xQueueSendFromISR(InterfaceModem::rxQueue,&amp;amp;interfaceModem_data,&amp;amp;interfaceModem_hasWoken);&lt;BR /&gt;if (interfaceModem_data=='\n')&lt;BR /&gt;{ /** if this char is a line ending, activate the timer. Every Message of SIM808 ends with */&lt;BR /&gt;TPM_SetTimerPeriod(TPM0,TIMER_MESSAGETIMEOUT_RELOAD_VALUE);&lt;BR /&gt;TPM_StartTimer(TPM0,kTPM_SystemClock);&lt;BR /&gt;TPM0-&amp;gt;CNT=0;&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{ /** If data could not be submitted, set overflow occured, clear queues and stop timeout timer */&lt;BR /&gt;InterfaceModem::rxOverflowOccured=1;&lt;BR /&gt;TPM_StopTimer(TPM0);&lt;BR /&gt;xQueueReceiveFromISR(InterfaceModem::rxMessageTimeoutSignalQueue,&amp;amp;interfaceModem_data,&amp;amp;interfaceModem_hasWoken);&lt;BR /&gt;while (xQueueReceiveFromISR(InterfaceModem::rxQueue,&amp;amp;interfaceModem_data,&amp;amp;interfaceModem_hasWoken)==pdTRUE);&lt;BR /&gt;InterfaceModem::rxOverflowOccured=1;&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;/* Add for ARM errata 838869, affects Cortex-M4, Cortex-M4F Store immediate overlapping&lt;BR /&gt;exception return operation might vector to incorrect interrupt */&lt;BR /&gt;#if defined __CORTEX_M &amp;amp;&amp;amp; (__CORTEX_M == 4U)&lt;BR /&gt;__DSB();&lt;BR /&gt;#endif&lt;/P&gt;&lt;P&gt;#ifdef TRACE_SYSVIEW_LPUART_CALLBACK&lt;BR /&gt;SEGGER_SYSVIEW_RecordExitISR();&lt;BR /&gt;#endif&lt;BR /&gt;portYIELD_FROM_ISR(interfaceModem_hasWoken);&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Sun, 23 May 2021 16:58:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL82-LPURT-Interrupt-Stuck/m-p/1280715#M60600</guid>
      <dc:creator>mldevw</dc:creator>
      <dc:date>2021-05-23T16:58:29Z</dc:date>
    </item>
    <item>
      <title>Re: KL82 LPURT Interrupt Stuck</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL82-LPURT-Interrupt-Stuck/m-p/1282464#M60625</link>
      <description>&lt;P&gt;Hi mldevw,&lt;/P&gt;
&lt;P&gt;Could it because the lpuart is deactived by your OS, for example the clock source is changed? If lpuart is configured properly, waiting time does not affect lpuart's work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Jing&lt;/P&gt;</description>
      <pubDate>Wed, 26 May 2021 09:28:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL82-LPURT-Interrupt-Stuck/m-p/1282464#M60625</guid>
      <dc:creator>jingpan</dc:creator>
      <dc:date>2021-05-26T09:28:42Z</dc:date>
    </item>
    <item>
      <title>Re: KL82 LPURT Interrupt Stuck</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL82-LPURT-Interrupt-Stuck/m-p/1282870#M60630</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am only doing one clock switch right at the start of the application. When the modem is running, no clock switch is taking place.&lt;/P&gt;&lt;P&gt;I am using FreeRTOS, I don't know if this could be the issue.&lt;/P&gt;&lt;P&gt;Strangely this occurs only when communication is rare. Once I keep the channel busy, I do not experience the problem anymore.&lt;/P&gt;&lt;P&gt;Edit: I am using the LPUART_Driver from the MCUXpresso SDK, not the FreeRTOS Driver.&lt;BR /&gt;I make sure that only one process is accessing the UART at a time.&lt;/P&gt;</description>
      <pubDate>Wed, 26 May 2021 20:10:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL82-LPURT-Interrupt-Stuck/m-p/1282870#M60630</guid>
      <dc:creator>mldevw</dc:creator>
      <dc:date>2021-05-26T20:10:42Z</dc:date>
    </item>
    <item>
      <title>Re: KL82 LPURT Interrupt Stuck</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL82-LPURT-Interrupt-Stuck/m-p/1283220#M60635</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;You can compare LPUART register settings and its clock source setting to see what is changed when it not work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Jing&lt;/P&gt;</description>
      <pubDate>Thu, 27 May 2021 07:50:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL82-LPURT-Interrupt-Stuck/m-p/1283220#M60635</guid>
      <dc:creator>jingpan</dc:creator>
      <dc:date>2021-05-27T07:50:21Z</dc:date>
    </item>
    <item>
      <title>Re: KL82 LPURT Interrupt Stuck</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL82-LPURT-Interrupt-Stuck/m-p/1283620#M60651</link>
      <description>&lt;P&gt;Hello, thanks for your reply.&lt;/P&gt;&lt;P&gt;I have already checked the interrupts, but the config is the same before the error and when the error occurs. It can take some time to reproduce the error, but I will feedback on the setting of the UART registers once it does.&lt;/P&gt;</description>
      <pubDate>Thu, 27 May 2021 16:44:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL82-LPURT-Interrupt-Stuck/m-p/1283620#M60651</guid>
      <dc:creator>mldevw</dc:creator>
      <dc:date>2021-05-27T16:44:18Z</dc:date>
    </item>
    <item>
      <title>Re: KL82 LPURT Interrupt Stuck</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL82-LPURT-Interrupt-Stuck/m-p/1283679#M60654</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;so I could reproduce the error and have the following finding:&lt;/P&gt;&lt;P&gt;EDIT2:&lt;/P&gt;&lt;P&gt;I made a mistake reading out, actually the STAT-Register changed&lt;BR /&gt;It changed from 00 80 00 00 to 00 D8 00 00 (error)&lt;BR /&gt;This means:&lt;BR /&gt;OR from 0 to 1&lt;BR /&gt;IDLE from 0 to 1&lt;BR /&gt;TC from 0 to 1&lt;BR /&gt;&lt;BR /&gt;In the other error case (00 D0 00 00):&lt;BR /&gt;OR = 0&lt;BR /&gt;IDLE = 1&lt;BR /&gt;TC = 1&lt;BR /&gt;&lt;BR /&gt;I have seen there is an overrun and I will concentrate on getting rid of that for now.&lt;BR /&gt;I'll get back to you if that solves the problem&lt;/P&gt;&lt;P&gt;&lt;STRIKE&gt;LPUART-&amp;gt;MODIR has changed from 00 D8 00 00 to 00 80 00 00&lt;/STRIKE&gt;&lt;BR /&gt;&lt;STRIKE&gt;(Value was printed out with printf("%" PRIu32,LPUART-&amp;gt;MODIR); and then converted to hex)&lt;/STRIKE&gt;&lt;/P&gt;&lt;P&gt;&lt;STRIKE&gt;EDIT: Now I have also seen a case where MODIR is 00 D0 00 00 both before the error and when it occured&lt;/STRIKE&gt;&lt;/P&gt;&lt;P&gt;&lt;STRIKE&gt;For my Init I use the defaults, but change the baudrate and enable tx and rx.&lt;/STRIKE&gt;&lt;/P&gt;&lt;P&gt;&lt;STRIKE&gt;LPUART_GetDefaultConfig(&amp;amp;config);&lt;/STRIKE&gt;&lt;BR /&gt;&lt;STRIKE&gt;config.baudRate_Bps = currentBaudrate;&lt;/STRIKE&gt;&lt;BR /&gt;&lt;STRIKE&gt;config.enableTx = true;&lt;/STRIKE&gt;&lt;BR /&gt;&lt;STRIKE&gt;config.enableRx = true;&lt;/STRIKE&gt;&lt;/P&gt;&lt;P&gt;&lt;STRIKE&gt;Reading the datasheet (see below) it's not clear to me what this means.&lt;/STRIKE&gt;&lt;BR /&gt;&lt;STRIKE&gt;Also I did not find any use of MODIR in the lpuart driver from the SDK but for initialisation.&lt;/STRIKE&gt;&lt;/P&gt;&lt;P&gt;&lt;STRIKE&gt;Can you please help me on finding out&lt;/STRIKE&gt;&lt;BR /&gt;&lt;STRIKE&gt;a) what the flags in the MODIR mean, which are changed&lt;/STRIKE&gt;&lt;BR /&gt;&lt;STRIKE&gt;b) why MODIR changes&lt;/STRIKE&gt;&lt;/P&gt;&lt;P&gt;&lt;STRIKE&gt;Thanks a lot in advance.&lt;/STRIKE&gt;&lt;/P&gt;&lt;P&gt;&lt;STRIKE&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mldevw_0-1622142872970.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/145721iA974902B62E7FEC0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mldevw_0-1622142872970.png" alt="mldevw_0-1622142872970.png" /&gt;&lt;/span&gt;&lt;/STRIKE&gt;&lt;/P&gt;&lt;P&gt;&lt;STRIKE&gt;Sub-Family Reference Manual Rev. 3, 08/2016, p. 1493&lt;/STRIKE&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 28 May 2021 15:24:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL82-LPURT-Interrupt-Stuck/m-p/1283679#M60654</guid>
      <dc:creator>mldevw</dc:creator>
      <dc:date>2021-05-28T15:24:41Z</dc:date>
    </item>
    <item>
      <title>Re: KL82 LPURT Interrupt Stuck</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL82-LPURT-Interrupt-Stuck/m-p/1284352#M60662</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;the overrun issue occurs although I am sure my ISR reads the byte in time.&lt;BR /&gt;The ringbuffer is not an option for me, as I need to use the RxBufFull Interrupt for timing and detecting the end of frame.&lt;/P&gt;&lt;P&gt;I have also tried to reset the flags register (STAT) before every sending, but this didn't help either.&lt;/P&gt;&lt;P&gt;any ideas?&lt;/P&gt;</description>
      <pubDate>Sat, 29 May 2021 05:08:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL82-LPURT-Interrupt-Stuck/m-p/1284352#M60662</guid>
      <dc:creator>mldevw</dc:creator>
      <dc:date>2021-05-29T05:08:51Z</dc:date>
    </item>
    <item>
      <title>Re: KL82 LPURT Interrupt Stuck</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL82-LPURT-Interrupt-Stuck/m-p/1285234#M60674</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;RDRF is set when the number of datawords in the receive buffer is greater than the number indicated by LPUART_WATER[RXWATER]. You can set a smaller RXWATER value to have enough time to read out data before overflow. You can enable ORIE bit to enable overflow interrupt to observe when overflow happen.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Jun 2021 08:30:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL82-LPURT-Interrupt-Stuck/m-p/1285234#M60674</guid>
      <dc:creator>jingpan</dc:creator>
      <dc:date>2021-06-01T08:30:48Z</dc:date>
    </item>
    <item>
      <title>Re: KL82 LPURT Interrupt Stuck</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL82-LPURT-Interrupt-Stuck/m-p/1285570#M60680</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;thanks for your feedback, I'll be watching the ORIE now.&lt;/P&gt;&lt;P&gt;I didn't quite understand why you pointed out RDRF, as this is never set in my case. Could you please elaborate?&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;Kind regards.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Jun 2021 17:56:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL82-LPURT-Interrupt-Stuck/m-p/1285570#M60680</guid>
      <dc:creator>mldevw</dc:creator>
      <dc:date>2021-06-01T17:56:43Z</dc:date>
    </item>
    <item>
      <title>Re: KL82 LPURT Interrupt Stuck</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL82-LPURT-Interrupt-Stuck/m-p/1286284#M60698</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;with an oscilloscope I figured the hardware is not sending the message in the first place. It turns out this is not a fault at the receiving end (as I suspected) but actually the message is not sent out.&lt;/P&gt;&lt;P&gt;Workaround currently in use: Reinitialize UART (only INIT not DEINIT) before sending any message. This is working fine.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jun 2021 19:04:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL82-LPURT-Interrupt-Stuck/m-p/1286284#M60698</guid>
      <dc:creator>mldevw</dc:creator>
      <dc:date>2021-06-02T19:04:08Z</dc:date>
    </item>
    <item>
      <title>Re: KL82 LPURT Interrupt Stuck</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL82-LPURT-Interrupt-Stuck/m-p/1291497#M60840</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;it turned out to provoke the same kind of error.&lt;/P&gt;&lt;P&gt;I am currently not sure what to do anymore, as I am taking care to fetch the data in a manner no OR occurs.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jun 2021 16:28:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL82-LPURT-Interrupt-Stuck/m-p/1291497#M60840</guid>
      <dc:creator>mldevw</dc:creator>
      <dc:date>2021-06-11T16:28:37Z</dc:date>
    </item>
  </channel>
</rss>

