<?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: How to read the last part of data from FIFO in ColdFire/68K Microcontrollers and Processors</title>
    <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-read-the-last-part-of-data-from-FIFO/m-p/172194#M6442</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="http://forums.freescale.com/t5/user/viewprofilepage/user-id/16908" target="_self"&gt;&lt;SPAN&gt;Chethu&lt;/SPAN&gt;&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&amp;gt; The 6 bytes here is just an example, the data size may be anything (from 10 bytes to 256 bytes) in&lt;/P&gt;&lt;P&gt;&amp;gt; such cases how can i know when i have to read the receiver again.&lt;/P&gt;&lt;P&gt;Usually, message with variable length also includes the header with the message length. Count the remaining bytes after analyzing the header.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 02 Feb 2010 19:41:15 GMT</pubDate>
    <dc:creator>admin</dc:creator>
    <dc:date>2010-02-02T19:41:15Z</dc:date>
    <item>
      <title>How to read the last part of data from FIFO</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-read-the-last-part-of-data-from-FIFO/m-p/172188#M6436</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 MCF52259 controller. For data reception through UART I am using the FIFO FFULL interrupt, the FIFO has 4 registers, if i have to receive 6&amp;nbsp; bytes i will get 1 interrupt for first 4 bytes and i read them, but the problem is when i receive the last 2 bytes of data i wont get interrupt &amp;amp; lose those 2 bytes.&lt;/P&gt;&lt;P&gt;Please provide solution,how to read &amp;lt;4 bytes of data from 4byte FIFO&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thnx &amp;amp; regards&amp;nbsp;&lt;/P&gt;&lt;P&gt;Chethu&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Feb 2010 12:57:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-read-the-last-part-of-data-from-FIFO/m-p/172188#M6436</guid>
      <dc:creator>Chethu</dc:creator>
      <dc:date>2010-02-02T12:57:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to read the last part of data from FIFO</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-read-the-last-part-of-data-from-FIFO/m-p/172189#M6437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;You can set up the UART to generate an interrupt on RXRDY condition rather than FIFO FULL. This way you'll get an interrupt for each received character. Or you can poll the UART periodically to detect the remaining 2 bytes.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Feb 2010 17:05:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-read-the-last-part-of-data-from-FIFO/m-p/172189#M6437</guid>
      <dc:creator>scifi</dc:creator>
      <dc:date>2010-02-02T17:05:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to read the last part of data from FIFO</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-read-the-last-part-of-data-from-FIFO/m-p/172190#M6438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Scifi,&lt;/P&gt;&lt;P&gt;Getting interrupt for each byte i thought would be overload for the controller hence i thot of getting the&amp;nbsp; interrupt only after the FIFO is full. this would reduce the frequency of ISR to 1/4.&lt;/P&gt;&lt;P&gt;If at all i have to go for FIFO how can i get the last two bytes of 6 bytes data(MCF52259 has 4 FIFO receiver registers)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards ,&lt;/P&gt;&lt;P&gt;Chethu&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Feb 2010 17:16:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-read-the-last-part-of-data-from-FIFO/m-p/172190#M6438</guid>
      <dc:creator>Chethu</dc:creator>
      <dc:date>2010-02-02T17:16:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to read the last part of data from FIFO</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-read-the-last-part-of-data-from-FIFO/m-p/172191#M6439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using single interrupt per received byte is seem the most reliable solutions with satisfactory CPU overhead.&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;To deal with case of long interrupt latency, the ISR must read FIFO until it is empty.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you can control format of the received message, extend your message to 8 bytes length with the two dummy bytes. It will permit to use full 4 byte FIFO length and only two interrupts per message.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Another solution: reconfigure UART interrupt logics from full FIFO condition to single byte condition - after receiving first 4 bytes. It reduces quantity of interrupts per message from 6 to 3.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Feb 2010 17:39:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-read-the-last-part-of-data-from-FIFO/m-p/172191#M6439</guid>
      <dc:creator>admin</dc:creator>
      <dc:date>2010-02-02T17:39:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to read the last part of data from FIFO</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-read-the-last-part-of-data-from-FIFO/m-p/172192#M6440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Overload of the controller? I wouldn't worry about that at this stage. How can you know that an interrupt for each byte does overload the MCU and an interrupt for each 4 bytes does not? You can only tell after you have MEASURED that. You shouldn't make life difficult for yourself based on an unfounded concern.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;...how can i get the last two bytes of 6 bytes data?&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not sure I understand the question. As soon as you read a byte from a full FIFO, the FIFO is ready to receive a new byte.&lt;/P&gt;&lt;P&gt;Say, you've read 4 bytes from the FIFO. You then wait for the other 2 bytes to arrive and you read them from the FIFO. That's it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Feb 2010 17:43:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-read-the-last-part-of-data-from-FIFO/m-p/172192#M6440</guid>
      <dc:creator>scifi</dc:creator>
      <dc:date>2010-02-02T17:43:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to read the last part of data from FIFO</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-read-the-last-part-of-data-from-FIFO/m-p/172193#M6441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="http://forums.freescale.com/t5/user/viewprofilepage/user-id/9363" target="_self"&gt;http://forums.freescale.com/t5/user/viewprofilepage/user-id/9363" target="_self&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;The 6 bytes here is just an example, the data size may be anything (from 10 bytes to 256 bytes) in such cases how can i know when i have to read the receiver again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Chethu&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Feb 2010 18:38:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-read-the-last-part-of-data-from-FIFO/m-p/172193#M6441</guid>
      <dc:creator>Chethu</dc:creator>
      <dc:date>2010-02-02T18:38:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to read the last part of data from FIFO</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-read-the-last-part-of-data-from-FIFO/m-p/172194#M6442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="http://forums.freescale.com/t5/user/viewprofilepage/user-id/16908" target="_self"&gt;&lt;SPAN&gt;Chethu&lt;/SPAN&gt;&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&amp;gt; The 6 bytes here is just an example, the data size may be anything (from 10 bytes to 256 bytes) in&lt;/P&gt;&lt;P&gt;&amp;gt; such cases how can i know when i have to read the receiver again.&lt;/P&gt;&lt;P&gt;Usually, message with variable length also includes the header with the message length. Count the remaining bytes after analyzing the header.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Feb 2010 19:41:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-read-the-last-part-of-data-from-FIFO/m-p/172194#M6442</guid>
      <dc:creator>admin</dc:creator>
      <dc:date>2010-02-02T19:41:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to read the last part of data from FIFO</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-read-the-last-part-of-data-from-FIFO/m-p/172195#M6443</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yevgenit,&lt;/P&gt;&lt;P&gt;I am implementing the modbus protocol and I cant expect the fixed number of data bytes based on the header of the data(I have to handle the error condition also) .&lt;/P&gt;&lt;P&gt;if I receive 7 bytes in place of 6(which the header says) I have to reject the data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Feb 2010 20:33:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-read-the-last-part-of-data-from-FIFO/m-p/172195#M6443</guid>
      <dc:creator>Chethu</dc:creator>
      <dc:date>2010-02-02T20:33:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to read the last part of data from FIFO</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-read-the-last-part-of-data-from-FIFO/m-p/172196#M6444</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Since you are implementing the MODBUS protocol, having an interrupt for each received byte may be unavoidable. For example, the MODBUS spec says that silent intervals between bytes on the serial line must not exceed 1.5 character times. To detect that, you'll have to set up a timer for each received byte.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Feb 2010 21:19:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-read-the-last-part-of-data-from-FIFO/m-p/172196#M6444</guid>
      <dc:creator>scifi</dc:creator>
      <dc:date>2010-02-02T21:19:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to read the last part of data from FIFO</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-read-the-last-part-of-data-from-FIFO/m-p/172197#M6445</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Scifi,&lt;/P&gt;&lt;P&gt;I am not checking for 1.5char time delay between each character as I dont have dat timer resolution(infact i dont wanto keep the task running to check the interval so frequently,my baud rate is 9600 hence 1.5char delay means its 1.25msec). Hence m just checking for 3.5char delay for the end of frame.&lt;BR /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Feb 2010 22:09:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-read-the-last-part-of-data-from-FIFO/m-p/172197#M6445</guid>
      <dc:creator>Chethu</dc:creator>
      <dc:date>2010-02-02T22:09:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to read the last part of data from FIFO</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-read-the-last-part-of-data-from-FIFO/m-p/172198#M6446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A timer is your only solution unless you interrupt when the FIFO is not empty. Other UARTs I have used have provided inter-character timeout interrupts to handle this case.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Becareful of adjusting the message length to align to the FIFO size. It may work great on a bench but most real world situations have noise and this can add or remove characters from the stream.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Feb 2010 07:12:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-read-the-last-part-of-data-from-FIFO/m-p/172198#M6446</guid>
      <dc:creator>ChrisJohns</dc:creator>
      <dc:date>2010-02-03T07:12:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to read the last part of data from FIFO</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-read-the-last-part-of-data-from-FIFO/m-p/172199#M6447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thnx for the tips chris,&lt;/P&gt;&lt;P&gt;after al i have decided not to go for&amp;nbsp; FIFO for receiver. But for transmission i could have used the FIFO as the data length is purely in my hand. But the controller MCF52259 has only 2 transmit FIFO registers and there is no FIFO interrupt to subscribe for transmitter.Can u please tell me what the use of transmitter FIFO in this controller when there is no interrupt can be subscribed for it(only for TXREADY the interrupt can be subscribed).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards ,&lt;/P&gt;&lt;P&gt;Chethu&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Feb 2010 12:53:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-read-the-last-part-of-data-from-FIFO/m-p/172199#M6447</guid>
      <dc:creator>Chethu</dc:creator>
      <dc:date>2010-02-03T12:53:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to read the last part of data from FIFO</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-read-the-last-part-of-data-from-FIFO/m-p/172200#M6448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;ColdFire processors have UARTS coupled with DMA. You can use DMA transfer for receive, but there is little problem to measure timeouts in MODBUS protocol. Usage fo DMA for UART transmit is peace of cake, you need to make buffer in RAM which contain output message, start DMA transfer and wait it to finish. In that case you don't have any interrupt exept interrupt on last send character. Search forum for DMA-UART topics.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Feb 2010 14:51:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-read-the-last-part-of-data-from-FIFO/m-p/172200#M6448</guid>
      <dc:creator>aersek</dc:creator>
      <dc:date>2010-02-03T14:51:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to read the last part of data from FIFO</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-read-the-last-part-of-data-from-FIFO/m-p/172201#M6449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="http://forums.freescale.com/t5/user/viewprofilepage/user-id/16908" target="_self"&gt;&lt;SPAN&gt;Chethu&lt;/SPAN&gt;&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&amp;gt; Can u please tell me what the use of transmitter FIFO in this controller when there is no interrupt&lt;/P&gt;&lt;P&gt;&amp;gt; can be subscribed for it(only for TXREADY the interrupt can be subscribed).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Usually (I am not familiar with details of MCF52259 UART), UART without Tx FIFO has the shift Tx register and the hold Tx register. When all the bits (except the stop bit) are shifted to the Tx line, content (if the hold register isn't empty) of the hold register is moved to the shift register.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Usually, status bit TXREADY shows empty state of the Tx hold register. Thus, the UART ISR can load the next byte after TXREADY bit (and the related interrupt request) is raised by the UART hardware. Moving the hold register content to the shift register will raise TXREADY bit again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Feb 2010 15:31:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-read-the-last-part-of-data-from-FIFO/m-p/172201#M6449</guid>
      <dc:creator>admin</dc:creator>
      <dc:date>2010-02-03T15:31:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to read the last part of data from FIFO</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-read-the-last-part-of-data-from-FIFO/m-p/172202#M6450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi aersek,&lt;/P&gt;&lt;P&gt;Thanks a lot for ur help. Now i am planning to implement the transmission part through DMA.I hope that will solve the problem of repeated ISRs for each byte of transmission.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Chethu&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Feb 2010 20:21:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-read-the-last-part-of-data-from-FIFO/m-p/172202#M6450</guid>
      <dc:creator>Chethu</dc:creator>
      <dc:date>2010-02-03T20:21:15Z</dc:date>
    </item>
  </channel>
</rss>

