<?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: k60 UART Interrupts in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/k60-UART-Interrupts/m-p/387137#M12909</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;After a few days of working this problem I have moved forward to the point where I can send characters to the display over the serial port but the receive side of things is still causing me a problem, made worse by the fact that the receive port seems to be storing the data as it's transmitted out. This is really messing up the receiver.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I think I need is a mechanism of disabling the receiver when I transmit, then enable the receiver (perhaps by an interrupt) when we want to listen for any incoming traffic and there is nothing to transmit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I could do with some guidance on developing the ISR and how to include this into my code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any assistance would be appreciated&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ken&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Oct 2014 18:57:06 GMT</pubDate>
    <dc:creator>MWMinor</dc:creator>
    <dc:date>2014-10-15T18:57:06Z</dc:date>
    <item>
      <title>k60 UART Interrupts</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/k60-UART-Interrupts/m-p/387136#M12908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using CW10.6 and MQX4.1 and developing an application with the K60 on a TWSK60 tower assembly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have connected a TFT display which has a serial port (just TX/RX) which I'm driving through UART4 (ttye:) on the K60 board. The commands for the display are sent as "printf" string commands.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f0055; font-size: 10pt;"&gt;&lt;STRONG&gt;void&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; *fh_ptr;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;fh_ptr = (&lt;/SPAN&gt;&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;void&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; *)fopen(&lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: 10pt;"&gt;"&lt;SPAN style="text-decoration: underline;"&gt;ttye&lt;/SPAN&gt;:"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;, BSP_DEFAULT_IO_OPEN_MODE); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #7f0055; font-size: 10pt;"&gt;if&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; (fh_ptr == NULL) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;printf(&lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: 10pt;"&gt;"Cannot open the interface to the display\n"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;); /* prints on default IO port */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #642880; font-size: 10pt;"&gt;_task_block&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;} /* ttye port available */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #642880; font-size: 10pt;"&gt;_io_set_handle&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;(IO_STDOUT, fh_ptr);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;printf(&lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: 10pt;"&gt;"FRAME 10 10 300 204 5 0 %d\n"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;,ORANGE); /*draws a frame on the display at coordinates 10 10 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Every was going nicely until I needed to receive some data from the display (it has a touch screen capability and sends characters down the serial port to indicate coordinates etc) so thought I would just reconfigure the ttye: port to be an interrupt driven one by making the change to the config.h file and enabling the ittye: instead of ttye: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm sure there are some other changes I need to make like adding some form of interrupt service routine to deal with characters received from the display, but I'm really struggling to find either examples or sufficiently clear words in the documentation. On top of that, the printf commands no longer consistently get through to the display&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me please...?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ken&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Oct 2014 12:29:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/k60-UART-Interrupts/m-p/387136#M12908</guid>
      <dc:creator>MWMinor</dc:creator>
      <dc:date>2014-10-13T12:29:13Z</dc:date>
    </item>
    <item>
      <title>Re: k60 UART Interrupts</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/k60-UART-Interrupts/m-p/387137#M12909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;After a few days of working this problem I have moved forward to the point where I can send characters to the display over the serial port but the receive side of things is still causing me a problem, made worse by the fact that the receive port seems to be storing the data as it's transmitted out. This is really messing up the receiver.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I think I need is a mechanism of disabling the receiver when I transmit, then enable the receiver (perhaps by an interrupt) when we want to listen for any incoming traffic and there is nothing to transmit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I could do with some guidance on developing the ISR and how to include this into my code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any assistance would be appreciated&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ken&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Oct 2014 18:57:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/k60-UART-Interrupts/m-p/387137#M12909</guid>
      <dc:creator>MWMinor</dc:creator>
      <dc:date>2014-10-15T18:57:06Z</dc:date>
    </item>
    <item>
      <title>Re: k60 UART Interrupts</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/k60-UART-Interrupts/m-p/387138#M12910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You don't need to develop an ISR. If you configure your project (in user_config.h) to use the interrupt-driven driver then open the "ittye:" port you need do no more. The driver includes ISRs to handle the transmit and receive queues and you can simply use getc and putc (or higher level things like printf) in the normal way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are seeing transmit characters coming back on your receive path, and you have a normal full-duplex underlying hardware link, then you likely have local-echo enabled at one end of the link. At the MQX end this is configured by the flags you pass to fopen. I see you are passing &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;BSP_DEFAULT_IO_OPEN_MODE; your BSP will tell you what that decodes to. You may need to pass something else.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Oct 2014 19:47:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/k60-UART-Interrupts/m-p/387138#M12910</guid>
      <dc:creator>matthewkendall</dc:creator>
      <dc:date>2014-10-15T19:47:00Z</dc:date>
    </item>
    <item>
      <title>Re: k60 UART Interrupts</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/k60-UART-Interrupts/m-p/387139#M12911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Matthew&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the answers. The hardware I am using at the moment is a TWR-K60D100M assembly and the BSP is one I cloned from that supplied by Freescale for that tower board, so I assume somewhere in the documentation I'll find out how to decode &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;BSP_DEFAULT_IO_OPEN_MODE. The serial port is a very simple one TX and RX only. No handshake controls so I guess not full duplex, but it does seem like the port is being configured to look like a terminal and just echo's characters back. I'll keep looking...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: Helvetica;"&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: Helvetica;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: Helvetica;"&gt;Ken&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Oct 2014 05:37:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/k60-UART-Interrupts/m-p/387139#M12911</guid>
      <dc:creator>MWMinor</dc:creator>
      <dc:date>2014-10-17T05:37:52Z</dc:date>
    </item>
    <item>
      <title>Re: k60 UART Interrupts</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/k60-UART-Interrupts/m-p/387140#M12912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Matthew,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've managed to progress this a little further but still having problems. I removed the IO_SERIAL_ECHO from BSP_DEFAULT_IO_OPEN_MODE but that made little difference. I then disconnected the display and used a scope to look at the Tx/Rx signals generated and can see the processor is putting out the same signals on both. ie when I transmit, the data can be seen on Tx &lt;STRONG&gt;AND&lt;/STRONG&gt; Rx....!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas as to how to stop this happening...?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ken&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Oct 2014 07:51:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/k60-UART-Interrupts/m-p/387140#M12912</guid>
      <dc:creator>MWMinor</dc:creator>
      <dc:date>2014-10-21T07:51:42Z</dc:date>
    </item>
  </channel>
</rss>

