<?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: Can anyone share sample code for ISR based UART in MQX RTOS - i am using K21 for this in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/Can-anyone-share-sample-code-for-ISR-based-UART-in-MQX-RTOS-i-am/m-p/335743#M10817</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;Actually, if I don’t want to change original BSP code, I think we could use new isr to replace old isr, and implement your ISR code here, just like mqx\examples\isr demonstrated:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   isr_ptr-&amp;gt;TICK_COUNT   = 0;&lt;/P&gt;&lt;P&gt;   isr_ptr-&amp;gt;OLD_ISR_DATA =&lt;/P&gt;&lt;P&gt;      &lt;U&gt;int&lt;/U&gt;get_isr_data(BSP_TIMER_INTERRUPT_VECTOR);//get back old isr data and save&lt;/P&gt;&lt;P&gt;   isr_ptr-&amp;gt;OLD_ISR      =&lt;/P&gt;&lt;P&gt;      &lt;U&gt;int&lt;/U&gt;get_isr(BSP_TIMER_INTERRUPT_VECTOR);//get back old isr and save&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   &lt;U&gt;int&lt;/U&gt;install_isr(BSP_TIMER_INTERRUPT_VECTOR, new_tick_isr,&lt;/P&gt;&lt;P&gt;      isr_ptr);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void new_tick_isr&lt;/P&gt;&lt;P&gt;   (&lt;/P&gt;&lt;P&gt;      pointer user_isr_ptr&lt;/P&gt;&lt;P&gt;   )&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;   MY_ISR_STRUCT_PTR  isr_ptr;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   isr_ptr = (MY_ISR_STRUCT_PTR)user_isr_ptr;&lt;/P&gt;&lt;P&gt;   isr_ptr-&amp;gt;TICK_COUNT++;//do your code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   /* Chain to the previous notifier */&lt;/P&gt;&lt;P&gt;   (*isr_ptr-&amp;gt;OLD_ISR)(isr_ptr-&amp;gt;OLD_ISR_DATA);// call old isr routinue;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dawei You（尤大为）;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Aug 2014 16:35:07 GMT</pubDate>
    <dc:creator>daweiyou</dc:creator>
    <dc:date>2014-08-06T16:35:07Z</dc:date>
    <item>
      <title>Can anyone share sample code for ISR based UART in MQX RTOS - i am using K21 for this</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Can-anyone-share-sample-code-for-ISR-based-UART-in-MQX-RTOS-i-am/m-p/335739#M10813</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Currently my requirement is to use UART 2 in K21 as interrupt driven. For this can anyone help me with example code which receives daata from UART byte by byte.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Harish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Aug 2014 09:58:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Can-anyone-share-sample-code-for-ISR-based-UART-in-MQX-RTOS-i-am/m-p/335739#M10813</guid>
      <dc:creator>harishveeravall</dc:creator>
      <dc:date>2014-08-05T09:58:48Z</dc:date>
    </item>
    <item>
      <title>Re: Can anyone share sample code for ISR based UART in MQX RTOS - i am using K21 for this</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Can-anyone-share-sample-code-for-ISR-based-UART-in-MQX-RTOS-i-am/m-p/335740#M10814</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Harish:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Freescale_MQX_4_1\mqx\examples\rs485 demo default use UART interrupt routine;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which define UART3, you can change follow your HW,  the ittyx indicate UART driver use interrupt mode, ttyx indicate UART driver use polling mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* set RS485 output device */&lt;/P&gt;&lt;P&gt;#define RS485_CHANNEL "ittyd:"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dawei You（尤大为）&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Aug 2014 14:18:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Can-anyone-share-sample-code-for-ISR-based-UART-in-MQX-RTOS-i-am/m-p/335740#M10814</guid>
      <dc:creator>daweiyou</dc:creator>
      <dc:date>2014-08-05T14:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: Can anyone share sample code for ISR based UART in MQX RTOS - i am using K21 for this</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Can-anyone-share-sample-code-for-ISR-based-UART-in-MQX-RTOS-i-am/m-p/335741#M10815</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Dawei,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I want to do something in the interrupt function,how should I modify the source code?&lt;/P&gt;&lt;P&gt;Do I have to modify the interrupt function in the BSP?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Aug 2014 09:18:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Can-anyone-share-sample-code-for-ISR-based-UART-in-MQX-RTOS-i-am/m-p/335741#M10815</guid>
      <dc:creator>小勇邹</dc:creator>
      <dc:date>2014-08-06T09:18:12Z</dc:date>
    </item>
    <item>
      <title>Re: Can anyone share sample code for ISR based UART in MQX RTOS - i am using K21 for this</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Can-anyone-share-sample-code-for-ISR-based-UART-in-MQX-RTOS-i-am/m-p/335742#M10816</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dawei,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the example code given in rs485, it is waiting  @ fread(data_buffer, 1,&lt;/P&gt;&lt;P&gt;18, rs485_dev); and can't we skip this?? and i would rather like to capture&lt;/P&gt;&lt;P&gt;the data as an interrupt, without any function call. Is there any function&lt;/P&gt;&lt;P&gt;of such a kind?? I have noticed on calling fread it is waiting and on&lt;/P&gt;&lt;P&gt;reception of data from UART it is hitting &lt;U&gt;io&lt;/U&gt;serial_int_read () in&lt;/P&gt;&lt;P&gt;serl_int.c file where i can capture actual data and if we donot call fread&lt;/P&gt;&lt;P&gt;it is not hitting this function. Can you please help me resolving this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Harish&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On Tue, Aug 5, 2014 at 7:49 PM, Dawei You &amp;lt;admin@community.freescale.com&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Aug 2014 11:49:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Can-anyone-share-sample-code-for-ISR-based-UART-in-MQX-RTOS-i-am/m-p/335742#M10816</guid>
      <dc:creator>harishveeravall</dc:creator>
      <dc:date>2014-08-06T11:49:30Z</dc:date>
    </item>
    <item>
      <title>Re: Can anyone share sample code for ISR based UART in MQX RTOS - i am using K21 for this</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Can-anyone-share-sample-code-for-ISR-based-UART-in-MQX-RTOS-i-am/m-p/335743#M10817</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;Actually, if I don’t want to change original BSP code, I think we could use new isr to replace old isr, and implement your ISR code here, just like mqx\examples\isr demonstrated:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   isr_ptr-&amp;gt;TICK_COUNT   = 0;&lt;/P&gt;&lt;P&gt;   isr_ptr-&amp;gt;OLD_ISR_DATA =&lt;/P&gt;&lt;P&gt;      &lt;U&gt;int&lt;/U&gt;get_isr_data(BSP_TIMER_INTERRUPT_VECTOR);//get back old isr data and save&lt;/P&gt;&lt;P&gt;   isr_ptr-&amp;gt;OLD_ISR      =&lt;/P&gt;&lt;P&gt;      &lt;U&gt;int&lt;/U&gt;get_isr(BSP_TIMER_INTERRUPT_VECTOR);//get back old isr and save&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   &lt;U&gt;int&lt;/U&gt;install_isr(BSP_TIMER_INTERRUPT_VECTOR, new_tick_isr,&lt;/P&gt;&lt;P&gt;      isr_ptr);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void new_tick_isr&lt;/P&gt;&lt;P&gt;   (&lt;/P&gt;&lt;P&gt;      pointer user_isr_ptr&lt;/P&gt;&lt;P&gt;   )&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;   MY_ISR_STRUCT_PTR  isr_ptr;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   isr_ptr = (MY_ISR_STRUCT_PTR)user_isr_ptr;&lt;/P&gt;&lt;P&gt;   isr_ptr-&amp;gt;TICK_COUNT++;//do your code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   /* Chain to the previous notifier */&lt;/P&gt;&lt;P&gt;   (*isr_ptr-&amp;gt;OLD_ISR)(isr_ptr-&amp;gt;OLD_ISR_DATA);// call old isr routinue;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dawei You（尤大为）;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Aug 2014 16:35:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Can-anyone-share-sample-code-for-ISR-based-UART-in-MQX-RTOS-i-am/m-p/335743#M10817</guid>
      <dc:creator>daweiyou</dc:creator>
      <dc:date>2014-08-06T16:35:07Z</dc:date>
    </item>
  </channel>
</rss>

