LAN8710A + XE216, Can not get RX work Topic is solved

Sub forums for various specialist XMOS applications. e.g. USB audio, motor control and robotics.
Niels Braspenning
Member
Posts: 13
Joined: Mon Feb 27, 2017 11:34 pm

LAN8710A + XE216, Can not get RX work

Post by Niels Braspenning »

Hi,

I'm new to xmos controllers, have experience with stm32 controllers. and some ethernet things around a linux board. i run in a problem

I'm trying to get a LAN8710A running on my custom board with a XE216-512-TQ128-C20.I based my design on the xcore200 board and the ethernet slice XA-SK-E100

I ported the code from AN00121_UDP DEMO

Transmission of the code is working (i see the broadcast packerd arrive in wireshark), however i can not get the RX part working. If i sniff the SMI bus, i see that there is a uplink.
i'm trying to commuicate on 100Mb, and tried with example AN00120 to communicatie on 10Mb without any luck.

My first guess was that it was hardware related, so tonight i hookup the slice kit XP-SKC-L2 with the XA-SK-E100, and did some comperasion measurments with the slicekit
and my custom board.

rx clock custom board (measured with 200mhz scope)
Image

rx clock slicekit (measured with 200mhz scope)
Image

Scope image of custom board (Measured with rigol 100Mhz scope)
Image

Scope image of slicekit (Measured with rigol 100Mhz scope)
Image

The scope images, looks like it is a lot of noise, however is guess the limited bandwith of the scope is affecting the image. The slice kit works perfect with this signal
Finaly, 2 images of a logic analyser

Customboard, logic analyzer
Image

Slicekit,logic analyzer
Image

Maybe hard to see, but the are indentical, so i guess there is going something wrong in the software of configuration of the xn file.
A mapped the ports correctly, and my custom board is running with een osc of 24 Mhz, the LAN8710A offcourse with 25Mhz

I guess something is going wrong in the software or configuration (xn file) or maybe are the input toasted?

I added the xn files as attachment, and also the source code of the main

King regards

Niels,
Attachments
SLICEKIT-L16.xn
(3.15 KiB) Downloaded 259 times
SLICEKIT-L16.xn
(3.15 KiB) Downloaded 259 times
Test1_8IO.xc
(20.26 KiB) Downloaded 261 times
Test1_8IO.xc
(20.26 KiB) Downloaded 261 times
XE216-512-TQ128-C20.xn.xml
(1.11 KiB) Downloaded 260 times
XE216-512-TQ128-C20.xn.xml
(1.11 KiB) Downloaded 260 times


View Solution
User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post by mon2 »

Hi. Simple comments...

1) can you post a schematic of the Ethernet PHY, connections to your XMOS CPU, connections to the external RJ45 jack ?

2) Are you using an approved RJ45 jack with internal magnetics or with external magnetics ?

3) Confirm the wiring between the applied cabling and the RJ45 connection with respect to the LAN8710A. The wiring can be a show stopper.

4) Are you aware that the XE216 features RGMII support so you can pair this CPU up with an AR8035 (Atheros) for a gigabit solution ?

reference design:
https://www.xmos.com/support/boards?product=18230

You can source the AR8035 PHY from Arrow (we recall paying a lower cost than posted here):

https://www.arrow.com/en/products/ar8035-al1a/qualcomm
Niels Braspenning
Member
Posts: 13
Joined: Mon Feb 27, 2017 11:34 pm

Post by Niels Braspenning »

Hi mon2,

Thanks for your fast response,

the anwsers

1, i attched the ethernet and mcu part of the schematic
2, if the jack or magnetics are improved, i doont know. however i used this combination jack, magnetics with a aria g25 (a linux arm board with a smsc8720). and there it works.
the magnetics are external, this is because i use poe (not board i build)
3, do you mean the network cable, that is fine
4, the reason i did not used the rgmii, i tried 10/100mbit before and that didnt work. so before i want to switch to a more critical part in respect to board layout, i have chosen for 10/100mbit

