<?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 Code in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/UART-Code/m-p/145540#M9</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi. Please use code tag when you post a code in the discussion.&lt;/P&gt;&lt;P&gt;fstatus returns TRUE if you have unread character in the buffer, FALSE otherwise.&lt;/P&gt;&lt;P&gt;So it would be smarter to call read() after fstatus...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are you sure that that '1' pressed is not displayed also in your terminal? No way to explain such '1'...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Oct 2009 20:31:24 GMT</pubDate>
    <dc:creator>JuroV</dc:creator>
    <dc:date>2009-10-13T20:31:24Z</dc:date>
    <item>
      <title>UART Code</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/UART-Code/m-p/145535#M4</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am working on UART code using MQX now. I went the user guide and the example code. I am still not clear on how should i initialise the uart function and transmit or received a set of data. I know the following steps are require for a UART to work&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) Initailise the UART port with required baud rate, parity and stop bits&lt;/P&gt;&lt;P&gt;3) Initialise the interrupt register to enable the UART ISR&lt;/P&gt;&lt;P&gt;4) Transmit the data to the UART TX register to transmit the data&lt;/P&gt;&lt;P&gt;5) Receive the data from UARTRX register to receive the data.&lt;/P&gt;&lt;P&gt;6) Change the baud rate if required.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But i am not clear on how sholud this be done using MQX :smileysad: . Please help me in explaining the steps i need to follow for writing code using MQX. I would be more happy if the steps are explained using example code. I am struck up with this module and looking forward for help at the earliest.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks and Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sai Bhargavi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Oct 2009 12:33:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/UART-Code/m-p/145535#M4</guid>
      <dc:creator>saibhargavi</dc:creator>
      <dc:date>2009-10-07T12:33:26Z</dc:date>
    </item>
    <item>
      <title>Re: UART Code</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/UART-Code/m-p/145536#M5</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;UART is initialized in init_bsp.c file and the init function takes parameters from init_uartX.c.&lt;/P&gt;&lt;P&gt;After that, your UART is initialized and ready to use. The standard output stream is, usually*, mapped to UART0- so you can printf() to the UART.&lt;/P&gt;&lt;P&gt;UART driver code actually support two drivers: interrupt driven and polled. Use user_config.h to select ttyX: (polled) or ittyX: (interrupt).&lt;/P&gt;&lt;P&gt;Use file search function in Windows to search for these files within MQX tree.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*this can be configured in user_config.h&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Oct 2009 16:30:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/UART-Code/m-p/145536#M5</guid>
      <dc:creator>JuroV</dc:creator>
      <dc:date>2009-10-09T16:30:29Z</dc:date>
    </item>
    <item>
      <title>Re: UART Code</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/UART-Code/m-p/145537#M6</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I will write this to the next reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you want to read RX register and so on, you can do it- the best start is to look how does UART driver (mqx/source/io/serial) handle with registers. You will not open driver in init_bsp.h, but initialize and read UART in your own procedures.&lt;/P&gt;&lt;P&gt;In my point of view, I dont see any benefit in writing what was already written and is tested, but you are a customer.&lt;/P&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by JuroV on&lt;/SPAN&gt; &lt;SPAN class="local-date"&gt;2009-10-09&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;11:43 AM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Oct 2009 16:33:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/UART-Code/m-p/145537#M6</guid>
      <dc:creator>JuroV</dc:creator>
      <dc:date>2009-10-09T16:33:49Z</dc:date>
    </item>
    <item>
      <title>Re: UART Code</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/UART-Code/m-p/145538#M7</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi JuroV,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thankyou for your reply. This mail helped me a lot in learning UART code.. After going thorugh the files&amp;nbsp;i wrote an UART0 code as below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;extern void main_task(uint_32);&lt;BR /&gt;extern void uart0_task(uint_32);&lt;/P&gt;&lt;P&gt;#define UART0_TASK&amp;nbsp;&amp;nbsp; 11&lt;BR /&gt;TASK_TEMPLATE_STRUCT MQX_template_list[] =&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; { 10, main_task, 2000, 9, "Main",MQX_AUTO_START_TASK, 0, 0},&lt;BR /&gt;&amp;nbsp;&amp;nbsp; { UART0_TASK, uart0_task, 2000, 8, "uart0",0, 0, 0},&lt;BR /&gt;&amp;nbsp;&amp;nbsp; { 0,&amp;nbsp; 0,&amp;nbsp;0,&amp;nbsp;&amp;nbsp; 0, 0,&amp;nbsp; 0,0, 0}&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;void main_task&lt;BR /&gt;&amp;nbsp;&amp;nbsp; (&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; uint_32 initial_data&lt;BR /&gt;&amp;nbsp;&amp;nbsp; )&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;_task_id uart0_task_id;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;uart0_task_id = _task_create(0, UART0_TASK, 0);&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;if(uart0_task_id == MQX_NULL_TASK_ID)&lt;BR /&gt;&amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;printf("\n could not create uart0 task \n");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;_mqx_exit(0);&lt;BR /&gt;&amp;nbsp;}&lt;BR /&gt;&amp;nbsp;else&lt;BR /&gt;&amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;void uart0_task(uint_32 initial_data)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;pointer uart0_ptr;&lt;BR /&gt;&amp;nbsp;char Z, uart0[200];&lt;BR /&gt;&amp;nbsp;uint_16 i = 0;&lt;BR /&gt;&amp;nbsp;volatile boolean result=0xdeadbeef;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;uart0_ptr = (pointer)fopen("ittya:",BSP_DEFAULT_IO_OPEN_MODE);&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;if(uart0_ptr == NULL)&lt;BR /&gt;&amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;printf("cannot open ittya device \n");&lt;BR /&gt;&amp;nbsp;}&lt;BR /&gt;&amp;nbsp;else&lt;BR /&gt;&amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;printf("device opened succesfully \n");&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;fflush(stdout);&lt;BR /&gt;&amp;nbsp;}&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;while(1)&lt;BR /&gt;&amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;read(uart0_ptr,(pointer)&amp;amp;Z,1);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;uart0[i] = Z;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;//dont know why this checking is done ...&amp;nbsp;please explain me this&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;if(result = fstatus(uart0_ptr))&lt;BR /&gt;&amp;nbsp;&amp;nbsp;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt;&amp;nbsp;else&lt;BR /&gt;&amp;nbsp;&amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(uart0[i] == 0x31)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(i ==45)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;i =0;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&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; i++;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;write(uart0_ptr,(pointer)"\n",1);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;write(uart0_ptr,(pointer)"Y",1);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;else&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt;&amp;nbsp;}&lt;BR /&gt;}&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After i flash and run the above code it should send "Y" to the comm port if i press 1 on the key board but it sends "1Y" as output instead . I dont know why is this happening ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Looking forward for your suggestion&amp;nbsp;in sorting out this :smileysad:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks and Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sai Bhargavi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Oct 2009 15:06:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/UART-Code/m-p/145538#M7</guid>
      <dc:creator>saibhargavi</dc:creator>
      <dc:date>2009-10-13T15:06:14Z</dc:date>
    </item>
    <item>
      <title>Re: UART Code</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/UART-Code/m-p/145539#M8</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have one more doubt. Say for example if i need to receive a response from the slave within 100 ms after i transmit a request&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Case1:&lt;/P&gt;&lt;P&gt;In a non- RTOS code we will just run a timer and see if we have receievd a response before the timer expiry. If not received then we will reset the buffer..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Case2:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how will we chck for this timing in the uart0 task routine ???? ot in what way we should check for this timer expiry :smileyhappy:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks and Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sai Bhargavi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Oct 2009 15:14:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/UART-Code/m-p/145539#M8</guid>
      <dc:creator>saibhargavi</dc:creator>
      <dc:date>2009-10-13T15:14:14Z</dc:date>
    </item>
    <item>
      <title>Re: UART Code</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/UART-Code/m-p/145540#M9</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi. Please use code tag when you post a code in the discussion.&lt;/P&gt;&lt;P&gt;fstatus returns TRUE if you have unread character in the buffer, FALSE otherwise.&lt;/P&gt;&lt;P&gt;So it would be smarter to call read() after fstatus...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are you sure that that '1' pressed is not displayed also in your terminal? No way to explain such '1'...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Oct 2009 20:31:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/UART-Code/m-p/145540#M9</guid>
      <dc:creator>JuroV</dc:creator>
      <dc:date>2009-10-13T20:31:24Z</dc:date>
    </item>
    <item>
      <title>Re: UART Code</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/UART-Code/m-p/145541#M10</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;You can for example test time expired (use&amp;nbsp; _time_get(...)) for some interval value between 2 reads. You can use lwevent and wait for an event for specified time (event will be set by next task when char was received), you can use MQX's timer component. There are many ways.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Oct 2009 20:35:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/UART-Code/m-p/145541#M10</guid>
      <dc:creator>JuroV</dc:creator>
      <dc:date>2009-10-13T20:35:24Z</dc:date>
    </item>
    <item>
      <title>Re: UART Code</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/UART-Code/m-p/145542#M11</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Search for&amp;nbsp; BSP_DEFAULT_IO_OPEN_MODE in MQX code,you will find some thining like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#define BSP_DEFAULT_IO_OPEN_MODE&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; (pointer) (IO_SERIAL_XON_XOFF | IO_SERIAL_TRANSLATION | IO_SERIAL_ECHO)&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;remove the "IO_SERIAL_ECHO" part. then the "1"&amp;nbsp; you pressed will not echo back.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;hope this helps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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;&lt;P&gt;Jeff&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Oct 2009 20:49:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/UART-Code/m-p/145542#M11</guid>
      <dc:creator>eGuy</dc:creator>
      <dc:date>2009-10-13T20:49:07Z</dc:date>
    </item>
    <item>
      <title>Re: UART Code</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/UART-Code/m-p/145543#M12</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;you can also change BSP_DEFAULT_IO_OPEN_MODE define to IO_SERIAL_RAW_IO if you don't need XON/XOFF to be handled by MQX low level serial driver.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Oct 2009 03:34:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/UART-Code/m-p/145543#M12</guid>
      <dc:creator>eGuy</dc:creator>
      <dc:date>2009-10-14T03:34:33Z</dc:date>
    </item>
    <item>
      <title>Re: UART Code</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/UART-Code/m-p/145544#M13</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, i tried to use the io example in the 52259DEMOKIT board, but replacing the fopen("ttyb:"...) with the the ttyc: port, which is the port in the accesible pins, I changed the value of the macro BSPCFG_ENABLE_TTYC to 1 in m52259.h, recompiled the bsp and psp but nothing is coming out by the port.Even with all connections copied from the schematics&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;
 pointer fh_ptr;   printf("This is printed to the default device\n");   fflush(stdout);   if (!strcmp("ttya:", BSP_DEFAULT_IO_CHANNEL))     fh_ptr = (pointer)fopen("ttyc:", BSP_DEFAULT_IO_OPEN_MODE);   else     fh_ptr = (pointer)fopen("ttya:", BSP_DEFAULT_IO_OPEN_MODE);   if (fh_ptr == NULL) {      printf("cannot open the other IO device\n");   } else {      _io_set_handle(IO_STDOUT, fh_ptr);      printf("This is printed to the other device\n");   }      fflush(stdout);   _mqx_exit(0); &lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Anyone have an idea of what i'm missing?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 08:46:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/UART-Code/m-p/145544#M13</guid>
      <dc:creator>Jairo</dc:creator>
      <dc:date>2020-10-29T08:46:50Z</dc:date>
    </item>
    <item>
      <title>Re: UART Code</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/UART-Code/m-p/145545#M14</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can we use an ISR to receive the data from UART port instead of read??. Can anyone send me an example code for RX and TX using ISR??&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sai Bhargavi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Oct 2009 11:03:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/UART-Code/m-p/145545#M14</guid>
      <dc:creator>saibhargavi</dc:creator>
      <dc:date>2009-10-26T11:03:46Z</dc:date>
    </item>
    <item>
      <title>Re: UART Code</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/UART-Code/m-p/145546#M15</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The UART modules have two operation modes polled and interrupt driven, the default mode is polled, to enable the interrupt driven you need to modify the user_config.h inn the BSP and recompile, i can't give you example code but look on the hello2 example as far as i can remember in that example you can modify some commented lines to convert the program from polled to interrupt.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Oct 2009 11:48:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/UART-Code/m-p/145546#M15</guid>
      <dc:creator>Jairo</dc:creator>
      <dc:date>2009-10-27T11:48:42Z</dc:date>
    </item>
    <item>
      <title>Re: UART Code</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/UART-Code/m-p/145547#M16</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thankyou for your reply. I have one more doubt regarding the UART communication. When we write code&amp;nbsp;in MCF52259&amp;nbsp;not using MQX,&amp;nbsp;we check for MCF_UART_UISR_RXRDY_FU in MCF_UART_UISR register to see if the uart is in receive mode and MCF_UART_UISR_TXRDY_FU in MCF_UART_UISR to check if uart is in TX mode and then take neccessary action either to transmit or receive in the same routine.. how will we do the same in MQX??&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sai Bhargavi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2009 13:37:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/UART-Code/m-p/145547#M16</guid>
      <dc:creator>saibhargavi</dc:creator>
      <dc:date>2009-10-29T13:37:59Z</dc:date>
    </item>
    <item>
      <title>Re: UART Code</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/UART-Code/m-p/145548#M17</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MQX UART driver uses USR register and checks its flags TXRDY and RXRDY, it's always open for both transmit and receiving.&lt;/P&gt;&lt;P&gt;You can still (partially) emulate the routine and its behaviour you described using fputc, fgetc and fstatus functions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;PetrM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2009 20:22:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/UART-Code/m-p/145548#M17</guid>
      <dc:creator>PetrM</dc:creator>
      <dc:date>2009-10-29T20:22:49Z</dc:date>
    </item>
    <item>
      <title>Re: UART Code</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/UART-Code/m-p/145549#M18</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to modify the Hello2 example in the mqx example folder to use interrupt driven IO and I'm running into some problems.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have added the following lines to the user_config.h(and remade all libraries just to be sure).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;
