<?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>ColdFire/68K Microcontrollers and ProcessorsのトピックRe: MCF5223x UART TXEMPTY interrupt</title>
    <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5223x-UART-TXEMPTY-interrupt/m-p/168516#M6049</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Thanks for the tip about TXRTS bit giving this functionality. I must admit that I didn't read UART description line by line, expecting it to be somewhat similar to every other UART I've seen - HC11, HC12, etc.&lt;BR /&gt;&lt;BR /&gt;I still miss TXEMPTY interrupt functionality, because it gives greater flexibility. Using RXRTS requires adequate hardware: active RTS is low, typical RS485 driver chip has active high TE (transmitter enable). So:&lt;BR /&gt;- driver TE must be connected to RTS line, no other I/O pin will do the job&lt;BR /&gt;- inverter is required to match logic levels.&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 30 Nov 2007 23:33:15 GMT</pubDate>
    <dc:creator>MichalKonieczny</dc:creator>
    <dc:date>2007-11-30T23:33:15Z</dc:date>
    <item>
      <title>MCF5223x UART TXEMPTY interrupt</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5223x-UART-TXEMPTY-interrupt/m-p/168513#M6046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;SPAN&gt;UART USR status register has TEMP (TXEMPTY) flag and TXRDY flag for signalling transmitter state, pretty standard stuff. But UIMR/UISR interrupt register has the flag only for TXRDY, there's no TXEMPTY here.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm interfacing with RS-485 network and TXEMPTY interrupt was always an obvious way to turn off the transmitter AFTER the whole data block is shifted onto the wire.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there really no TXEMPTY interrupt, or am I missing something ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Nov 2007 23:29:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5223x-UART-TXEMPTY-interrupt/m-p/168513#M6046</guid>
      <dc:creator>MichalKonieczny</dc:creator>
      <dc:date>2007-11-29T23:29:56Z</dc:date>
    </item>
    <item>
      <title>Re: MCF5223x UART TXEMPTY interrupt</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5223x-UART-TXEMPTY-interrupt/m-p/168514#M6047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;BR /&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;Michal Konieczny wrote:&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;BR /&gt;Is there really no TXEMPTY interrupt, or am I missing something ?&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;I think you have to poll for the empty condition. And you must leave tx enabled for the empty flag to work. The program I started with had:&lt;BR /&gt;&lt;BR /&gt;MCF_UART_UCR(dev) = MCF_UART_UCR_TX_DISABLED;&lt;BR /&gt;&lt;BR /&gt;in the ISR when there is nothing left to send. I had to replace that with:&lt;BR /&gt;&lt;BR /&gt;MCF_UART_UIMR(dev) = MCF_UART_UIMR_RXRDY_FU;&lt;BR /&gt;&lt;BR /&gt;(which clears the TXRDY interrupt enable and leaves RXRDY_FU enabled).&lt;BR /&gt;&lt;BR /&gt;Then the polling routine checks for empty:&lt;BR /&gt;&lt;BR /&gt;if (MCF_UART_USR(dev) &amp;amp; MCF_UART_USR_TXEMP) ...&lt;BR /&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Nov 2007 00:59:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5223x-UART-TXEMPTY-interrupt/m-p/168514#M6047</guid>
      <dc:creator>bkatt</dc:creator>
      <dc:date>2007-11-30T00:59:41Z</dc:date>
    </item>
    <item>
      <title>Re: MCF5223x UART TXEMPTY interrupt</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5223x-UART-TXEMPTY-interrupt/m-p/168515#M6048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;I think they expect you to use the RTS control signal to enable/disable the RS-485 output. Here is the relevant paragraph from the 5282 manual, which works much like the 5223x:&lt;BR /&gt;&lt;BR /&gt;"If the transmitter is programmed to automatically negate URTSn when a message transmission completes,&lt;BR /&gt;URTSn must be asserted manually before a message is sent. In applications in which the transmitter is&lt;BR /&gt;disabled after transmission is complete and URTSn is appropriately programmed, URTSn is negated one&lt;BR /&gt;bit time after the character in the shift register is completely transmitted. The transmitter must be manually&lt;BR /&gt;reenabled by reasserting URTSn before the next message is to be sent."&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Nov 2007 14:06:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5223x-UART-TXEMPTY-interrupt/m-p/168515#M6048</guid>
      <dc:creator>bkatt</dc:creator>
      <dc:date>2007-11-30T14:06:22Z</dc:date>
    </item>
    <item>
      <title>Re: MCF5223x UART TXEMPTY interrupt</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5223x-UART-TXEMPTY-interrupt/m-p/168516#M6049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Thanks for the tip about TXRTS bit giving this functionality. I must admit that I didn't read UART description line by line, expecting it to be somewhat similar to every other UART I've seen - HC11, HC12, etc.&lt;BR /&gt;&lt;BR /&gt;I still miss TXEMPTY interrupt functionality, because it gives greater flexibility. Using RXRTS requires adequate hardware: active RTS is low, typical RS485 driver chip has active high TE (transmitter enable). So:&lt;BR /&gt;- driver TE must be connected to RTS line, no other I/O pin will do the job&lt;BR /&gt;- inverter is required to match logic levels.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Nov 2007 23:33:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5223x-UART-TXEMPTY-interrupt/m-p/168516#M6049</guid>
      <dc:creator>MichalKonieczny</dc:creator>
      <dc:date>2007-11-30T23:33:15Z</dc:date>
    </item>
  </channel>
</rss>

