<?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 interrupt for receiving data in mqx 4.2 in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/uart-interrupt-for-receiving-data-in-mqx-4-2/m-p/482880#M15866</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;I am using UART for communicating with a BLE module. The end application has power limitations, because of which I want the device to wake up on UART interrupt (if it is in LLS)&amp;nbsp; and process the data received. Whenever data comes through UART lines, I should be able to parse the data.I am still having doubts..Can you please clarify these for me...&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;When I am using fgetc(), I am getting the value displayed (I am not using fputc,printf or anything ) in realterm. fgetc() is used to get value from terminal and not to display it. Am I wrong?&lt;/LI&gt;&lt;LI&gt;Even if BSP is configured for interrupt mode, Do we have to open the handle for UART? Is It a must?&lt;/LI&gt;&lt;LI&gt;I tried installing a new ISR and setting an event flag in the ISR whenever data is received using the following code snippet. Is it the right way?&lt;OL&gt;&lt;LI&gt;But in this approach, if I call printf() after installing ISR, code gets stuck. In TASK Summary no error is showing. Is the ISR mapping section wrong in the code. If I insert a delay after the installation, it works at times. Not always. Even In ISR, if I give printf() it doesn't come out of the ISR, it keeps on looping in ISR&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;/LI&gt;&lt;LI&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="uart_forum.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/57970i08E47A59F8E731A8/image-size/large?v=v2&amp;amp;px=999" role="button" title="uart_forum.PNG" alt="uart_forum.PNG" /&gt;&lt;/span&gt;&lt;/LI&gt;&lt;LI&gt;For the end application, I tried the following but no luck&lt;UL&gt;&lt;LI&gt;Enabled iityc in user_config. Didn't map a new ISR. Tried with the uart_rx_tx_isr() in bsp. I am getting data in the variable if I am doing it using fstatus and fgetc(). But I can't keep on waiting in a while(1) loop. So thought about&amp;nbsp; task blocking on events and waking up from LLS when UART event gets set. But since ISR is inside BSP, can I set event there? But anyways it won't be accessible as far as the application is considered&lt;/LI&gt;&lt;LI&gt;The next approach was&amp;nbsp; to use a new ISR and set event in that as the code attached as image. But there also some issues&lt;/LI&gt;&lt;LI&gt;The device wakes up when UART event comes, But I need an ISR which can be controlled by the user. That is the reason behind the second approach . I am not sure if this is the right approach&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Feb 2016 07:50:33 GMT</pubDate>
    <dc:creator>annamol</dc:creator>
    <dc:date>2016-02-04T07:50:33Z</dc:date>
    <item>
      <title>uart interrupt for receiving data in mqx 4.2</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/uart-interrupt-for-receiving-data-in-mqx-4-2/m-p/482878#M15864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am using TWR-K65F180M and IAR embedded workbench for ARM. I am trying to enable RX/TX interrupt in UART2 pins.For this the following changes were made&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;In user_config.h&lt;UL&gt;&lt;LI&gt;#define BSPCFG_ENABLE_ITTYC 1&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;In twrk65f180m.h&lt;/LI&gt;&lt;/UL&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #ifndef BSP_DEFAULT_IO_CHANNEL&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #if BSPCFG_ENABLE_ITTYC&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #define BSP_DEFAULT_IO_CHANNEL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "ittyc:"&amp;nbsp;&amp;nbsp;&amp;nbsp; /* OpenSDA-COM&amp;nbsp;&amp;nbsp; polled mode&amp;nbsp;&amp;nbsp; */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #define BSP_DEFAULT_IO_CHANNEL_DEFINED&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;After the changes, BSP, PSP were recompiled and built&lt;/LI&gt;&lt;LI&gt;In the application , I am opening ittyc and in IO_SERIAL_NON_BLOCKING and IO_SERIAL_RAW_IO&lt;/LI&gt;&lt;LI&gt;For receiving characters, I am waiting in a&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while(1)&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(fstatus(uart)) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data= fgetc(uart);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;I am having certain doubts regarding the working of the code,&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Is this how normally interrupt works for UART in MQX ? I saw many posts regarding UART interrupt for asynchronous messages. But everything is like this. I am not yet convinced that this is interrupt mode&lt;/LI&gt;&lt;LI&gt;Is it ok to use a new ISR? (I read that if we map a new ISR we are overwriting and creating contention in MQX )&lt;/LI&gt;&lt;LI&gt;All the data being transmitted from hyperterminal, I can see it on the screen itself. But I am not invoking any printf in my code. Even echo is also off. Any idea on why this happens&lt;/LI&gt;&lt;LI&gt;What does fstatus() do?&lt;/LI&gt;&lt;/OL&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please do suggest the corrections that needs to be done in the code&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-338636"&gt;uart_interrupt_1.c.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Feb 2016 11:59:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/uart-interrupt-for-receiving-data-in-mqx-4-2/m-p/482878#M15864</guid>
      <dc:creator>annamol</dc:creator>
      <dc:date>2016-02-02T11:59:49Z</dc:date>
    </item>
    <item>
      <title>Re: uart interrupt for receiving data in mqx 4.2</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/uart-interrupt-for-receiving-data-in-mqx-4-2/m-p/482879#M15865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Annamol,&lt;/P&gt;&lt;P&gt;If you have the UART setup as interrupt, you should not need the &lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;IO_SERIAL_NON_BLOCKING defined as interrupt mode is inherently non-blocking.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;As characters are received (or transmitted) the UART isr will add them to the UART Rx queue (or UART Tx queue for transmitted characters).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;The queue size is set in the BSP board definition file (ex: twrk70f120m.h header) as #define BSPCFG_SCI0_QUEUE_SIZE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 64.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;You can increase or decrease this as needed.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;The fstatus() function call is simply checking to see if the respective queue has any characters in it.&amp;nbsp; If yes then it returns TRUE else FALSE.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;I did a quick test using the hello_world MQX4.2 example for TWR-K70F120M (didn't have TWR-K65F180M handy) and was able to send long string of characters (256 long) and received correctly to application buffer (char data[512]) .&amp;nbsp; Here is my code snippet and I have attached my hello.c file.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14545187381145106" data-renderedposition="176_8_1155_400" jivemacro_uid="_14545187381145106"&gt;&lt;P&gt;void hello_task&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; uint32_t initial_data&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (void)initial_data; /* disable 'unused variable' warning */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("Hello World\n"); &lt;/P&gt;&lt;P&gt;#if 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //DES 1=test, 0=default code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; char data[512];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; char *data_ptr = data;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while(1)&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(fstatus(stdin)) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *data_ptr = fgetc(stdin);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data_ptr++;&lt;/P&gt;&lt;P&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data= fgetc(stdin);&lt;/P&gt;&lt;P&gt; //&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fputc(data,stdout);&lt;/P&gt;&lt;P&gt; //&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fputc('\n', stdout);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;#endif&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; _task_block();&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Reference: C:\Freescale\Freescale_MQX_4_2\mqx\examples\hello&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;David &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Feb 2016 17:00:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/uart-interrupt-for-receiving-data-in-mqx-4-2/m-p/482879#M15865</guid>
      <dc:creator>DavidS</dc:creator>
      <dc:date>2016-02-03T17:00:29Z</dc:date>
    </item>
    <item>
      <title>Re: uart interrupt for receiving data in mqx 4.2</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/uart-interrupt-for-receiving-data-in-mqx-4-2/m-p/482880#M15866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;I am using UART for communicating with a BLE module. The end application has power limitations, because of which I want the device to wake up on UART interrupt (if it is in LLS)&amp;nbsp; and process the data received. Whenever data comes through UART lines, I should be able to parse the data.I am still having doubts..Can you please clarify these for me...&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;When I am using fgetc(), I am getting the value displayed (I am not using fputc,printf or anything ) in realterm. fgetc() is used to get value from terminal and not to display it. Am I wrong?&lt;/LI&gt;&lt;LI&gt;Even if BSP is configured for interrupt mode, Do we have to open the handle for UART? Is It a must?&lt;/LI&gt;&lt;LI&gt;I tried installing a new ISR and setting an event flag in the ISR whenever data is received using the following code snippet. Is it the right way?&lt;OL&gt;&lt;LI&gt;But in this approach, if I call printf() after installing ISR, code gets stuck. In TASK Summary no error is showing. Is the ISR mapping section wrong in the code. If I insert a delay after the installation, it works at times. Not always. Even In ISR, if I give printf() it doesn't come out of the ISR, it keeps on looping in ISR&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;/LI&gt;&lt;LI&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="uart_forum.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/57970i08E47A59F8E731A8/image-size/large?v=v2&amp;amp;px=999" role="button" title="uart_forum.PNG" alt="uart_forum.PNG" /&gt;&lt;/span&gt;&lt;/LI&gt;&lt;LI&gt;For the end application, I tried the following but no luck&lt;UL&gt;&lt;LI&gt;Enabled iityc in user_config. Didn't map a new ISR. Tried with the uart_rx_tx_isr() in bsp. I am getting data in the variable if I am doing it using fstatus and fgetc(). But I can't keep on waiting in a while(1) loop. So thought about&amp;nbsp; task blocking on events and waking up from LLS when UART event gets set. But since ISR is inside BSP, can I set event there? But anyways it won't be accessible as far as the application is considered&lt;/LI&gt;&lt;LI&gt;The next approach was&amp;nbsp; to use a new ISR and set event in that as the code attached as image. But there also some issues&lt;/LI&gt;&lt;LI&gt;The device wakes up when UART event comes, But I need an ISR which can be controlled by the user. That is the reason behind the second approach . I am not sure if this is the right approach&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Feb 2016 07:50:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/uart-interrupt-for-receiving-data-in-mqx-4-2/m-p/482880#M15866</guid>
      <dc:creator>annamol</dc:creator>
      <dc:date>2016-02-04T07:50:33Z</dc:date>
    </item>
    <item>
      <title>Re: uart interrupt for receiving data in mqx 4.2</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/uart-interrupt-for-receiving-data-in-mqx-4-2/m-p/482881#M15867</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Annamol,&lt;/P&gt;&lt;P&gt;Quick reply with more tomorrow.&lt;/P&gt;&lt;P&gt;Please note the low power example has ability to wake system up using UART so please review the application and associated PDF:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Never call printf() from an isr.&amp;nbsp; You never want to call functions that might block and/or take a long time to execute.&amp;nbsp; This is why in my code example I was grabbing the UART data and storing it off into data[] buffer so I could halt application after having sent a bunch of characters to review in variable window and never tried to add code to the isr.&amp;nbsp; Although you can set event masks and post semiphore or mutex but not wait on them.&lt;/P&gt;&lt;P&gt;To read on this topic look at:&lt;/P&gt;&lt;P&gt;C:\Freescale\Freescale_MQX_4_2\doc\mqx\MQX_User_Guide.pdf &lt;/P&gt;&lt;P&gt;2.23 Interrupt and Exception Handling&lt;/P&gt;&lt;P&gt;3.9 Handling Interrupts and Exceptions &lt;/P&gt;&lt;P&gt;3.9.3.1 Functions That the ISR Cannot Call&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;David &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Feb 2016 20:33:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/uart-interrupt-for-receiving-data-in-mqx-4-2/m-p/482881#M15867</guid>
      <dc:creator>DavidS</dc:creator>
      <dc:date>2016-02-04T20:33:59Z</dc:date>
    </item>
    <item>
      <title>Re: uart interrupt for receiving data in mqx 4.2</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/uart-interrupt-for-receiving-data-in-mqx-4-2/m-p/482882#M15868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thanks for the support. got it working with events and storing it onto buffer and using it for later processing :smileyhappy:&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Feb 2016 09:42:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/uart-interrupt-for-receiving-data-in-mqx-4-2/m-p/482882#M15868</guid>
      <dc:creator>annamol</dc:creator>
      <dc:date>2016-02-05T09:42:42Z</dc:date>
    </item>
    <item>
      <title>Re: uart interrupt for receiving data in mqx 4.2</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/uart-interrupt-for-receiving-data-in-mqx-4-2/m-p/482883#M15869</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;One more doubt is there regarding fgetc() and data= sci_ptr-&amp;gt;D.&lt;/P&gt;&lt;P&gt;What does these statements do?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Feb 2016 09:45:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/uart-interrupt-for-receiving-data-in-mqx-4-2/m-p/482883#M15869</guid>
      <dc:creator>annamol</dc:creator>
      <dc:date>2016-02-05T09:45:04Z</dc:date>
    </item>
  </channel>
</rss>