#define BSPCFG_ENABLE_TTYA   0#define BSPCFG_ENABLE_ITTYA   1&lt;/PRE&gt;&lt;P&gt;and I uncommented the delay code in the hello2.c source.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I run the program however, nothing is ever printed to the screen.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do I have to do an extra step in order to use the interrupt driven IO?&amp;nbsp;&lt;/P&gt;&amp;nbsp;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 08:46:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/UART-Code/m-p/145549#M18</guid>
      <dc:creator>MrCleaver</dc:creator>
      <dc:date>2020-10-29T08:46:52Z</dc:date>
    </item>
    <item>
      <title>Re: UART Code</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/UART-Code/m-p/145550#M19</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah, nevermind, I have figured it out.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I guess printf will always write to the driver defined by a macro in one of the files in BSP which is set to 'ttya'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so if I want to print to ittya I need to obtain a file handle to ittya (via fopen) and then use fprintf to specify printing to the interrupt driven serial driver.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would interrupt driven receive be somewhat similar to this procedure?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How would I service the interrupt (by printing out the character entered for example) when receiving data from an interrupt driven IO channel?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;--If this post should go to a different thread my apologies, but I think the problems are somewhat related to the parent issue so I put it here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by MrCleaver on&lt;/SPAN&gt; &lt;SPAN class="local-date"&gt;2009-11-04&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;12:30 AM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Nov 2009 08:23:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/UART-Code/m-p/145550#M19</guid>
      <dc:creator>MrCleaver</dc:creator>
      <dc:date>2009-11-04T08:23:26Z</dc:date>
    </item>
    <item>
      <title>Re: UART Code</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/UART-Code/m-p/145551#M20</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;printf and scanf use task's IO_STDOUT, IO_STDIN handles.&lt;/P&gt;&lt;P&gt;Use BSP_DEFAULT_IO_CHANNEL in user_config.h to set default value for all tasks. It does not depend on if you use polled ("ttyX:") or interrupt ("ittyX:") driver.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Nov 2009 16:03:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/UART-Code/m-p/145551#M20</guid>
      <dc:creator>JuroV</dc:creator>
      <dc:date>2009-11-04T16:03:37Z</dc:date>
    </item>
    <item>
      <title>Re: UART Code</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/UART-Code/m-p/145552#M21</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried to find out the hello2.c file in the mqx installation folder, but didn't found it, was it available with some older vesion of mqx ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any example source code for UART using isr - receiving ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any inputs will be greatly helpful to me&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Nirav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Apr 2010 06:07:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/UART-Code/m-p/145552#M21</guid>
      <dc:creator>niravj</dc:creator>
      <dc:date>2010-04-07T06:07:37Z</dc:date>
    </item>
    <item>
      <title>Re: UART Code</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/UART-Code/m-p/145553#M22</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nirav,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;hello2.c is available in the following path,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;C:\Program Files\Freescale\Freescale MQX 3.5\mqx\examples\hello2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Which version of MQX RTOS are you using? I am currently using version 3.5.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is NO example source code for interrupt driven UART.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is ONLY UART polling example source code available with MQX RTOS installation..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also am struggling with the same. There is no proper documentation by MQX to explain about this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I shall update you if I get a breakthrough.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Apr 2010 17:14:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/UART-Code/m-p/145553#M22</guid>
      <dc:creator>Lakshmi</dc:creator>
      <dc:date>2010-04-07T17:14:44Z</dc:date>
    </item>
    <item>
      <title>Re: UART Code</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/UART-Code/m-p/145554#M23</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lakshmi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the update, I was able to see the code and example - hello2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Meanwhile I am agree with you the documentation of Freescale in this regards i.e. using UART with help of BSP in interrupt mode is - most probably no at all available - probably not for any bsp available.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I contacted freescale technical support local contacts and he also updated me the same.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any freescaler reading this thread can update us if he/she have further information in this regards.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Beside this if you are finding any head way in the same let me know and I will also do the same....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your inputs...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Apr 2010 21:49:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/UART-Code/m-p/145554#M23</guid>
      <dc:creator>niravj</dc:creator>
      <dc:date>2010-04-07T21:49:25Z</dc:date>
    </item>
  </channel>
</rss>

