SDK ping sample fails on iMX6DL

cancel
Showing results for 
Search instead for 
Did you mean: 

SDK ping sample fails on iMX6DL

Jump to solution
801 Views
andreaskarlsson
Contributor III

Objectives is the get the ENET driver up and running.

 

1.  I have an SABRE SD board rev c with an imx6DL

2. I've built the platform SDK with the Sourcery toolchain  , ./tools/build_sdk -clean -t mx6sdl -b smart_device -v c

3. I've run the ping.elf

4. The Link come up

Now here is the porblem

5. I can't see any frames getting sent, it looks like the first thing that happens is that lwIP sends an ARP, but I fail to see that on wireshark

and my laptop from which I try to ping the SabreSD say destination is unreachable.

I've build the LTIB U-boot. From there ping works fine.

WHat can be wrong in the SDK ENET driver?

regards

Andreas

Tags (3)
0 Kudos
1 Solution
600 Views
andreaskarlsson
Contributor III


I've got it working using static IP, change the ping code to use static.

The issues were, due to using a 100Mbit switch I triggered 2 SDK issues.

enet_drv.c

1. The link status prints use a faulty mask.

    if (((value>>14)&0x3) == 0x2)

         dev->status |= ENET_STATUS_1000M;

    else if (((value>>14)&0x3) == 0x2)                           <- Should be 0x1

         dev->status |= ENET_STATUS_100M;

2. It is only configured for 1000M

    dev->enet_reg->ECR.U |= ENET_ETHER_EN | ENET_ETHER_SPEED_1000M | ENET_ETHER_LITTLE_ENDIAN;

I guess the MAC should use the PHY negotiated speed?

regards

Andreas

View solution in original post

0 Kudos
3 Replies
600 Views
Yuri
NXP Employee
NXP Employee

  Please connect the i.MX6 board to a router, the ping test requires DHCP. 

Have a great day,
Yuri

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

0 Kudos
601 Views
andreaskarlsson
Contributor III


I've got it working using static IP, change the ping code to use static.

The issues were, due to using a 100Mbit switch I triggered 2 SDK issues.

enet_drv.c

1. The link status prints use a faulty mask.

    if (((value>>14)&0x3) == 0x2)

         dev->status |= ENET_STATUS_1000M;

    else if (((value>>14)&0x3) == 0x2)                           <- Should be 0x1

         dev->status |= ENET_STATUS_100M;

2. It is only configured for 1000M

    dev->enet_reg->ECR.U |= ENET_ETHER_EN | ENET_ETHER_SPEED_1000M | ENET_ETHER_LITTLE_ENDIAN;

I guess the MAC should use the PHY negotiated speed?

regards

Andreas

0 Kudos
600 Views
andreaskarlsson
Contributor III

For some reason it reports 10M bps when it should be 100M bps. I cant verify the output since it seems impossible to find the AR8031 manual online.

Any clues?

ENET AR8031 PHY: ID=4dd070

enet phy status 1: 796d

AR8031 reg 0x11 = 7c1c

ENET 1: [ FULL_DUPLEX ] [ connected ] [ 10M bps ]:

0 Kudos