ENET1 frame errors/rx_crc errors

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

ENET1 frame errors/rx_crc errors

8,847 Views
shu_liu
Contributor II

Hi,

We designed a custom board based on IMX6UL. Everything works well except the ENET (phy chip: KSZ8081RNB). 


We got a very high error / frame rates (around 30-50%)in "ifconfig". Error number is always the same as frame's and it is rx_crc_error. The board takes about 5 mins to get an IP from our router. We checked the cable and router and they both are good. We also checked "ethtool eth0". Please see the logs below.

Do you have any ideas that why the error rate is so high ?  

root@BlueHub-1FAC:~# ifconfig
eth0 Link encap:Ethernet HWaddr CE:AC:A1:03:EA:CB
inet addr:192.168.66.80 Bcast:192.168.66.255 Mask:255.255.255.0
inet6 addr: fe80::ccac:a1ff:fe03:eacb/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:130 errors:15 dropped:0 overruns:0 frame:15
TX packets:137 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:18661 (18.2 KiB) TX bytes:23404 (22.8 KiB)

root@BlueHub-1FAC:~# ethtool eth0
Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Supported pause frame use: Symmetric
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Advertised pause frame use: Symmetric
Advertised auto-negotiation: Yes
Link partner advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Link partner advertised pause frame use: Symmetric
Link partner advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Full
Port: MII
PHYAD: 2
Transceiver: external
Auto-negotiation: on
Supports Wake-on: g
Wake-on: d
Link detected: yes

Regards,

Shu

Tags (4)
13 Replies

6,586 Views
lokeshvenkatara
Contributor II

Hi NXP Team,

We are also facing exactly same issue with Frame error for the same processor family IMX6ULL based custom board and Phy KSZ8081RNA.

Our custom board is based on IMX6ULL EVK and working with BSP Ver 4.1.15-2.0.0_ga.

We tested in EVK using iperf3 the speed is very good with 100Mbps speed. And there are no errors with Rx frame.

But in our custom board we are facing issue with loss of received data.

We varifyed the ethernet details using ethtool, all the parameters looks good.

Even SSH is working fine in our cust board without any issue.

SCP is very very slow, but works fine for smaller files like <1K and hangs/terminates for little larger files.

Our board changes with respect to EVK is listed here,

EVK                                                        Cust board

Micrel KSZ8081RNB                           Micrel KSZ8081RNA

Phy Address 2                                     Phy Address 0

FEC0/FEC1                                         FEC0

RMII Clock mode: 25MHz External Crystal

We have tried the solutions provided in this link as well as RMII interface error on i.MX6Q(KSZ8051RNL)  

and https://community.nxp.com/thread/389902 didn't helped.

Please help us asap, since this is the only blockage we are facing to release the final product.

Thank you

Regards

Lokesh

0 Kudos
Reply

6,586 Views
digesh_patel
Contributor II

Hi

shuliunikmarkovicsanjeevsharmalokeshvenkateshiah

I had faced the same issue and I found the issue in ENET clock pin in my custom board. We are providing the ENET clock from the processor pin and it is 50Mhz. Even though it is 50Mhz, I had seen issue in the register selection. In the imx6ull-14x14evk the value for the register is 10R. Using the same value for my imx6ull based custom board didn't work because of (may be) pcb trace length and width. I was using the same 10R earlier and it gives me crc and frame errors continuously.

So to resolve it i had replace 10R resistance with the 20R resistance. It resolves my issue and i am seeing no crc/frame errors. You need to select the registancy according to your custom board design.

Thanks,

Digesh

6,586 Views
sanjeevsharma
Contributor IV

Is this issue resolved ?

I am seeing similar issue https://community.nxp.com/message/937004 

Any hint, would be appreciated.

0 Kudos
Reply

6,586 Views
Yuri
NXP Employee
NXP Employee

Hello,

  What BSP is used in the case ?

Have You tried the recent BSP of NXP ?
Is a PHY driver applied ?

Is it possible to look at the schematic ?
You may create request in order to send the scheme.

Have a great day,
Yuri

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

0 Kudos
Reply

6,586 Views
shu_liu
Contributor II

Yuri,

Our BSP is the linux-4.1.15-1.2.0+g77f6154. It is a recent one, but not the latest. Latest should be 2.0.0 instead of 1.2.0.

Yes the PHY driver applied and please see the logs below.

I do not know how to attach PDF, but I insert it as an image.enet_sch.jpg

fec 2188000.ethernet eth0: Freescale FEC PHY driver [Micrel KSZ8081 or KSZ8091] (mii_bus:phy_addr=2188000.ethernet:02, irq=-1)
Starting Hostname Service...
Starting WPA supplicant...
IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[FAILED] Failed to start Hostname Service.
See 'systemctl status systemd-hostnamed.service' for details.
[ OK ] Started WPA supplicant.

