LWIP with DP83848Q-Q1 on XMC4500

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

cross mob
User11041
Level 1
Level 1
Hi everybody,

I have designed a PCB with one XMC4500 and one Texas Instruments DP83848Q-Q1 automotive Ethernet PHY with an isolated RJ45 connector. I have configured the LWIP app to support DHCP, UDP and ICMP and flashed the whole thing to the controller. In my software I just call DAVE_Init() and then enter, after some other non-ethernet computing, the main loop.

When I attach my board to my local network and watch all the traffic on my desktop PC using Wireshark, I don't see ANY communication coming from the XMC, the MAC address is nowhere to be seen, not even a DHCP discover, although this should be the first thing the XMC would do. If, in the main loop, I use the XMClib functions to check whether the link is up or the link speed, which are data that are requested from the PHY, everything is as expected, link is up, 100Mbit. The LED is shining on the RJ45 I use. I checked the XMC system clock to correctly run 120MHz and the PHY clock to correctly run 50MHz by oscilloscope.

Does anyone have an idea what could be wrong? Communication with the PHY seems to work if I can check the link status and the speed, but why are no packets sent? I enclose details about the configuration of the LWIP app.

Kind regards
Nick

LWIP configuration:
General settings: no netif hostname, no callbak, no RTOS, no debugging
Network interface: RMII interface, DP83848C (I think it's equivalent to DP83848Q-Q1, which is automotive), PHY address 1, autonegotiation enabled. MAC 00:03:19:45:00:00, 4 RX and TX buffers, no promiscous mode, broadcast frames accepted, RX interrupt priority 63
IP settings: DHCP enabled, no IP options, fragmentation or reassembly, MTU=1500, TTL=255
Protocol settings: ICMP, UDP enabled, ARP table size = 10
Memory settings: MEM_SIZE = 1600, PBUF_POOL_SIZE = MEMP_NUM_PBUF = 16, MEMP_NUM_RAW_PCB = MEMP_NUM_UDP_PCB = 4, MEMP_NUM_ARP_QUEUE = 30
0 Likes
6 Replies
Travis
Employee
Employee
First solution authored Welcome! 500 replies posted
For testing purposes can you use a fix IP address eg. 192.168.0.10

Are you able to do a simple ping with this?
0 Likes
User11041
Level 1
Level 1
I'm afraid no, neither with fixed nor dynamic IP. It seems (oscilloscope) that no packet at all leaves or arrives at the PHY.
0 Likes
User10215
Level 4
Level 4
First like received
Hi Nick,

is there a possibility for you to check only the ETH_LWIP-App by opening a fresh project? Maybe some of your other code breaks something? For me the App works on a XMC4500 relax-kit...
How can there be no packet arriving at your PHY? Do you mean from your network's side or from the XMC-side? If from XMC-side maybe not all of the GPIOs of the MAC are configured correctly?
If from your network's side then there might be something wrong with your pcb. Do you have access to an XMC4500-relax-kit? It has working Ethernet-hardware and, as I mentioned, works for me in conjunction with the APP.

Regards,
Niclas
0 Likes
User11041
Level 1
Level 1
Hi Niclas,

I have a relax kit 🙂 I have opened a blank project, added one LWIP app, configured a fixed IP of 192.168.0.10, subnet mask 255.255.255.0 and gateway 192.168.0.10. As PHY I specified the KSZ8031RNL which is on the relax kit with PHY address 0. I connected the relax kit to a switch (TPlink TL-SG108) and my desktop PC as well (I didn't have a crossover cable...). The LEDs on the switch showed good link. I gave my desktop PC the fixed IP of 192.168.0.40 and subnet mask 255.255.255.0. I then flashed the software to the relax kit (it was only the DAVE_Init() and an empty main loop, the init exited normally), monitored the traffic on my micro-network on wireshark and tried to ping 192.168.0.10 from the console - my PC spammed loads of ARP packages and the XMC did not respond. Am I blind or what is wrong here? The LWIP app is version 4.0.6

Cheers
Nick
0 Likes
User10215
Level 4
Level 4
First like received
Hey Nick,

I just did almost the exact thing you described and my relax kit is ping-able. What I found out while preparing the project was that for the App with no RTOS you're supposed to call the function "sys_check_timeouts()" in your while-loop.
I found that out by opening the APP help and then pressing "Usage". Might that be the missing puzzle-piece?

Regards,
Niclas
0 Likes
User11041
Level 1
Level 1
Hey Niclas,

thank you so much for your reply. I could have read the help myself before posting 😄 It worked on the relax kit, but at first not on my PCB. But now it does. The two reasons were
- the function to be called in the main loop you mentioned
- my PHY chip, the DP83848Q has a clock input for a crystal of 50MHz and a clock output of 25MHz. I had connected the clock output pin to the XMC as RMII reference clock. When I re-soldered the 50MHz crystal to be the clock input to the XMC RMII interface, it finally worked!!

Thank you very much
Nick
0 Likes