2021-08-04 11:52 PM
Hello guys.
I have configured ethernet on STM32MP157F using Microchip's LAN8720AI-CP.
I base my image on st-image-core of Distribution Package. And dts is configured using CubeMX(meta-st-stm32mp-addons).
Currently, it appears as if ethernet is connected as shown in the picture below.
[ 0.000000] psci: probing for conduit method from DT.
[ 1.235904] usbcore: registered new interface driver cdc_ether
[ 2.758680] stm32-dwmac 5800a000.ethernet: PTP uses main clock
[ 2.763159] stm32-dwmac 5800a000.ethernet: no reset control found
[ 2.769206] stm32-dwmac 5800a000.ethernet: No phy clock provided...
[ 2.776103] stm32-dwmac 5800a000.ethernet: User ID: 0x40, Synopsys ID: 0x42
[ 2.782483] stm32-dwmac 5800a000.ethernet: DWMAC4/5
[ 2.787398] stm32-dwmac 5800a000.ethernet: DMA HW capability register supported
[ 2.794742] stm32-dwmac 5800a000.ethernet: RX Checksum Offload Engine supported
[ 2.802082] stm32-dwmac 5800a000.ethernet: TX Checksum insertion supported
[ 2.808934] stm32-dwmac 5800a000.ethernet: Wake-Up On Lan supported
[ 2.815234] stm32-dwmac 5800a000.ethernet: TSO supported
[ 2.820552] stm32-dwmac 5800a000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[ 2.828396] stm32-dwmac 5800a000.ethernet: device MAC address 4a:d6:e6:66:9a:94
[ 2.835731] stm32-dwmac 5800a000.ethernet: TSO feature enabled
[ 10.630088] stm32-dwmac 5800a000.ethernet eth0: PHY [stmmac-0:01] driver [SMSC LAN8710/LAN8720]
[ 10.708890] stm32-dwmac 5800a000.ethernet eth0: No Safety Features support found
[ 10.800503] stm32-dwmac 5800a000.ethernet eth0: IEEE 1588-2008 Advanced Timestamp supported
[ 10.808475] stm32-dwmac 5800a000.ethernet eth0: registered PTP clock
[ 10.840726] stm32-dwmac 5800a000.ethernet eth0: configuring for phy/rmii link mode
[ 11.450968] using random self ethernet address
[ 11.453968] using random host ethernet address
[ 12.972676] stm32-dwmac 5800a000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
[ 12.980117] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
eth0 Link encap:Ethernet HWaddr F2:1D:22:8E:04:45
inet addr:192.168.0.51 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::f01d:22ff:fe8e:445/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:608 errors:0 dropped:0 overruns:0 frame:0
TX packets:72 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:164901 (161.0 KiB) TX bytes:15434 (15.0 KiB)
Interrupt:38 Base address:0x4000
However, ssh connection to this board is not available in the same network from other PC.
(ssh : connect to host 192.168.0.51 port 22 : No route to host)
ping command also same.
PING 192.168.0.51 (192.168.0.51) 56(84) bytes of data.
From 192.168.0.43 icmp_seq=1 Destination Host Unreachable
From 192.168.0.43 icmp_seq=2 Destination Host Unreachable
From 192.168.0.43 icmp_seq=3 Destination Host Unreachable
How Can i debug this problem?
2021-08-26 05:30 AM
Hi,
did you progress meanwhile ?
From the console on your board, did you succeed to ping other device or website ?
As far as I see in the first part of your post, all seems ok.
Regards,
2021-08-31 05:13 PM
Hi,
I've tried changing the BSP several times, but nothing happens.
I think it's a HW problem.
But it might be a BSP issue, so we're checking.
Is there any other way I might try?
Regards,
2021-08-31 11:47 PM
Hi,
Are you sure it is not some setting on your PC which avoid to access the board (e.g. VPN, specific company security settings, etc..) ?
Have you tried vice versa, i.e. ping from the board to a PC ? between two boards ?
If your network allow internet access, is the following commands works ?
Did you check you schematics and DT between AN5031 and the recommended DT (depend on your HW choices):
Some HW problem could exist on your board (e.g. between PHY and RJ45 like mixed up pairs).
Regards.
2021-09-01 07:03 PM
Hi,
Yep, my pc ssh connect to the outside, ping, apt-get, etc. works without problems.
So I don't think it's a security setting issue.
Currently, my ethernet circuit configuration is as the attached picture.
According to the configuration, the Device Tree has been changed to the first configuration in your link.
I am using Distribution Package, and I am using Cube-MX by changing the Device Tree of 157F-EV to fit my circuit (meta-st-stm32mp-addons/mx Directory)
In the team project circuit, MPU and Ethernet IC exist on the same board, but The RJ45 connector is connected to the Ethernet IC through two boards.
So I'm thinking it's a circuit problem like impedance or noise.
However, I'm assuming it may be a problem with the BSP configuration.
So I would like to know if there is another Test method, and need to change the BSP configuration.
If you need, I can attach my MX Device Tree.
Regards.
2021-09-01 11:24 PM
Hi,
So, you confirm that the :
work on your Linux PC (that's sound normal), but fail when commands are issued from your STM32MP157F board console.
Could you share the error messages ?
If the board get an IP address (as we see in ifconfig you copied), it mean the board is already able to discuss with your network DHCP server.
From HW point of view, I did not see any evident issue.
Please double check the magnetic transformer and RJ45 pinout which are not part of this abstract, maybe some mixed-up there.
I don't think noise or impedance could make it not working at all.
If it helps, here is one of our RMII reference design working with the first link DT
Regards.
2021-09-02 12:17 AM
Hi,
The ping log from my Host PC to the 157F Board is as above.
And the ping log from the 157F Board to www.st.com & router, and the apt-get update command log are as follows.
root@stm32mp1-EMU01:~# ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1): 56 data bytes
^C
--- 192.168.0.1 ping statistics ---
4 packets transmitted, 0 packets received, 100% packet loss
root@stm32mp1-EMU01:~# ping www.st.com
ping: bad address 'www.st.com'
root@stm32mp1-EMU01:~# apt-get update
Reading package lists... Done
root@stm32mp1-EMU01:~#
And it is very difficult for my 157F board to be assigned an IP from DHCP Server(Router). I have to try dozens of times to get an assignment IP.
As you suggested, I'll check the magnetic transformer and the RJ45 part.
Regards.