XMC4800 Port1 always closed

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

cross mob
User15672
Level 1
Level 1
Hi,everyone!

We used XMC4800 to develop our stepper,the PHY chip we use is KSZ8081MNX,MII mode. When we download our code to
MCU and run it, we found it just worked with no port1 connection. That means Twincat3.1 would only found 1 device when Port 1 was not connected.
If we connect Twincat 3.1 + Port 0 of Our Device then Port 1 of our Device to Demo kit(from infineon),The second device would not be found!
Twincat also detected as many lost frams as send frames!
Has anyone any suggestion to me? Thank you in advance!

Best Regards!
0 Likes
2 Replies
MichaelIFX
Employee
Employee
50 replies posted 25 replies posted 10 replies posted
I'm not sure if I understand your description well.
What I understand all in all is, that as long as your device is the last device in the ring (which is also the case if it is the only device) everything works well.
So e.g. Relax-Kit being the first device and your device the 2nd device I understand this works.

Because all the frames are getting lost once you connect a 2nd device you should carefully check the physical connection and the strapping options.
Also make sure the 2nd PHY has another address. So strapping options of the PHYs are not the same on both.



It doesn't sound to me there is a problem with the link signal from the PHY to XMC on the 2nd port, because it appears once the 2nd device is connected this is correctly recognized otherwise the frames would not suddenly get lost as you report.

Still some hints for checking the link signal:
First device: P1_LINK, P0_LINK to GND if a second device is connected. By this the output port remains open.
2nd device: P1_LINK to 3.3V and P0_LINK to GND for the 2nd device. By this the output port remains closed.

If there is something wrong with the link signal you should check the strapping options.
Inside the BECKHOFF PHY selection guide I find the following comment for the PHY you have selected:

"Enable B_CAST_OFF to support PHY addr. 0 (otherwise PHY addr. 0 = Broadcast).
The KSZ8081 has a pull-up resistor at the MCLK pin, which might interfere with an external pull-down resistor for strapping.
The SPEED LED might toggle during link up, causing lost frames for a short period.
Either enable MI Link Detection and Configuration or use LINK LED (requires enabling via management interface)."
0 Likes
User15672
Level 1
Level 1
Thank you for your advise!
We have found there were some changes on Port B when we put another device after our device:
From Twincat 3.1, DLL status of Port B changed from "no carrier/closed" to "carrier/closed", and also the value of bit 11:10 of register 0x100 is 3: loop closed;
the value of bit 11:10 of register 0x110 is also 3: loop closed,with link.
So Port B has detected link signal(Yellow led of RJ45 is also on,which join the LINK_MII signal from PHY),but why xmc did not open this port?
Also from oscilloscope,we found TxEN,RxDV and another pin of PHY1 had fixed 500Hz wave shape(connected with another device)!
0 Likes