This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LP-AM243: lwip-cpsw no ip address, wrong Link LED

Part Number: LP-AM243

Hello TI support team, 

I am testing the enet_lwip_cpsw_am243x-lp example with the LP-AM243x from mcu_plus_sdk_am243x_08_03_00_18; CCS (v11.2.0).

The example doesn´t behave as expected - I imported the example into CCS, fixed one error in the linker.cmd file (missing linker include path to ti_enet_config.h).

I changed nothing else (surprisingly, in syscfg file, the "External Phy management Enable" was not set - as noted in the example description for the lp)

- built the project - started debug session - run the program.

Setup everything up as in the example description. I use a standalone Router (tp-link er605), which runs a dhcp server. One connection to PC - It gives a valid IP address to my PC. One connection to one of the two possible ETH ports (as stated in example description) - I chose Port 0 (J19). 

After starting the Program - i get the following output via UART:

==========================
ENET LWIP App
==========================
Enabling clocks!
EnetPhy_bindDriver:1718
EnetPhy_bindDriver:1718
PHY 3 is alive
PHY 15 is alive
Starting lwIP, local interface IP is dhcp-enabled
Host MAC address: f4:84:4c:fb:c2:29
[LWIPIF_LWIP] Enet has been started successfully
[LWIPIF_LWIP] NETIF INIT SUCCESS
status_callback==UP, local interface IP is 0.0.0.0
UDP server listening on port 5001
Cpsw_handleLinkUp:1972
Cpsw_handleLinkUp:1972
MAC Port 1: link up
MAC Port 2: link up
link_callback==UP
5. 39s : CPU load = 2.36 %
10. 39s : CPU load = 1.84 %
15. 39s : CPU load = 1.84 %
20. 39s : CPU load = 1.84 %
25. 39s : CPU load = 1.83 %
30. 39s : CPU load = 1.85 %
35. 39s : CPU load = 1.84 %
40. 39s : CPU load = 1.84 %
45. 39s : CPU load = 1.84 %
50. 39s : CPU load = 1.84 %
55. 39s : CPU load = 1.85 %
60. 39s : CPU load = 1.85 %
65. 39s : CPU load = 1.85 %
70. 39s : CPU load = 1.84 %
75. 39s : CPU load = 1.84 %
80. 39s : CPU load = 1.84 %
85. 39s : CPU load = 1.84 %
90. 39s : CPU load = 1.84 %
95. 39s : CPU load = 1.84 %
100. 39s : CPU load = 1.84 %
105. 39s : CPU load = 1.85 %
110. 39s : CPU load = 1.85 %
115. 39s : CPU load = 1.85 %
120. 39s : CPU load = 1.85 %
125. 39s : CPU load = 1.85 %
130. 39s : CPU load = 1.85 %
135. 39s : CPU load = 1.84 %
140. 39s : CPU load = 1.84 %
145. 39s : CPU load = 1.84 %
150. 39s : CPU load = 1.84 %
155. 39s : CPU load = 1.84 %
160. 39s : CPU load = 1.84 %
165. 39s : CPU load = 1.84 %
170. 39s : CPU load = 1.84 %
175. 39s : CPU load = 1.84 %
180. 39s : CPU load = 1.84 %
185. 39s : CPU load = 1.84 %
190. 39s : CPU load = 1.84 %
195. 39s : CPU load = 1.84 %
200. 39s : CPU load = 1.84 %
205. 39s : CPU load = 1.85 %
210. 39s : CPU load = 1.85 %
215. 39s : CPU load = 1.85 %
220. 39s : CPU load = 1.85 %
225. 39s : CPU load = 1.85 %
230. 39s : CPU load = 1.85 %
235. 39s : CPU load = 1.85 %
240. 39s : CPU load = 1.84 %
245. 39s : CPU load = 1.85 %
250. 39s : CPU load = 1.85 %
status_callback==UP, local interface IP is 169.254.42.194
255. 39s : CPU load = 1.86 %

It seems a link is up, but there is no ip address set in the beginning, and the link LED of Port 1 (J18) is on:
Later, a non-valid IP address seems to be set, which i can´t "ping" from my PC

After a reset, I tested it without a connected cable, which also led to link LED on on Port 1:

==========================
ENET LWIP App
==========================
Enabling clocks!
EnetPhy_bindDriver:1718
EnetPhy_bindDriver:1718
PHY 3 is alive
PHY 15 is alive
Starting lwIP, local interface IP is dhcp-enabled
Host MAC address: f4:84:4c:fb:c2:29
[LWIPIF_LWIP] Enet has been started successfully
[LWIPIF_LWIP] NETIF INIT SUCCESS
status_callback==UP, local interface IP is 0.0.0.0
UDP server listening on port 5001
5. 39s : CPU load = 2.36 %
10. 39s : CPU load = 2.18 %
15. 39s : CPU load = 1.97 %
20. 39s : CPU load = 2.18 %
25. 39s : CPU load = 1.97 %
30. 39s : CPU load = 2.19 %

Enabling "External Phy Management" led to the same behaviour, but with tons of prints via UART in the beginning like:

EnetMod_ioctl:1305
Mdio_ioctl:581
EnetMod_ioctl:1305
Mdio_ioctl:581
EnetMod_ioctl:1305
Mdio_ioctl:581
EnetMod_ioctl:1305
Mdio_ioctl:581
EnetMod_ioctl:1305
Mdio_ioctl:581
EnetMod_ioctl:1305
Starting lwIP, local interface IP is dhcp-enabled
Host MAC address: f4:84:4c:fb:c2:29
[LWIPIF_LWIP] Enet has been started successfully
[LWIPIF_LWIP] NETIF INIT SUCCESS
status_callback==UP, local interface IP is 0.0.0.0
UDP server listening on port 5001
Cpsw_handleExternalPhyLinkUp:2588
link_callback==UP
22.215s : CPU load = 0.00 %
27.215s : CPU load = 1.83 %

A test with the lwip_icssg example led to a valid IP  address for Port 0, but did also not work on Port 1... 

Could someone help me out on this, please? I would like to use both ETH ports on the LP (as switch), distant goal would be a webserver running on LP.

Best regards,

Martin