<?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: FEC on 5225x in ColdFire/68K Microcontrollers and Processors</title>
    <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/FEC-on-5225x/m-p/150548#M3837</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt;Experience #2:&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt;Work? NO&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt;Idea: allocate 2 buffer_tx.&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt;Result: The transmition hangs when I try to send the 2o packet.&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt;The interrupt flag is not set, so the loop keeps closed forever...&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt;The buffer to be used is the first availbale according to the flags provided by descriptors.&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt;This way, the buffer 0 would be always used, once the transmissions request are too slow, therefore the&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt;buffer 0 could be free at&amp;nbsp; new requests.&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;To make work this experience you should set :&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;1st BD : &lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - status : R=1,L=0,W=0&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - length of data&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - pointer to data&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;2nd BD : (void BD)&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - status : R=1,L=1,W=1&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - length : 0&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - pointer : don't care&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;after you set TDAR.X_DES_ACTIVE and wait for interrupt flag.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;it works for me. Problem : when wrap bit is set with Ready and Last the FEC sends two times the BD. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 26 Oct 2013 10:12:44 GMT</pubDate>
    <dc:creator>mmdonatti</dc:creator>
    <dc:date>2013-10-26T10:12:44Z</dc:date>
    <item>
      <title>FEC on 5225x</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/FEC-on-5225x/m-p/150546#M3835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hy guys&lt;/P&gt;&lt;P&gt;I did some experiences with 52259 FEC transmitter, and the results were strange for me.&lt;/P&gt;&lt;P&gt;I used wireshark to see the packets.&lt;/P&gt;&lt;P&gt;I´m monitroring the interrupt flag in order to know about the end of transmission.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Experience #1:&lt;/P&gt;&lt;P&gt;Work? NO&lt;/P&gt;&lt;P&gt;Idea: allocate only one buffer_tx.&lt;/P&gt;&lt;P&gt;Result: the pacxet is transmitted twice, with 3uS between them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Experience #2:&lt;/P&gt;&lt;P&gt;Work? NO&lt;/P&gt;&lt;P&gt;Idea: allocate 2 buffer_tx.&lt;/P&gt;&lt;P&gt;Result: The transmition hangs when I try to send the 2o packet.&lt;/P&gt;&lt;P&gt;The interrupt flag is not set, so the loop keeps closed forever...&lt;/P&gt;&lt;P&gt;The buffer to be used is the first availbale according to the flags provided by descriptors.&lt;/P&gt;&lt;P&gt;This way, the buffer 0 would be always used, once the transmissions request are too slow, therefore the&lt;/P&gt;&lt;P&gt;buffer 0 could be free at&amp;nbsp; new requests.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Exérience #3&lt;/P&gt;&lt;P&gt;Work? YES&lt;/P&gt;&lt;P&gt;Idea: allocate 2 buffer_tx, BUT manage by my self the sequence of wich buffer has been used/released, trhough a variable (uint8 ix), and not just monitoring the descriptors flags.&lt;/P&gt;&lt;P&gt;This way, the next free buffer to be allocated is not scanned from #0 to #n (via descriptor flags), butdefined by the value of "ix" variable. ( free = .buffer [ix] ).&lt;/P&gt;&lt;P&gt;After each transmission, the variable ix is incremented,.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Conclusion&lt;/P&gt;&lt;P&gt;It seems the RISC engine MUST allocate / release the buffers tx in a sequentially way.&lt;/P&gt;&lt;P&gt;Due to it, it hangs if I try to use a free buffer [0] while the last transmited, lets say, was the buffer[2].&lt;/P&gt;&lt;P&gt;Seems that I must keep me synchronized to the RISC engine counter...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I remember, I needed to use&amp;nbsp;this approach to make the antecessor CPU (52235) FEC woks fine..&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;P&gt;Ricardo Raupp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jul 2011 19:49:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/FEC-on-5225x/m-p/150546#M3835</guid>
      <dc:creator>RicardoRaupp</dc:creator>
      <dc:date>2011-07-15T19:49:07Z</dc:date>
    </item>
    <item>
      <title>Re: FEC on 5225x</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/FEC-on-5225x/m-p/150547#M3836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ricardo&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;About the 2nd scenario, two buffer descriptors:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After modifying tx buffer descriptor, you request a xmit by writing into TDAR register. Then you're supposed to receive an interrupt for frame or buffer already sent. I think you'll be waiting fro frame completition. Then and only then you try to send the 2nd packet, right? Otherwise I'll think you'll have a race condition because FEC controller we'll be using 1 buffer with the Ready flag while you're modifying the 2nd buffer. You should wait for frame completetion interrupt (or TDAR being cleared) to start a new xmit process.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also think you don't need your own flag but you can resue some of the non-used buffer descriptor flags in the status word from each buffer descriptor. Maybe a general flag to make sure which was the last modified buffer descriptor.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let me know if I get this correctly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jul 2011 03:29:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/FEC-on-5225x/m-p/150547#M3836</guid>
      <dc:creator>PaoloRenzo</dc:creator>
      <dc:date>2011-07-21T03:29:56Z</dc:date>
    </item>
    <item>
      <title>Re: FEC on 5225x</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/FEC-on-5225x/m-p/150548#M3837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt;Experience #2:&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt;Work? NO&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt;Idea: allocate 2 buffer_tx.&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt;Result: The transmition hangs when I try to send the 2o packet.&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt;The interrupt flag is not set, so the loop keeps closed forever...&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt;The buffer to be used is the first availbale according to the flags provided by descriptors.&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt;This way, the buffer 0 would be always used, once the transmissions request are too slow, therefore the&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt;buffer 0 could be free at&amp;nbsp; new requests.&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;To make work this experience you should set :&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;1st BD : &lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - status : R=1,L=0,W=0&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - length of data&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - pointer to data&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;2nd BD : (void BD)&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - status : R=1,L=1,W=1&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - length : 0&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - pointer : don't care&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;after you set TDAR.X_DES_ACTIVE and wait for interrupt flag.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;it works for me. Problem : when wrap bit is set with Ready and Last the FEC sends two times the BD. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Oct 2013 10:12:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/FEC-on-5225x/m-p/150548#M3837</guid>
      <dc:creator>mmdonatti</dc:creator>
      <dc:date>2013-10-26T10:12:44Z</dc:date>
    </item>
    <item>
      <title>Re: FEC on 5225x</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/FEC-on-5225x/m-p/150549#M3838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You've posted to both this thread and the similar one:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/thread/63872" title="https://community.freescale.com/thread/63872"&gt;https://community.freescale.com/thread/63872&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The original problem (and yours if you were having it) seems it could be caused by the following.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Detailed in section "18.4.6.1 Duplicate Frame Transmission". You have to use at least THREE buffer descriptors in the ring, and also have to ensure that at least one of them is always "free".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A search of this Forum finds:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/message/63878#63878" title="https://community.freescale.com/message/63878#63878"&gt;https://community.freescale.com/message/63878#63878&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/message/101080#101080" title="https://community.freescale.com/message/101080#101080"&gt;https://community.freescale.com/message/101080#101080&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Oct 2013 12:53:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/FEC-on-5225x/m-p/150549#M3838</guid>
      <dc:creator>TomE</dc:creator>
      <dc:date>2013-10-26T12:53:48Z</dc:date>
    </item>
  </channel>
</rss>