Some extra information,
- i based the design on the xcore200 board and the ethernet slice XA-SK-E100
- I measure the exact same signales on my custom board as on the xk-skc-l2 and xa-sk-e100 combination
-Sending broadcast packets from my custom board works (with the correct programmed mac adress)
-the rigol image, yellow is the DV signal, cyan is D3, purple is D2, blue is D1

ive seen that there is a xcore200 slicekit, which works with the xa-sk-e100, however i can not find example(ethernet) code, is there any?

My first thougs call software,but u understand that you need to have more info first, to get a global image

king regards,

Niels Braspenning
Attachments
MCU.JPG
(192.51 KiB) Not downloaded yet
MCU.JPG
(192.51 KiB) Not downloaded yet
ethernet.JPG
(218.34 KiB) Not downloaded yet
ethernet.JPG
(218.34 KiB) Not downloaded yet
Niels Braspenning
Member
Posts: 13
Joined: Mon Feb 27, 2017 11:34 pm

Post by Niels Braspenning »

Nobody?
User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post by mon2 »

Hi. See a few issues..

1) magnetics T1 is not wired correctly - see pg 48 of the LAN8710A datasheet. TX & RX pairs need to be reversed.

2) Where do VA1 and VA2 end up? Do you have the required 75 ohms for each leg & a high voltage cap @ 3kv?

3) Current limit resistor for the LED is too low at 68 ohms, see the LAN datasheet for suitable value if the internal LDO is enabled. R13 should be 270 ohms.

4) After correcting the above, check RXCLK.
User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post by mon2 »

Driving to work, thought about the AUTO-MDIX support inside the LAN8170A. Perhaps you can use this feature to correct the LAN8170A to magnetics wiring ? It is worth testing before moving to hack the traces to correct on the PCB.

See section 3.3 of the LAN8710A datasheet for more details. For a sanity check, it will be best to wire up exactly as they show in the datasheet.

For RJ45 jacks with and without magnetics, consider:

Link-PP (Shenzhen, CN):

Jason <jason@link-pp.com>

and/or

TRXCOM (Shenzhen, CN):

Sherry <sales1@trxcom.com>

Both are decent suppliers at affordable costs and can cross the major brands.
Niels Braspenning
Member
Posts: 13
Joined: Mon Feb 27, 2017 11:34 pm

Post by Niels Braspenning »

Hi,

Thanks for your response,

1, tx and rx pair is indeed swapped,however tx is working, i receive it in wireshark. and acoording tot the logic analyzer picture, i am receiving a packet on the rx part of the mii.
2,VA1 and VA2 goes throught poe supply, but this is not added on this board, i added 2x 75 ohm and the cap
3, changed it bij 270 ohms
4, the clk looks i little beter


Image
Niels Braspenning
Member
Posts: 13
Joined: Mon Feb 27, 2017 11:34 pm

Post by Niels Braspenning »

How ever with the ported AN00121 software application, no change. in the normal design, the software shows the current ip setting , and then the dhcp adress .
The ported version doesnt, it only anouches that it is sending broadcast messages
User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post by mon2 »

So AN00121 is able to RECEIVE data ok with your custom PCB ? Have you tested with the loop back configuration of the RJ45 as shown in the LAN8710A datasheet ?
Niels Braspenning
Member
Posts: 13
Joined: Mon Feb 27, 2017 11:34 pm

Post by Niels Braspenning »

Hi,

It working,

i'm a lite bit shamed, some pins of the xmos rxd 0 and rx1 where loose. thanks for your fast response

i'm able to ping the device (ported version of AN00120), however when i try my version of AN00121 is crashes with

xrun: Program received signal ET_LOAD_STORE, Memory access exception.
[Switching to tile[0] core[2]]
0x00045a6e in mii_client_user (this=@0x7fb9c, base=506784, end=507000, c_notifications=2147616514) at /Users/nielsbraspenning/Documents/handshake/Firmware/xmos/lib_ethernet/src/mii_lite_driver.xc:348

348 void mii_client_user(struct mii_lite_data_t &this, int base, int end, chanend c_notifications) {
Post Reply