<?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: FRDM-K22F uart receive interrupts? in Kinetis Software Development Kit</title>
    <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FRDM-K22F-uart-receive-interrupts/m-p/352866#M438</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nope, I was wrong - the issue is still occurring. Medium-priority UART interrupts (RX/TX) don't seem to happen inside a low-priority timer interrupt function.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;In my previous comment, the code seemed to be working beause it was seeing the ping and response from the previous cycle. If the RX buffer is properly cleared at the start of the timer function, it doesn't see any response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;****Edit*****&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My mistake. I had a critical section wrapping my low-priority interrupt function which was blocking the UART interrupts. After putting the UART poll outside the CS, everything works fine.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 May 2017 16:33:37 GMT</pubDate>
    <dc:creator>asfarley</dc:creator>
    <dc:date>2017-05-03T16:33:37Z</dc:date>
    <item>
      <title>FRDM-K22F uart receive interrupts?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FRDM-K22F-uart-receive-interrupts/m-p/352858#M430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to get a uart receive interrupt to work using KDS 2.0.0 and KSDK 1.1.0. I created a "hello world" KSDK/Processor Export application and tried to put the interrupt manager calls below to cause my function to be called (RecvCharISR). The UART is working because I call "debug_printf" in main() and it sends the text to my terminal emulator program. What am I missing?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: 10pt;"&gt;/* Write your code here */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp; INT_SYS_InstallHandler(&lt;/SPAN&gt;&lt;EM style=": ; color: #0000c0; font-size: 10pt;"&gt;UART1_RX_TX_IRQn&lt;/EM&gt;&lt;SPAN style="font-size: 10pt;"&gt;, RecvCharISR);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp; INT_SYS_EnableIRQ(&lt;/SPAN&gt;&lt;EM style=": ; color: #0000c0; font-size: 10pt;"&gt;UART1_RX_TX_IRQn&lt;/EM&gt;&lt;SPAN style="font-size: 10pt;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jan 2015 21:44:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FRDM-K22F-uart-receive-interrupts/m-p/352858#M430</guid>
      <dc:creator>christophertsch</dc:creator>
      <dc:date>2015-01-16T21:44:26Z</dc:date>
    </item>
    <item>
      <title>Re: FRDM-K22F uart receive interrupts?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FRDM-K22F-uart-receive-interrupts/m-p/352859#M431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Christopher,&lt;/P&gt;&lt;P&gt;Regarding your question, I do not know where is the &lt;SPAN style="font-size: 10pt;"&gt;INT_SYS_InstallHandler(&lt;/SPAN&gt;&lt;EM style="color: #0000c0; font-size: 10pt;"&gt;UART1_RX_TX_IRQn&lt;/EM&gt;&lt;SPAN style="font-size: 10pt;"&gt;, RecvCharISR);. If you want to use UART based on interrupt mode, it is okay to call UART_DRV_SendData() or UART_DRV_ReceiveData() rather than UART_DRV_SendDataBlocking(), the &lt;SPAN style="font-size: 10pt;"&gt; UART_DRV_SendDataBlocking() function uses polling mode, &lt;SPAN style="font-size: 10pt;"&gt;UART_DRV_SendData() function uses interrupt mode&lt;/SPAN&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I develop an example for UART based on "Hell World" example in SDK, pls refer to it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Pls refer to the Hello World" example located at:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;C:\Freescale\KSDK_1.0.0\demos\hello_world\kds\frdmk22f120m&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;change the hello_world.c as the attached. The hello_world.c is&amp;nbsp; located at:C:\Freescale\KSDK_1.0.0\demos\hello_world\src&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;BR&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;XiangJun Rong&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jan 2015 07:31:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FRDM-K22F-uart-receive-interrupts/m-p/352859#M431</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2015-01-19T07:31:00Z</dc:date>
    </item>
    <item>
      <title>Re: FRDM-K22F uart receive interrupts?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FRDM-K22F-uart-receive-interrupts/m-p/352860#M432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi XiangJun,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I appreciate your input but I am confused by your hello_world.c. You have code associating the function pit_callback with the PIT timer inside of the USE_STDIO_FUNCTIONS ifdef but then you added the non-blocking UART_DRV_Send and UART_DRV_ReceiveData to the else to the section not inside of the USE_STDIO_FUNCTIONS. Shouldn't they all be together? Should I define USE_STDIO_FUNCTIONS?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jan 2015 15:06:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FRDM-K22F-uart-receive-interrupts/m-p/352860#M432</guid>
      <dc:creator>christophertsch</dc:creator>
      <dc:date>2015-01-20T15:06:40Z</dc:date>
    </item>
    <item>
      <title>Re: FRDM-K22F uart receive interrupts?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FRDM-K22F-uart-receive-interrupts/m-p/352861#M433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Christopher,&lt;/P&gt;&lt;P&gt;I am sorry for the confusion. Because another customer asked PIT question based on SDK, so I developed the code to test PIT, it is useless for you, you can remove the code of PIT&amp;nbsp; and GPIO modules.&lt;/P&gt;&lt;P&gt;Note that the&lt;SPAN style="font-size: 10pt;"&gt; UART_DRV_SendData() and &lt;SPAN style="font-size: 10pt;"&gt;UART_DRV_ReceiveData() api functions use interrupt mode, when you call the function, after every char has been transferred or received,the UART_DRV_IRQHandler() will be entered automatically.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Hope it can help you&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;BR&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;XiangJun Rong&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jan 2015 02:14:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FRDM-K22F-uart-receive-interrupts/m-p/352861#M433</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2015-01-22T02:14:42Z</dc:date>
    </item>
    <item>
      <title>Re: FRDM-K22F uart receive interrupts?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FRDM-K22F-uart-receive-interrupts/m-p/352862#M434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey, sorry to resurrect an old post but I was wondering if I could get a little more information on using the UART_DRV_ReceiveData() function.&lt;/P&gt;&lt;P&gt;As above, this is an interrupt driven routine. In my understanding using UART with Interrupts is designed to reduce the load in the processor however to use this function there seems to be a requirement to run the UART_DRV_ReceiveData() function and then wait for the receive to complete which seems quite processor intensive.&lt;/P&gt;&lt;P&gt;How would I go about modifying this so the interrupt will fire without having to call UART_DRV_ReceiveData() on every execution of the while loop?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jan 2016 11:51:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FRDM-K22F-uart-receive-interrupts/m-p/352862#M434</guid>
      <dc:creator>pidgeydoyle</dc:creator>
      <dc:date>2016-01-13T11:51:25Z</dc:date>
    </item>
    <item>
      <title>Re: FRDM-K22F uart receive interrupts?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FRDM-K22F-uart-receive-interrupts/m-p/352863#M435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Peter.&lt;/P&gt;&lt;P&gt;I'm starting with a FRDM K22F and i have the same issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May be in this months you found an answer to this question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Apr 2016 14:50:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FRDM-K22F-uart-receive-interrupts/m-p/352863#M435</guid>
      <dc:creator>basanta79</dc:creator>
      <dc:date>2016-04-06T14:50:25Z</dc:date>
    </item>
    <item>
      <title>Re: FRDM-K22F uart receive interrupts?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FRDM-K22F-uart-receive-interrupts/m-p/352864#M436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Bump, having the same issue.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a periodic timer loop generating a medium-priority interrupt. Inside the function, I do a UART transmit, short delay, then recieve. When I check the recieved data, the GetCharsInRxBuf function returns 0. If I repeatedly wait until the next execution of my timer loop, I can see that the RX buffer is actually filling up, it just doesn't change status inside the periodic timer function. Here's pseudocode:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void LoggingTimer() {&lt;/P&gt;&lt;P&gt;TransmitPing();&lt;/P&gt;&lt;P&gt;Wait_ms(30);&lt;/P&gt;&lt;P&gt;GetResponse(&amp;amp;buffer);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I call my periodic function outside of interrupt context (in application startup), the RX buffer recieves incoming bytes immediately after transmitting which seems to indicate that this is an interrupt-related issue.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The UART in question is set to high-priority, so it should be able to recieve if a byte comes in during the logging function.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas what is going on here?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**Edit**&lt;/P&gt;&lt;P&gt;I am using a K22F in KDS with Processor Expert, not using the SDK.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 May 2017 21:55:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FRDM-K22F-uart-receive-interrupts/m-p/352864#M436</guid>
      <dc:creator>asfarley</dc:creator>
      <dc:date>2017-05-02T21:55:59Z</dc:date>
    </item>
    <item>
      <title>Re: FRDM-K22F uart receive interrupts?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FRDM-K22F-uart-receive-interrupts/m-p/352865#M437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Welll, this is a bit strange. The UART RX is&amp;nbsp;working inside an interrupt now. I believe all I did was change the timed interrupt to low-priority and set the UART RX/TX interrupts back to medium-priority. I don't see why this should be any different than the case where the UART is high-priority and the timer is medium-priority.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 May 2017 23:04:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FRDM-K22F-uart-receive-interrupts/m-p/352865#M437</guid>
      <dc:creator>asfarley</dc:creator>
      <dc:date>2017-05-02T23:04:12Z</dc:date>
    </item>
    <item>
      <title>Re: FRDM-K22F uart receive interrupts?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FRDM-K22F-uart-receive-interrupts/m-p/352866#M438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nope, I was wrong - the issue is still occurring. Medium-priority UART interrupts (RX/TX) don't seem to happen inside a low-priority timer interrupt function.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;In my previous comment, the code seemed to be working beause it was seeing the ping and response from the previous cycle. If the RX buffer is properly cleared at the start of the timer function, it doesn't see any response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;****Edit*****&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My mistake. I had a critical section wrapping my low-priority interrupt function which was blocking the UART interrupts. After putting the UART poll outside the CS, everything works fine.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 May 2017 16:33:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FRDM-K22F-uart-receive-interrupts/m-p/352866#M438</guid>
      <dc:creator>asfarley</dc:creator>
      <dc:date>2017-05-03T16:33:37Z</dc:date>
    </item>
  </channel>
</rss>

