<?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>i.MX Processorsのトピックi.MX7 ENET receive initialization?</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/i-MX7-ENET-receive-initialization/m-p/714180#M111007</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I try to port the Ethernet interface driver from FreeBSD for i.MX6 to an i.MX7 Dual. The driver works in the loop back mode RCR[LOOP] == 1. I can also transmit frames. The problem is on the receiver side in normal mode (RCR[LOOP] == 0). The legacy descriptor ring is set up properly:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;_address|________0________4________8________C&lt;BR /&gt;801FFB80| 80000000 9FE54010 80000000 9FE54810&lt;BR /&gt;801FFB90| 80000000 9FE53010 80000000 9FE58810&lt;BR /&gt;801FFBA0| 80000000 9FE57010 80000000 9FE57810&lt;BR /&gt;[....]&lt;BR /&gt;801FFD50| 80000000 9FE73010 80000000 9FE73810&lt;BR /&gt;801FFD60| 80000000 9FE72010 80000000 9FE72810&lt;BR /&gt;801FFD70| 80000000 9FE71010 A0000000 9FE76810&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once I start the receive DMA with RDAR &amp;lt;- (1 &amp;lt;&amp;lt; 24) and send one ARP request to the target (frame length &amp;lt; 0x600), I get this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;_address|________0________4________8________C&lt;BR /&gt;801FFB80| 00800600 9FE54010 80000000 9FE54810&lt;BR /&gt;801FFB90| 80000000 9FE53010 80000000 9FE58810&lt;BR /&gt;801FFBA0| 80000000 9FE57010 80000000 9FE57810&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Only the first 16 bytes of the frame show up in the buffer:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;_address|_0__1__2__3__4__5__6__7_&lt;BR /&gt;9FE54010| FF FF FF FF FF FF 68 05&lt;BR /&gt;9FE54018| CA 3C 5A 26 08 06 00 01&lt;BR /&gt;9FE54020| 00 00 00 00 00 00 00 00&lt;BR /&gt;9FE54028| 00 00 00 00 00 00 00 00&lt;BR /&gt;9FE54030| 00 00 00 00 00 00 00 00&lt;BR /&gt;9FE54038| 00 00 00 00 00 00 00 00&lt;BR /&gt;9FE54040| 00 00 00 00 00 00 00 00&lt;BR /&gt;9FE54048| 00 00 00 00 00 00 00 00&lt;BR /&gt;9FE54050| 00 00 00 00 00 00 00 00&lt;BR /&gt;9FE54058| 00 00 00 00 00 00 00 00&lt;BR /&gt;9FE54060| 00 00 00 00 00 00 00 00&lt;BR /&gt;9FE54068| 00 00 00 00 00 00 00 00&lt;BR /&gt;9FE54070| 00 00 00 00 00 00 00 00&lt;BR /&gt;9FE54078| 00 00 00 00 00 00 00 00&lt;BR /&gt;9FE54080| 00 00 00 00 00 00 00 00&lt;BR /&gt;9FE54088| 00 00 00 00 00 00 00 00&lt;BR /&gt;9FE54090| 00 00 00 00 00 00 00 00&lt;BR /&gt;9FE54098| 00 00 00 00 00 00 00 00&lt;BR /&gt;9FE540A0| 00 00 00 00 00 00 00 00&lt;BR /&gt;9FE540A8| 00 00 00 00 00 00 00 00&lt;BR /&gt;9FE540B0| 00 00 00 00 00 00 00 00&lt;BR /&gt;9FE540B8| 00 00 00 00 00 00 00 00&lt;BR /&gt;9FE540C0| 00 00 00 00 00 00 00 00&lt;BR /&gt;9FE540C8| 00 00 00 00 00 00 00 00&lt;BR /&gt;9FE540D0| 00 00 00 00 00 00 00 00&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The BC flag (broadcast) is set correctly in the BD status. However, the length is set to 0x600 (this is MRBR), the L flag is not set and the receive seems to be stopped. I see this behaviour on two different boards. U-Boot and Linux works with Ethernet without problems.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Ethernet registers are initialized as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EIR 05800000&lt;BR /&gt;EIMR 0A400000&lt;BR /&gt;RDAR 01000000&lt;BR /&gt;TDAR 00000000&lt;BR /&gt;ECR 70000122&lt;BR /&gt;MMFR 602A3800&lt;BR /&gt;MSCR 0000001A&lt;BR /&gt;MIBC 40000000&lt;BR /&gt;RCR 05EE0064&lt;BR /&gt;TCR 00000004&lt;BR /&gt;PALR 00D0933D&lt;BR /&gt;PAUR EAED8808&lt;BR /&gt;OPD 00010020&lt;BR /&gt;TXIC0 00000000&lt;BR /&gt;TXIC1 00000000&lt;BR /&gt;TXIC2 00000000&lt;BR /&gt;RXIC0 00000000&lt;BR /&gt;RXIC1 00000000&lt;BR /&gt;RXIC2 00000000&lt;BR /&gt;IAUR 00000000&lt;BR /&gt;IALR 00000000&lt;BR /&gt;GAUR 00000100&lt;BR /&gt;GALR 00800000&lt;BR /&gt;TFWR 00000102&lt;BR /&gt;RDSR1 00000000&lt;BR /&gt;TDSR1 00000000&lt;BR /&gt;MRBR1 00000000&lt;BR /&gt;RDSR2 00000000&lt;BR /&gt;TDSR2 00000000&lt;BR /&gt;MRBR2 00000000&lt;BR /&gt;RDSR 801FFB80&lt;BR /&gt;TDSR 801FFD00&lt;BR /&gt;MRBR 00000600&lt;BR /&gt;RSFL 00000000&lt;BR /&gt;RSEM 00000000&lt;BR /&gt;RAEM 00000004&lt;BR /&gt;RAFL 00000004&lt;BR /&gt;TSEM 00000000&lt;BR /&gt;TAEM 00000004&lt;BR /&gt;TAFL 00000008&lt;BR /&gt;TIPG 0000000C&lt;BR /&gt;FTRL 000007FF&lt;BR /&gt;TACC 00000000&lt;BR /&gt;RACC 00000000&lt;BR /&gt;RCMR1 00000000&lt;BR /&gt;RCMR2 00000000&lt;BR /&gt;DMA1CFG 00000000&lt;BR /&gt;DMA2CFG 00000000&lt;BR /&gt;RDAR1 00000000&lt;BR /&gt;TDAR1 00000000&lt;BR /&gt;RDAR2 00000000&lt;BR /&gt;TDAR2 00000000&lt;BR /&gt;QOS 00000000&lt;BR /&gt;ATCR 00000000&lt;BR /&gt;ATVR 00000000&lt;BR /&gt;ATOFF 00000000&lt;BR /&gt;ATPER 3B9ACA00&lt;BR /&gt;ATCOR 00000000&lt;BR /&gt;ATINC 00000000&lt;BR /&gt;ATSTMP XXXXXXXX&lt;BR /&gt;TGSR 00000000&lt;BR /&gt;TCSR0 00000000&lt;BR /&gt;TCCR0 00000000&lt;BR /&gt;TCSR1 00000000&lt;BR /&gt;TCCR1 00000000&lt;BR /&gt;TCSR2 00000000&lt;BR /&gt;TCCR2 00000000&lt;BR /&gt;TCSR3 00000000&lt;BR /&gt;TCCR3 00000000&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Sep 2017 12:26:27 GMT</pubDate>
    <dc:creator>sebastianhuber</dc:creator>
    <dc:date>2017-09-26T12:26:27Z</dc:date>
    <item>
      <title>i.MX7 ENET receive initialization?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX7-ENET-receive-initialization/m-p/714180#M111007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I try to port the Ethernet interface driver from FreeBSD for i.MX6 to an i.MX7 Dual. The driver works in the loop back mode RCR[LOOP] == 1. I can also transmit frames. The problem is on the receiver side in normal mode (RCR[LOOP] == 0). The legacy descriptor ring is set up properly:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;_address|________0________4________8________C&lt;BR /&gt;801FFB80| 80000000 9FE54010 80000000 9FE54810&lt;BR /&gt;801FFB90| 80000000 9FE53010 80000000 9FE58810&lt;BR /&gt;801FFBA0| 80000000 9FE57010 80000000 9FE57810&lt;BR /&gt;[....]&lt;BR /&gt;801FFD50| 80000000 9FE73010 80000000 9FE73810&lt;BR /&gt;801FFD60| 80000000 9FE72010 80000000 9FE72810&lt;BR /&gt;801FFD70| 80000000 9FE71010 A0000000 9FE76810&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once I start the receive DMA with RDAR &amp;lt;- (1 &amp;lt;&amp;lt; 24) and send one ARP request to the target (frame length &amp;lt; 0x600), I get this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;_address|________0________4________8________C&lt;BR /&gt;801FFB80| 00800600 9FE54010 80000000 9FE54810&lt;BR /&gt;801FFB90| 80000000 9FE53010 80000000 9FE58810&lt;BR /&gt;801FFBA0| 80000000 9FE57010 80000000 9FE57810&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Only the first 16 bytes of the frame show up in the buffer:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;_address|_0__1__2__3__4__5__6__7_&lt;BR /&gt;9FE54010| FF FF FF FF FF FF 68 05&lt;BR /&gt;9FE54018| CA 3C 5A 26 08 06 00 01&lt;BR /&gt;9FE54020| 00 00 00 00 00 00 00 00&lt;BR /&gt;9FE54028| 00 00 00 00 00 00 00 00&lt;BR /&gt;9FE54030| 00 00 00 00 00 00 00 00&lt;BR /&gt;9FE54038| 00 00 00 00 00 00 00 00&lt;BR /&gt;9FE54040| 00 00 00 00 00 00 00 00&lt;BR /&gt;9FE54048| 00 00 00 00 00 00 00 00&lt;BR /&gt;9FE54050| 00 00 00 00 00 00 00 00&lt;BR /&gt;9FE54058| 00 00 00 00 00 00 00 00&lt;BR /&gt;9FE54060| 00 00 00 00 00 00 00 00&lt;BR /&gt;9FE54068| 00 00 00 00 00 00 00 00&lt;BR /&gt;9FE54070| 00 00 00 00 00 00 00 00&lt;BR /&gt;9FE54078| 00 00 00 00 00 00 00 00&lt;BR /&gt;9FE54080| 00 00 00 00 00 00 00 00&lt;BR /&gt;9FE54088| 00 00 00 00 00 00 00 00&lt;BR /&gt;9FE54090| 00 00 00 00 00 00 00 00&lt;BR /&gt;9FE54098| 00 00 00 00 00 00 00 00&lt;BR /&gt;9FE540A0| 00 00 00 00 00 00 00 00&lt;BR /&gt;9FE540A8| 00 00 00 00 00 00 00 00&lt;BR /&gt;9FE540B0| 00 00 00 00 00 00 00 00&lt;BR /&gt;9FE540B8| 00 00 00 00 00 00 00 00&lt;BR /&gt;9FE540C0| 00 00 00 00 00 00 00 00&lt;BR /&gt;9FE540C8| 00 00 00 00 00 00 00 00&lt;BR /&gt;9FE540D0| 00 00 00 00 00 00 00 00&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The BC flag (broadcast) is set correctly in the BD status. However, the length is set to 0x600 (this is MRBR), the L flag is not set and the receive seems to be stopped. I see this behaviour on two different boards. U-Boot and Linux works with Ethernet without problems.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Ethernet registers are initialized as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EIR 05800000&lt;BR /&gt;EIMR 0A400000&lt;BR /&gt;RDAR 01000000&lt;BR /&gt;TDAR 00000000&lt;BR /&gt;ECR 70000122&lt;BR /&gt;MMFR 602A3800&lt;BR /&gt;MSCR 0000001A&lt;BR /&gt;MIBC 40000000&lt;BR /&gt;RCR 05EE0064&lt;BR /&gt;TCR 00000004&lt;BR /&gt;PALR 00D0933D&lt;BR /&gt;PAUR EAED8808&lt;BR /&gt;OPD 00010020&lt;BR /&gt;TXIC0 00000000&lt;BR /&gt;TXIC1 00000000&lt;BR /&gt;TXIC2 00000000&lt;BR /&gt;RXIC0 00000000&lt;BR /&gt;RXIC1 00000000&lt;BR /&gt;RXIC2 00000000&lt;BR /&gt;IAUR 00000000&lt;BR /&gt;IALR 00000000&lt;BR /&gt;GAUR 00000100&lt;BR /&gt;GALR 00800000&lt;BR /&gt;TFWR 00000102&lt;BR /&gt;RDSR1 00000000&lt;BR /&gt;TDSR1 00000000&lt;BR /&gt;MRBR1 00000000&lt;BR /&gt;RDSR2 00000000&lt;BR /&gt;TDSR2 00000000&lt;BR /&gt;MRBR2 00000000&lt;BR /&gt;RDSR 801FFB80&lt;BR /&gt;TDSR 801FFD00&lt;BR /&gt;MRBR 00000600&lt;BR /&gt;RSFL 00000000&lt;BR /&gt;RSEM 00000000&lt;BR /&gt;RAEM 00000004&lt;BR /&gt;RAFL 00000004&lt;BR /&gt;TSEM 00000000&lt;BR /&gt;TAEM 00000004&lt;BR /&gt;TAFL 00000008&lt;BR /&gt;TIPG 0000000C&lt;BR /&gt;FTRL 000007FF&lt;BR /&gt;TACC 00000000&lt;BR /&gt;RACC 00000000&lt;BR /&gt;RCMR1 00000000&lt;BR /&gt;RCMR2 00000000&lt;BR /&gt;DMA1CFG 00000000&lt;BR /&gt;DMA2CFG 00000000&lt;BR /&gt;RDAR1 00000000&lt;BR /&gt;TDAR1 00000000&lt;BR /&gt;RDAR2 00000000&lt;BR /&gt;TDAR2 00000000&lt;BR /&gt;QOS 00000000&lt;BR /&gt;ATCR 00000000&lt;BR /&gt;ATVR 00000000&lt;BR /&gt;ATOFF 00000000&lt;BR /&gt;ATPER 3B9ACA00&lt;BR /&gt;ATCOR 00000000&lt;BR /&gt;ATINC 00000000&lt;BR /&gt;ATSTMP XXXXXXXX&lt;BR /&gt;TGSR 00000000&lt;BR /&gt;TCSR0 00000000&lt;BR /&gt;TCCR0 00000000&lt;BR /&gt;TCSR1 00000000&lt;BR /&gt;TCCR1 00000000&lt;BR /&gt;TCSR2 00000000&lt;BR /&gt;TCCR2 00000000&lt;BR /&gt;TCSR3 00000000&lt;BR /&gt;TCCR3 00000000&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Sep 2017 12:26:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX7-ENET-receive-initialization/m-p/714180#M111007</guid>
      <dc:creator>sebastianhuber</dc:creator>
      <dc:date>2017-09-26T12:26:27Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX7 ENET receive initialization?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX7-ENET-receive-initialization/m-p/714181#M111008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sebastian&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for i.MX7 ENET initialization one can look at uboot&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://git.freescale.com/git/cgit.cgi/imx/uboot-imx.git/tree/board/freescale/mx7dsabresd?h=imx_v2016.03_4.1.15_2.0.0_ga&amp;amp;id=rel_imx_4.1.15_2.1.0_ga" title="http://git.freescale.com/git/cgit.cgi/imx/uboot-imx.git/tree/board/freescale/mx7dsabresd?h=imx_v2016.03_4.1.15_2.0.0_ga&amp;amp;id=rel_imx_4.1.15_2.1.0_ga"&gt;uboot-imx.git - Freescale i.MX u-boot Tree&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;or linux enet driver described in Chapter 44 ENET IEEE-1588 Driver&lt;/P&gt;&lt;P&gt;attached Linux Manual.&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://git.freescale.com/git/cgit.cgi/imx/linux-imx.git/tree/arch/arm/mach-imx?h=imx_4.1.15_2.0.0_ga&amp;amp;id=rel_imx_4.1.15_2.0.0_ga" title="http://git.freescale.com/git/cgit.cgi/imx/linux-imx.git/tree/arch/arm/mach-imx?h=imx_4.1.15_2.0.0_ga&amp;amp;id=rel_imx_4.1.15_2.0.0_ga"&gt;linux-imx.git - i.MX Linux Kernel&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Sep 2017 23:23:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX7-ENET-receive-initialization/m-p/714181#M111008</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2017-09-26T23:23:00Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX7 ENET receive initialization?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX7-ENET-receive-initialization/m-p/714182#M111009</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the hints. I found the problem. The i.MX7D needs a 64 byte receive buffer alignment in contrast to the 16 byte alignment required by previous FEC versions. It is a bit strange that the loop back mode works even in case the alignment requirements are not met.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Sep 2017 06:28:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX7-ENET-receive-initialization/m-p/714182#M111009</guid>
      <dc:creator>sebastianhuber</dc:creator>
      <dc:date>2017-09-27T06:28:09Z</dc:date>
    </item>
  </channel>
</rss>