Freescale i.MX Release Distro 4.1.15-1.2.0 BlueHub-1FAC ttymxc0

BlueHub-1FAC login: fec 2188000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

0 Kudos
Reply

6,586 Views
Yuri
NXP Employee
NXP Employee

Hello,

  Please check Your clock configuration : according to section 10.4 (Generating the

reference clock on chip) of the Hardware DevelopmentGuide :

There are two possible pins that can either source or sink the reference
clock: GPIO_16 and RGMII_TX_CTL. The GPIO_16 pin is the preferred choice

because it has the advantage of being in a high voltage IO domain,
which means it can be used at the standard 3.3 V IO voltage levels.

http://cache.nxp.com/assets/documents/data/en/user-guides/IMX6DQ6SDLHDG.pdf  

Have a great day,
Yuri

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

0 Kudos
Reply

6,586 Views
shu_liu
Contributor II

Yuri,

As I mentioned in earlier post, we use IMX6UL processor. The clock inputs to the PHY chip(see the schematic in my last post) are ENET1_TX_CLK (RMII clock) and ENET_MDC(MDIO clock). We checked both signals. They are proper clocks and similar to the IMX6UL 14X14 EVK's. 

Regards,

S

0 Kudos
Reply

6,586 Views
Yuri
NXP Employee
NXP Employee

Hello,

  Have You similar issues with i.MX6UL EVK undo NXP demo image ?

Regards,

Yuri.

0 Kudos
Reply

6,586 Views
shu_liu
Contributor II

Yuri,

We still have this frame error issue. We found it is related to LCD_data lines. If LCD data lines(LCD_data0-23) are transferring data. Frame errors are happened and speed is really slow on the ethernet side. If LCD data lines are idle, ethernet works well.  Do you have any ideas ? We checked the ENET_CLK and MDC. Both clocks are good no matter LCD_data lines are busy or not. 

Regards,

0 Kudos
Reply

6,586 Views
durmus
Contributor IV

Hi Shu Liu,

Did you find a solution to this problem. I have been struggling with this same problem for about 2 years now. And still no solution.

0 Kudos
Reply

6,586 Views
Yuri
NXP Employee
NXP Employee

Hello,

  

  The problem may be concerned with system performance issue. One of system bottleneck is

memory throughput.  The i.MX 6UL supports 16-bit DRAMs up to 400 MHz. 
Please try using mmdc profiling tool, that may be found in /unit_test directory of i.MX6UL Linux

demo  image :

root@imx6ul7d:/unit_tests# ./mmdc2


For usage detail refer to the following :

IMX6 Memory Bandwidth usage - RidgeRun Developer Connection 


General consideration in Community may be helpful :

https://community.nxp.com/thread/309197 

Regards,

Yuri.

0 Kudos
Reply

6,586 Views
nikmarkovic
Contributor II

Hi Yuri,

I work with Shu on the software side.

We have nothing running that would get near the memory bandwidth problem. Even 800 MB/s is quite a lot for an idle system. Again, we our board is quite similar to imx6ul EVK board and we are not observing any issues on that board.

When we do this:

Run Chrome - Perfromance is very bad. 1GB download = 2hours+, scp copy stalls etc.

Kill chrome - Performance normal, ETA 10 minutes for 1GB.

cat /dev/zero > /dev/fb0  -Performance almost normal, ETA 10-20 minutes for 1GB. 

cat /dev/urandom > /dev/fb0  - We can't even get an IP address fro DHCP. Communication seems to stall completely.

 

We also noticed switching down to 10-BASE-T ethernet speed actually IMPROVES performance.

In addition to MDIO, RMI clocks and data lines, we have also analyzed Ethernet signals on the wire, and they seem normal. There is a clean rise or fall every 100ms in 1-Base-T mode. All signals seem quite the same as the EVK board, unless we don't know what to look for.

We also have another revision of the board that with an NFC where we can completely disable the LCD by removing it from the device tree, but we still exhibit issues on that board unless we switch it to 10 Mbps.

All this leads us to belive that LCD itself is not the issue, but rather that the LCD and possibly some other factors exacerbate the actual problem.

In addtion to us detecting RS framing errors, we have also connected the board to a linux PC and observed that the PC registers framing RX errors when we try to transmit DHCP packets.

We are suspecting that this could be a hardware issue, but if Ethernet signal and MII signals look clean, why are framing errors registered? Where should we focus focus our attention?

Thanks,

Nik

0 Kudos
Reply

6,586 Views
durmus
Contributor IV

Hi Nik Markovic,

Did you find a solution to this problem? I have been struggling with this same problem for about 2 years now. And still no solution.

0 Kudos
Reply