Xmc4300 ethercat ksz8081mlx

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
User15023
Level 1
Level 1
First like received
Hello everyone

I have been working on a pcb trying to implement EtherCAT with KSZ8081 PHY and it is working with a small but annoying fault:
On a cold start of the PCB and with TwinCAT in free run mode the activity led is blinking as if it is talking to the PC (the activity led is controlled by the XMC) but twincat never sees it as connected (NO COMM it says) and i get no AlControl events or anything. With wireshark i can see how the master is sending commands to the slave repeatedly but no response by the slave.

but if i disconnect the ethernet cable and then reconnect it it just starts working normally!! and it will work forever until i do a cold start, so it seems the ECAT module gets stuck until a link up-> link down -> link up happens

First i thought maybe i would first start the PHY and then the ECAT periphery, didn't work neither vice versa.. i just don't know what to do now to solver this problem

The KSZ8081MLX strapping options are : broadcast disabled, full duplex, addres 0 and address 1 for phy0 and phy1...

Thanks and any help would be greatly appreciated

Regards
0 Likes
3 Replies
User15023
Level 1
Level 1
First like received
Hi everyone,
I just keep digging in this annoying problem and i discovered that when everything starts up i get a 0xFF at register 0x54010300 (0x300 of ECAT0 module) that means INVALID FRAME..
I just dont know why after disconnecting the ethernet cable and plugging it in again everything works as it is supposed to be!!!

Please any advice would be appreciated
0 Likes
User15023
Level 1
Level 1
First like received
Finally i got it working.
For anyone having this problem the solution is to keep Auto Negotiation enabled so the link signal appears with delay in relation to the ESC. The Beckhoff slave implementation guide says that the link signal should appear after >170ms the ESC has been put our of reset but if you force full duplex and disable autonegotiation the link signals appears as soon as you deassert the phy reset pint!
The auto negotiation would make the phy first resolve with the connected partner the the speed of the link (although i keep it forced to 100phy :cool:) and then give the link signal to the ESC (connected to the "link" LED on the PHY)

Regards
Franco
0 Likes
ricci_c
Level 1
Level 1
First question asked First reply posted Welcome!

Hi Friend,

I have the same problem as you. I have to plug in the Ethercat cable after the board is started. Even if I haven't practiced anything at the other end of the Internet cable, I can also use the auto negotiation mode, but it still don't work. Can you help me with this?

Regards

Riccic

0 Likes