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.

TDA4VM: Query on CPSW9G communication on A72(QNX) with Static IP

Part Number: TDA4VM


Hello Team,

                   We are trying to communicate to QSGMII ports on TDA4VM Eval board through CPSW9G on A72(QNX). One of the QSGMII port is

connected to PC using a BAFO connector(Ethernet to USB) and we are trying to set a static IP.

We did the below modifications to 8.2 versions of RTOS(for ethernet firmware) and QNX SDK.

RTOS SDK(For enabling QSGMII and static IP),

1. ti-processor-sdk-rtos-j721e-evm-08_02_00_05\ethfw\apps\app_remoteswitchcfg_client\mcu_2_1\main.c

#define ENABLE_QSGMII_PORTS              // Enable QSGMII ports

#define ETHAPP_LWIP_USE_DHCP   (0)   // Disable DHCP

2. ti-processor-sdk-rtos-j721e-evm-08_02_00_05\pdk_jacinto_08_02_00_21\packages\ti\drv\enet\examples\utils\makefile


- ifeq ($(SOC),$(filter $(SOC), j721e))
- ENET_CFLAGS += -DENETAPPUTILS_BYPASS_QSGMII
- endif

3. ethfw/apps/app_remoteswitchcfg_server/mcu_2_0/ndk.cfg 

  enableStaticIP   = 1;

QNX SDK(For enabling QSGMII and static IP),

1. psdkqa/qnx/devnp/src/enetlld_if.c

static Enet_MacPort gRemoteAppMacPorts[] =
{
#if defined (SOC_J721E)
    /* configuration based on GESI board */
    // ENET_MAC_PORT_1,
    // ENET_MAC_PORT_3,
    //ENET_MAC_PORT_4,
    //ENET_MAC_PORT_8,
    /* configuration based on QSGMII board */
    ENET_MAC_PORT_2, /* QSGMII main */
    ENET_MAC_PORT_5, /* QSGMII sub */
    ENET_MAC_PORT_6, /* QSGMII sub */
    ENET_MAC_PORT_7, /* QSGMII sub */
#elif defined (SOC_J7200)
    /* configuration based on Quad-Port Eth Expansion board */
    ENET_MAC_PORT_1,
    ENET_MAC_PORT_2,
    ENET_MAC_PORT_3,
    ENET_MAC_PORT_4,
#endif
};

2. psdkqa\qnx\scripts\bsp\710_SVN948724_JBN57\images\j721e-evm-ti.build

ifconfig am0 169.254.1.2 //Static IP

We rebuild the ethfw, enet LLD and loaded the firmware on R5 core(MCU2_0).

Build commands are,

  • "make enet_clean"
  • "make enet"
  • "make ethfw_all_clean"
  • "make ethfw_all BUILD_SOC_LIST=J721E BUILD_QNX_A72=yes"

After loading the ethernet firmware from uboot the QSGMII PHY are detected and we got Link Up in MCU2_0 console.

Also got a static IP, 192.168.1.200

Then we loaded the QNX from uboot and got the below print in MCU2_0 console,

Function:CpswProxyServer_registerIpv4MacHandlerCb,HostId:0,Handle:a2a7e084,CoreKey:38acb7e6, MacAddress:70:ff:76:1d:92:c1 IPv4Addr:169.254.1.2

Then in the A72(QNX) console we tried, ifconfig -v and got inet as 169.254.1.2.

Then we tried,

1) A72 to PC

    ping  169.254.1.1    // 169.254.1.1  is the IP set on the PC side where QSGMII port is connected.

2) PC to A72(on PC command prompt)

    ping  169.254.1.2

Got the error like, ping: sendto: Host is down  

What could be the possible reason why ping is failing? Do we need to do any other changes in software(ETHFW/QNX) or any other settings needs to be changed?

Attaching our logs from both A72 and R5..

Enabling clocks!
=======================================================
            CPSW Ethernet Firmware
=======================================================
main.c: opened UDMA Driver and intilizingggg Ethernet Firmware
ETHFW: Shared multicasts (software fanout):
ETHFW: Reserved multicasts:
  01:80:c2:00:00:0e
  01:1b:19:00:00:00
