Other Parts Discussed in Thread: TDA4VH
Tool/software:
Hello TI,
We are using custom board based on the TDA4VH (version 10.00 of PSDK RTOS).
We have integrated new Eth PHY (NXP PHY) in RTOS according to the integration guide. PHY is connected to the MAIN CPSW2G interface.
We are using enet_lwip_example in order to verify stack, but without success, so far.
Short status is that we have functional MDIO communication towards the PHY, but neither PING nor UDP echo functionality in the example does not work.
Detailed changes on our side, apart from ETH PHY specific layer:
- Phy address in structure gEnetCpbBoard_j7xEthPort (new value 19U) and isStraped value from BFALSE to BTRUE inside enet_board_j784s4_evm.c
- Our PHY is HW strapped and in the rgmii-id mode, no config should be deployed in order to work. This has been tested on the Linux side, and is fully functional (both MDIO and RGMII side)
- Ethernet is 1Gbit FD.
- Phy MDIO address in macro BOARD_MAIN_EMAC_PHY_ADDR (19U) inside board_cfg.h file - not sure whether this is used at all.
- Static IP adress assignement for the given example:
- Uncommented USE_DHCP and USE_AUTOIP macros (default value is 0 and it is not changed) inside lwipcfg.h
- Assigned values of ip address and gateway address in lines following lines inside lwipcfg.h
- #define LWIP_PORT_INIT_IPADDR(addr) IP4_ADDR((addr), 192,168,0,1) (we used different values)
define LWIP_PORT_INIT_GW(addr) IP4_ADDR((addr), 169,254,1,1) - We are using direct connection with PC. Environment is tested with the Linux stack on board and is OK.
- #define LWIP_PORT_INIT_IPADDR(addr) IP4_ADDR((addr), 192,168,0,1) (we used different values)
- Changed value of LWIP_PING_APP macro form 0 to 1 to enable ping application inside lwipcfg.h file
Below is output of enet_lwip_freertos application with some of our additional logs:
oard init finished
==========================
Enet lwIP App
==========================
Select peripheral type
0: Main CPSW_2G
0
Select MAC port
0: ENET_MAC_PORT_1 - RGMII
0
EnetBoard_setupPorts: 1 of 1 ports configurations found
CPU Load: 100%
Starting lwIP, local interface IP is 169.254.27.170
Failed to read Main CPSW2G MAC IDs from EEPROM: -1
No valid MAC address found in EEPROM, falling back to static address
EnetMcm: CPSW_2G on MCU NAVSS
PHY 19 is alive
EnetPhy_bindDriver: PHY 19: OUI:0006ec Model:03 Ver:01 <-> 'TJA1120' : OK
Host MAC address: 70:ff:76:1d:92:c2
[LWIPIF_LWIP] Enet LLD netif initialized successfully
Status callbask sholud be registered here
Status callback function 1, this one is supposed to be calledstatus_callback==UP, local interface IP is 169.254.27.170
Enet lwIP App: Added Network IP address I/F ti0: 169.254.27.170
Initializing apps
UDP server listening on port 5001
Reg read value: 12
EnetPhy_tick: PHY 19: LINK_WAIT (rem ticks 50)
Cpsw_handleLinkUp: Port 1: Link up: 1-Gbps Full-Duplex
MAC Port 1: link up
Link callback 1
link_callback==UP
Log seems to match with similar example that you provided here in 4.7.6.1.3.1. Enet lwIP Example — Platform Development Kit (PDK) - JACINTO User Guide :
We have read status register to make sure that TDA4 is in proper RGMII mode and we confirmed it (from app (using CPS_REG_READ) we read value 0x12 from the register 0x00104034).
We do have issue that application still does not work neither ping test or any ethtool test.
Do you have ideas how shall we proceed further with debugging, or what can be wrong?
Our expectation was that once the PHY is properly addresses rest of the SW stack should work fine. Is this assumption correct, or something else is needed to be performed?
Regards,
Milena