Hi, team
I am testing S32R294 ENET using S32SDK lwip TCP/IP stack project. I have some issues.
when I configure MII mode as RGMII, MII speed as 10M. The ENET works normal and I pinged my own address and it was OK.
However, when I change the MII speed to 100M or 1000M. It can not work.
How can I solve this problem?
Thanks
Andy
Solved! Go to Solution.
Hi,
PHY_KSZ9031_SPEED10_100 is still guarded one more by if (enetconfig.miiSpeed == 10 or 100). If you choose MII speed 10/100, then we will remove 1000Mbps and restart negotiation with 10/100 speed only for KSZ9031.
However, if you choose 1000Mbps since the beginning, that restriction (if condition) will not be reached or executed.
From my experience, you are having issue of KSZ9031 negotiation for speed 1Gbps. Your clock configuration is correct.
We are still running tcpip S32R294 nightly and functional tests still passed (we can detect and ping the board with 1Gbps).
Hi Andy,
here is the feedback from our lwip expert:
It works with 1GB RGMII in tcpip, we already supported this speed for S32R294. I confirmed.
In customer question on community, I understand that he is using default configuration of clock (without modification for ENET Clock)
You can checkout lwip_s32r294 example, where we configured default RGMII/1GB speed already.
The ENET clock (ENET0_CLK, ENET0_TIME_CLK) should be configured like this for 1GB:
Regards,
Lukas
Hi, Lukas
Thanks for you information.
I have correct my clock configuration. And it worked OK with RGMII 100Mbps. However it still failed with 1000Mbps. I noticed there was a macro called "PHY_KSZ9031_SPEED10_100". Does it limit the transmission rate?
Here is my ENET clock configuration.
Thanks
Andy
Hi,
PHY_KSZ9031_SPEED10_100 is still guarded one more by if (enetconfig.miiSpeed == 10 or 100). If you choose MII speed 10/100, then we will remove 1000Mbps and restart negotiation with 10/100 speed only for KSZ9031.
However, if you choose 1000Mbps since the beginning, that restriction (if condition) will not be reached or executed.
From my experience, you are having issue of KSZ9031 negotiation for speed 1Gbps. Your clock configuration is correct.
We are still running tcpip S32R294 nightly and functional tests still passed (we can detect and ping the board with 1Gbps).
Hi,
Thanks for your information. I have imported example lwip_s32r29 demo and just chane speed to 1Gbps. It still does not work. However when I run the enet_ping_s32r294 demo it works OK.
Could you please provide me the lwip demo passed test?
Thanks
Andy
Hi Andy,
If you want to run example lwip_s32r294 demo with speed 1 Gbps, you should configure as below:
- In TCPIP configuration: set TX ring size and RX ring size to 5.
- In pin configuration: setup Ethernet Transmit Data 0 -> 3 (PD[0], PD[3], PD[4], PG[10]) and Ethernet Transmit Enable (PC[15]) in ENET tab as figure below
Thanks,
Tai Bui Van