AnsweredAssumed Answered

iMX6UL direct connet to ethernet switch have CRC error on DMA RxBD

Question asked by Haicheng Liu on Jan 14, 2018
Latest reply on Jan 14, 2018 by igorpadykov

Hi Guys,

   We have made a borad which modified from i.MX6UltraLite 14x14 EVK.  In ethernet part, the imx6ul's mac is connect to ethernet switch directly (the IC is IP175D link).  below is the connection.

  The CPU(imx6ul) is connect to the ethernet switch(IP175D) MAC5 using  RMII. and make change of uboot (mx6ul_14x14_evk.h) is:

#define IMX_FEC_BASE                 ENET_BASE_ADDR
#define CONFIG_FEC_MXC_PHYADDR    0x5      /* The IP175D MAC5  mdio address */
#define CONFIG_FEC_XCV_TYPE          RMII

  When I debug the network using Wireshark with "ping" command, the ARP packet send from imx6, but cpu do not recvice any response. although the response is displayed in Wireshark.  


  Then I debug the code, and found, all the packet is marked with CRC eror by DMA RxBD:

  In driver\net\fec_mxc.c:

if (bd_status & FEC_RBD_ERR)

      printf("error frame: 0x%08x 0x%08x\n", addr, bd_status);


where the bd_status is 0x804 and the FEC_RBD_ERR is defined in fec_mxc.h:

#define FEC_RBD_CR 0x0004 /* CRC error */



Then I remove the FEC_RBD_CR bit in FEC_RBD_ERR, and the network is work properly.  the packet data is all correct.  

  Is any reason can let FEC_RBD_CR bit valid?  which MAC/PHY parameter is not correct?  please help me!