I am trying to debug the example enet_rmii_udp and example project uart. I want to use uart (serial port) to output the data which received from the ethernet. However, in the enet_rmii_udp example project, I do not find which function is used for receiving ethernet packet. Which one can be used for receiving? And I am trying to output the data in my project, when I try to send ethernet data from PC to mpc5748g, what I send cannot be output. Anyone can see what problems in my project?
Hello,
please see my answer in the thread below:
https://community.nxp.com/thread/510970
I am not sure, what kind of data you try send from PC to MPC5748G, but if you check function RX handler, there is switch which tells you, which handler should be used for receiving data. But as soon as the value in Ethernet frame length field does not meet any of the value used in this function (0x8100 for VLAN, 0x0800 for IPv4, 0x0806 for ARP or 0x86DD for IPv6), microcontroller does not receive packet sent from PC.
This is the limitation I described in the thread mentioned above. This is the reason why this example is not good for more complex TCP/IP communication and it is better to use LwIP stack.
Regards,
Martin
I just follow the attachment in MPC5748g enet_rmii_udp example. He seems like to change change some codes in the project and this project can achieve sending and receiving message at the same time. I use the same project with him. And I try to send some number by UDP and IPV4 from PC to MPC5748g. In the project, there is a function used to output the data and it works. But the data which is output does not as same as what I try to send. So I wonder if there are some problems in the project or the problem is what your mention above? I just want to use ethernet cable to transmit number from one mpc5748g to another moc5748g.