EnetMcm: CPSW_9G on MAIN NAVSS
PHY 0 is alive
PHY 3 is alive
PHY 12 is alive
PHY 15 is alive
PHY 16 is alive
PHY 17 is alive
PHY 18 is alive
PHY 19 is alive
PHY 23 is alive
EnetPhy_bindDriver: PHY 12: OUI:080028 Model:23 Ver:01 <-> 'dp83867' : OK
EnetPhy_bindDriver: PHY 0: OUI:080028 Model:23 Ver:01 <-> 'dp83867' : OK
EnetPhy_bindDriver: PHY 3: OUI:080028 Model:23 Ver:01 <-> 'dp83867' : OK
EnetPhy_bindDriver: PHY 15: OUI:080028 Model:23 Ver:01 <-> 'dp83867' : OK
EnetPhy_bindDriver: PHY 16: OUI:0001c1 Model:27 Ver:00 <-> 'vsc8514' : OK
EnetPhy_bindDriver: PHY 17: OUI:0001c1 Model:27 Ver:00 <-> 'vsc8514' : OK
EnetPhy_bindDriver: PHY 18: OUI:0001c1 Model:27 Ver:00 <-> 'vsc8514' : OK
EnetPhy_bindDriver: PHY 19: OUI:0001c1 Model:27 Ver:00 <-> 'vsc8514' : OK

ETHFW Version   : 0.02.00
ETHFW Build Date: Aug  4, 2022
ETHFW Build Time: 18:20:02
ETHFW Commit SHA:

main.c: crete IPC initialization Task
Starting lwIP, local interface IP is 192.168.1.200
Host MAC address: 70:ff:76:1d:92:c2
[LWIPIF_LWIP] Enet LLD netif initialized successfully
Added interface 'ti1', IP is 192.168.1.200
EthFw: TimeSync PTP enabled
Rx Flow for Software Inter-VLAN Routing is up
main.c: step1 initializing multiproc
Skipping Ipc_loadResourceTable for QNX (core : mcu2_0) .....
main.c: Intialize Remote config server CPSW Proxy Server
CpswProxyServer: Virtual port configuration:
  mpu_1_0 <-> Switch port 0: mpu_1_0_ethswitch-device-0
  mcu_2_1 <-> Switch port 1: mcu_2_1_ethswitch-device-1
CpswProxyServer: initialization completed (core: mcu2_0)
EthFw_initRemoteConfig() initialized CPSW Proxy starting serverEthFw_initRemoteConfig() started CPSW Proxy serverREMOTE_SERVICE: Init ... !!!
[IPC] Virtio_kick: Ipc_mailboxSend failed
REMOTE_SERVICE: Init ... Done !!!
CpswMacPort_checkSgmiiStatus: MAC 7: SGMII link parter config port: link up: 1-Gbps Full-Duplex
Cpsw_handleLinkUp: Port 7: Link up: 1-Gbps Full-Duplex
CpswCpts_ioctl: Eth RX event not found (msgType=2, seqId=256, dom=0, portNum=6)
CpswCpts_ioctl: Eth RX event not found (msgType=2, seqId=256, dom=0, portNum=6)
CpswCpts_ioctl: Eth RX event not found (msgType=2, seqId=256, dom=0, portNum=6)
CpswCpts_ioctl: Eth RX event not found (msgType=2, seqId=256, dom=0, portNum=6)
Function:CpswProxyServer_attachHandlerCb,HostId:0,CpswType:6
Function:CpswProxyServer_allocMacHandlerCb,HostId:0,Handle:a2a7e084,CoreKey:38acb7e6
Function:CpswProxyServer_allocTxHandlerCb,HostId:0,Handle:a2a7e084,CoreKey:38acb7e6
Function:CpswProxyServer_allocRxHandlerCb,HostId:0,Handle:a2a7e084,CoreKey:38acb7e6
Function:CpswProxyServer_ioctlHandlerCb,HostId:0,Handle:a2a7e084,CoreKey:38acb7e6, Cmd:1010401,InArgsLen:0, OutArgsLen:4
Function:CpswProxyServer_ioctlHandlerCb,HostId:0,Handle:a2a7e084,CoreKey:38acb7e6, Cmd:1010201,InArgsLen:24, OutArgsLen:4
Function:CpswProxyServer_registerMacHandlerCb,HostId:0,Handle:a2a7e084,CoreKey:38acb7e6, MacAddress:70:ff:76:1d:92:c1, FlowIdx:172, FlowIdxOffset:0
Cpsw_ioctlInternal: CPSW: Registered MAC address. ALE entry:7, Policer Entry:3
Function:CpswProxyServer_registerIpv4MacHandlerCb,HostId:0,Handle:a2a7e084,CoreKey:38acb7e6, MacAddress:70:ff:76:1d:92:c1 IPv4Addr:169.254.1.2

 SNo.      IP Address          MAC Address
------    -------------     -----------------
  1       169.254.1.2     70:ff:76:1d:92:c1
Function:CpswProxyServer_ioctlHandlerCb,HostId:0,Handle:a2a7e084,CoreKey:38acb7e6, Cmd:1010222,InArgsLen:144, OutArgsLen:36
Function:CpswProxyServer_ioctlHandlerCb,HostId:0,Handle:a2a7e084,CoreKey:38acb7e6, Cmd:1010202,InArgsLen:24, OutArgsLen:4
Function:CpswProxyServer_ioctlHandlerCb,HostId:0,Handle:a2a7e084,CoreKey:38acb7e6, Cmd:1010224,InArgsLen:132, OutArgsLen:0
Function:CpswProxyServer_ioctlHandlerCb,HostId:0,Handle:a2a7e084,CoreKey:38acb7e6, Cmd:1010222,InArgsLen:144, OutArgsLen:36
Function:CpswProxyServer_ioctlHandlerCb,HostId:0,Handle:a2a7e084,CoreKey:38acb7e6, Cmd:1010202,InArgsLen:24, OutArgsLen:4
Function:CpswProxyServer_ioctlHandlerCb,HostId:0,Handle:a2a7e084,CoreKey:38acb7e6, Cmd:1010222,InArgsLen:144, OutArgsLen:36
Function:CpswProxyServer_ioctlHandlerCb,HostId:0,Handle:a2a7e084,CoreKey:38acb7e6, Cmd:1010202,InArgsLen:24, OutArgsLen:4
Function:CpswProxyServer_ioctlHandlerCb,HostId:0,Handle:a2a7e084,CoreKey:38acb7e6, Cmd:1010224,InArgsLen:132, OutArgsLen:0
Function:CpswProxyServer_ioctlHandlerCb,HostId:0,Handle:a2a7e084,CoreKey:38acb7e6, Cmd:1010224,InArgsLen:132, OutArgsLen:0
Function:CpswProxyServer_ioctlHandlerCb,HostId:0,Handle:a2a7e084,CoreKey:38acb7e6, Cmd:1010222,InArgsLen:144, OutArgsLen:36
Function:CpswProxyServer_ioctlHandlerCb,HostId:0,Handle:a2a7e084,CoreKey:38acb7e6, Cmd:1010202,InArgsLen:24, OutArgsLen:4
Function:CpswProxyServer_ioctlHandlerCb,HostId:0,Handle:a2a7e084,CoreKey:38acb7e6, Cmd:1010222,InArgsLen:144, OutArgsLen:36
Function:CpswProxyServer_ioctlHandlerCb,HostId:0,Handle:a2a7e084,CoreKey:38acb7e6, Cmd:1010202,InArgsLen:24, OutArgsLen:4
Function:CpswProxyServer_ioctlHandlerCb,HostId:0,Handle:a2a7e084,CoreKey:38acb7e6, Cmd:1010222,InArgsLen:144, OutArgsLen:36
Function:CpswProxyServer_ioctlHandlerCb,HostId:0,Handle:a2a7e084,CoreKey:38acb7e6, Cmd:1010202,InArgsLen:24, OutArgsLen:4
=> go 0x80080000
## Starting application at 0x80080000 ...
MMU: 16-bit ASID 44-bit PA TCR_EL1=b5183519
ARM GIC-500 r1p1, arch v3.0 detected
gic_v3_lpi_add_entry for vectors 8192 -> 8447, Ok
gic_v3_lpi_add_entry for vectors 8448 -> 65535, Ok
No SPI intrinfo. Add default entry for 32 -> 991 vectors, Ok
LPI config table #1 @ 000000008000f000, callout vaddr: ffffff8040251000
cpu0: MPIDR=80000000
cpu0: MIDR=411fd080 Cortex-A72 r1p0
cpu0: CWG=4 ERG=4 Dminline=4 Iminline=4 PIPT
cpu0: CLIDR=a200023 LoUU=1 LoC=2 LoUIS=1
cpu0: L1 Icache 48K linesz=64 set/way=256/3
cpu0: L1 Dcache 32K linesz=64 set/way=256/2
cpu0: L2 Unified 1024K linesz=64 set/way=1024/16
Enabling ITS 0
ITS queue at 0000000080020000, num slots: 256
Issue MAPC/SYNC/INVALL commands for ICID 0
update CWRITER to 0x00000060
Waiting for all commands to be processed ... Done in 1 tries
Enable LPIs in GICR_CTLR @ 0000000001900000 for CPU0
Display set to A72 DSS
Total Available L3 cache (MSMC SRAM): 0 bytes
Loading IFS...decompressing...done
cpu1: MPIDR=80000001
cpu1: MIDR=411fd080 Cortex-A72 r1p0
cpu1: CWG=4 ERG=4 Dminline=4 Iminline=4 PIPT
cpu1: CLIDR=a200023 LoUU=1 LoC=2 LoUIS=1
cpu1: L1 Icache 48K linesz=64 set/way=256/3
cpu1: L1 Dcache 32K linesz=64 set/way=256/2
cpu1: L2 Unified 1024K linesz=64 set/way=1024/16
ITS 0 already Enabled
ITS queue at 0000000080020000, num slots: 256
Issue MAPC/SYNC/INVALL commands for ICID 1
update CWRITER to 0x000000c0
Waiting for all commands to be processed ... Done in 1 tries
Enable LPIs in GICR_CTLR @ 0000000001920000 for CPU1

System page at phys:0000000080023000 user:ffffff8040275000 kern:ffffff8040272000
Starting next program at vffffff8060096e10
All ClockCycles offsets within tolerance
Welcome to QNX Neutrino 7.1.0 on the TI J721E EVM Board!!
Starting random service ...
Starting TI services ...
Starting TI IPC Resmgr
start serial driver
Setting OS clock from RTC
Starting MMC/SD memory card driver... eMMC
Starting MMC/SD memory card driver... SD
Starting Network driver...
Unable to start "Ensure" (2)
Path=0 - am65x
 target=0 lun=0     Direct-Access(0) - SDMMC: S0J56X Rev: 1.0
Starting XHCI driver on USB3SS0 and USB3SS1
setting env variables.


# ifconfig -v
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33136
        input: 0 packets, 0 bytes
        output: 0 packets, 0 bytes
        inet 127.0.0.1 netmask 0xff000000
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
an0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        address: 70:ff:76:1d:92:c1
        media: Ethernet none (1000baseT full-duplex)
        status: active
        input: 0 packets, 0 bytes
        output: 4 packets, 292 bytes, 3 multicasts
        inet 169.254.1.2 netmask 0xffff0000 broadcast 169.254.255.255
        inet6 fe80::72ff:76ff:fe1d:92c1%an0 prefixlen 64 scopeid 0x11

# ping 169.254.1.1
PING 169.254.1.1 (169.254.1.1): 56 data bytes
ping: sendto: Host is down

  • Hi,

    Can you try to change the MCU2_1 static IP from 192.168.1.200 to 169.254.1.x so it is on the same subnet as A72 and PC?

    Regards,
    Stanley

  • Hello Stanley,

                          Thanks for replying. I tried changing the MCU2_0(ETHFW) static IP from 192.168.1.200 to 169.254.1.3. Still I am not able to ping A72(QNX) from PC. Now the IP address are below,

    PC   : 169.254.1.1

    A72 : 169.254.1.2

    R5(MCU2_0)   : 169.254.1.3

     

    After loading the ethernet firmware if we try pinging R5 core from PC its working.

    ping 169.254.1.3   //working

    But after loading and running QNX on A72 the ping is not working for both A72 and R5.

    ping 169.254.1.3   //not working

    ping 169.254.1.2   //not working

     

    Do you have any idea why this is happening?

    Regards,

    Nideesh

  • Hi,

    Sorry for delayed response.

    As per above observation, Issue could be configuration of SerDes at U-boot and QNX side but it is already configured from Ethernet Firmware.

    Can you please disable SerDes configuration from u-boot and QNX by referring to FAQ.

       (OR)

    You can try by setting u-boot environment variable and ignore all above/your changes.

    1. Stop booting at u-boot and follow as below.

    • printenv
    • setenv dorprocboot 1
    • saveenv
    • Power off & on

    Best Regards,

    Sudheer