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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

2,060 Views
liuhaicheng
Contributor I

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 */

#define FEC_RBD_ERR (FEC_RBD_LG | FEC_RBD_NO | FEC_RBD_CR | \
      FEC_RBD_OV | FEC_RBD_TR)

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! 

Thanks

Haicheng

Labels (1)
0 Kudos
Reply
1 Reply

1,509 Views
igorpadykov
NXP Employee
NXP Employee

Hi Haicheng

seems specific ethernet switch IP175D software (driver) may be used, like

Linux Kernel Driver DataBase: CONFIG_ICPLUS_PHY: Drivers for ICPlus PHYs 

http://gitlab.kses.net/guinnux/kernel-patches/blob/efcee565934b5f78c32d112781d54e963a757c49/drivers/... 

for switch configuration one can also look on

configure the ksz8765 5 port Ethernet switch 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply