1G Ethernet detection on RZN1D platform

Hi,

We are using custom board based on RZN1D platform. I wanted to configure the 1G PHY (vsc8531) from CM3 core. We have used VSC8531 Ethernet PHY for 1G Port. I have modified the "00410_goal\eth_state_ctc_cc" example code and able to detect the default PHY ID of VSC8531. To make sure the 1G PHY is working correctly i wanted to ping from system/ PC. I have used the another project "goal_eip_lib\02_dlr_dhcp" for this but unable to debug the functionality because only .h (header) files are included in project.

1) which example code i have to use to check ping functionality of Ethernet?

2) How to set the IP address of RZN1D board?

3) How to debug the GOAL project which have only .h files?

Please help me to resolve the issue.

Parents
  • Here is the feedback from our SW partner (GOAL SW environment and related protocols):

       1) which example code i have o use to check ping functionality of Ethernet?

    Please choose one of the following example applications to check ping functionality of Ethernet: appl\00410_goal\udp_receive, appl\00410_goal\eth_dump or appl\00410_goal\dhcp (if you’re using a DHCP server). The corresponding IAR Workbench projects of your target hardware are in projects\00410_goal\< >\iar\renesas.
    Your test failed, because application 00410_goal\eth_state_ctc_cc does not contain the lwip stack and is therefore not suitable for your project. Same for application 00410_goal\eth_stats.

       2) How to set the IP address of RZN1D board?

    There are different options for you to set the IP address of RZN1D board. You either define your own net address by GOAL_CONFIG_NET_ADDR_IP_DEFAULT, GOAL_CONFIG_NET_ADDR_MASK_DEFAULT and GOAL_CONFIG_NET_ADDR_GATEWAY_DEFAULT in goal_config.h (see appl\goal_eip\01_simple_io\goal_config.h for example) or call goal_netIpSet() in your application. If you are using the DHCP example application you have to setup your DHCP server to assign an IP of your choice to the device.

       3) How to debug the GOAL project which have only .h files?

    There are several Quick Start Guides placed in Documents\RZN.Software\GOAL\QuickStartGuides, containing a description about how to start a debug session of corresponding library on each RZN1 platform. For your named Ethernet-IP example (02_dlr_dhcl) I suggest r11qs0007ed0145-rzn1-goal-quick-startguide-eip.pdf. Please note, that you will not be able to debug the library content but only your application. Thus, setting breakpoints for debugging is only possible in related goal_appl.c file.

  • Hi Schwope,

    Thank you for your suggestion and hint on the issue which i am facing.

    I am using the "appl\00410_goal\udp_receive" for the ping functionality and able to set the IP address also. but the unable to ping to the system.

    Please find the log for the reference.

    [E|goal_cmLoad:787] Config sizes DO NOT match (1064 vs. 524)!)!
    [I|goal_taskCreate:117] creating task: Timer
    [I|goal_tgtTaskCreate:701] task create: Timer
    [I|goal_tgtTaskCreate:705] OS prio: 1, stack: 2048
    [I|goal_taskCreate:160] Created task Timer with priority 85/100 and stack 2128 byte sucessfully.
    [E|goal_targetPhyVSC8531Open:104] VSC8531 PHY is detected
    [I|goal_targetPhyGenericOpen:137] PHY 460146 found at address 1
    [I|goal_targetPhyGenericOpen:146] phy register access index starts at 0.
    [I|goal_targetPhyVSC8531Open:127] PHY found at address 01: Microchip VSC8531
    [E|goal_targetPhyVSC8531Open:104] VSC8531 PHY is detected
    [I|goal_targetPhyGenericOpen:137] PHY 460146 found at address 10
    [I|goal_targetPhyGenericOpen:146] phy register access index starts at 0.
    [I|goal_targetPhyVSC8531Open:127] PHY found at address 0a: Microchip VSC8531
    [E|goal_targetBoardEthPostInit:1223] mapping of PHY port to PHY interface index is success
    [E|goal_targetBoardEthPostInit:1225] mapping of PHY port to PHY interface
    [E|goal_targetBoardEthPostInit:1223] mapping of PHY port to PHY interface index is success
    [E|goal_targetBoardEthPostInit:1225] mapping of PHY port to PHY interface
    [E|goal_targetBoardEthPostInit:1223] mapping of PHY port to PHY interface index is success
    [E|goal_targetBoardEthPostInit:1225] mapping of PHY port to PHY interface
    [I|goal_taskCreate:117] creating task: RGMII Monitor Task
    [I|goal_tgtTaskCreate:701] task create: RGMII Monitor Task
    [I|goal_tgtTaskCreate:705] OS prio: 14, stack: 1024
    [I|goal_taskCreate:160] Created task RGMII Monitor Task with priority 50/100 and stack 1104 byte sucessfully.
    [I|goal_taskCreate:117] creating task: Eth TX Task
    [I|goal_tgtTaskCreate:701] task create: Eth TX Task
    [I|goal_tgtTaskCreate:705] OS prio: 6, stack: 1024
    [I|goal_taskCreate:160] Created task Eth TX Task with priority 75/100 and stack 1104 byte sucessfully.
    [I|goal_taskCreate:117] creating task: Eth RX Task
    [I|goal_tgtTaskCreate:701] task create: Eth RX Task
    [I|goal_tgtTaskCreate:705] OS prio: 8, stack: 1024
    [I|goal_taskCreate:160] Created task Eth RX Task with priority 60/100 and stack 1104 byte sucessfully.
    [I|goal_miEthMcastAdd:1641] added multicast address: 01:00:5e:00:00:01
    [I|goal_targetNetStart:452] lwIP memory settings:
    [I|goal_targetNetStart:453] - MEM_SIZE         0x3e80
    [I|goal_targetNetStart:454] - MEMP_NUM_PBUF    30
    [I|goal_targetNetStart:455] - MEMP_NUM_RAW_PCB 4
    [I|goal_targetNetStart:456] - MEMP_NUM_UDP_PCB 4
    [I|goal_targetNetStart:457] - MEMP_NUM_TCP_PCB 2
    [I|goal_targetNetStart:458] - PBUF_POOL_SIZE   32
    [I|goal_targetNetStart:461] lwIP features/modules:
    [I|goal_targetNetStart:462] - LWIP_ARP     enabled
    [I|goal_targetNetStart:463] - LWIP_ICMP    enabled
    [I|goal_targetNetStart:464] - LWIP_DHCP    off
    [I|goal_targetNetStart:465] - LWIP_AUTOIP  off
    [I|goal_targetNetStart:466] - LWIP_SNMP    off
    [I|goal_targetNetStart:467] - LWIP_IGMP    enabled
    [I|goal_targetNetStart:468] - LWIP_DNS     enabled
    [I|goal_targetNetStart:469] - LWIP_UDP     enabled
    [I|goal_targetNetStart:470] - LWIP_UDPLITE off
    [I|goal_targetNetStart:471] - LWIP_TCP     off
    [I|goal_netIpSet:1445] ip address: 192.168.20.100
    [I|goal_netIpSet:1449] netmask: 255.255.255.0
    [I|goal_netIpSet:1453] gateway: 0.0.0.0
    [I|goal_netIpSet:1457] IP valid flag: false
    [I|goal_netIpSet:1472] successfully updated IP configuration
    [I|goal_miNetOpen:262] ip address: 192.168.20.100
    [I|goal_miNetOpen:266] netmask: 255.255.255.0
    [I|goal_miNetOpen:270] gateway: 0.0.0.0
    [I|goal_miNetOpen:274] IP valid flag: false
    [I|goal_init:185] GOAL initialized
    [I|goal_netIpSet:1445] ip address: 192.168.1.10
    [I|goal_netIpSet:1449] netmask: 255.255.255.0
    [I|goal_netIpSet:1453] gateway: 0.0.0.0
    [I|goal_netIpSet:1457] IP valid flag: true
    [I|goal_netIpSet:1472] successfully updated IP configuration
    [I|appl_setup:102] waiting for UDP connections on port 1234
    [I|goal_memInitDone:152] fixed memory usage: 66804/262144 bytes bytes
    [I|goal_memInitDone:157] fixed memory usage: (26%)
    

    Can you please help me to identify and resolve the issue?

    Regards,

    Mayur

  • Hi Mayur,

    the first error log about invalid config size just informs the user, that the application CM variables and the CM variables detected at NVS do not match. This happens when adding new CM variables, switching protocol, or starting application, which does not write into NVS.

     I suggest following debug steps to get further information of the system :

    - add Break Point 0 (BP 0) at goal_tgtEthRxTask:{703: “if ((E_OK != ercd) || (0 == flags)) {“}

    - add Break Point 1 (BP 1) at goal_tgtEthTxTask(1374: “res = goal_maEthSendFrameGetCb(pMaInst, &pBuf);”)

    à If BP 0 is triggered, incoming frame has passed PHY, MAC and switch successfully.

    à If BP 1 is triggered, the response frame has been created by GOAL and will be forwarded to switch for transmission.

    à If BP 0 is triggered nor BP 1, continue session step by step to detect the point of frame discarding.

    à If neither BP 0 nor BP 1 is triggered, pause debug session at any time after ping requests have been transmitted and check switch/ MAC registers. (I suggest disabling any network interface setting on Windows PC beside IPV4 or usage of Linux or Raspberry Pi to exclude network traffic other than required for ping-process.

    In addition, Wireshark is helpful to validate network traffic.) Are there any counter registers of relevant port(s) increased? If no, frames might be discarded in PHY. Read PHY error registers to check status.

    BR,
    Andreas

Reply
  • Hi Mayur,

    the first error log about invalid config size just informs the user, that the application CM variables and the CM variables detected at NVS do not match. This happens when adding new CM variables, switching protocol, or starting application, which does not write into NVS.

     I suggest following debug steps to get further information of the system :

    - add Break Point 0 (BP 0) at goal_tgtEthRxTask:{703: “if ((E_OK != ercd) || (0 == flags)) {“}

    - add Break Point 1 (BP 1) at goal_tgtEthTxTask(1374: “res = goal_maEthSendFrameGetCb(pMaInst, &pBuf);”)

    à If BP 0 is triggered, incoming frame has passed PHY, MAC and switch successfully.

    à If BP 1 is triggered, the response frame has been created by GOAL and will be forwarded to switch for transmission.

    à If BP 0 is triggered nor BP 1, continue session step by step to detect the point of frame discarding.

    à If neither BP 0 nor BP 1 is triggered, pause debug session at any time after ping requests have been transmitted and check switch/ MAC registers. (I suggest disabling any network interface setting on Windows PC beside IPV4 or usage of Linux or Raspberry Pi to exclude network traffic other than required for ping-process.

    In addition, Wireshark is helpful to validate network traffic.) Are there any counter registers of relevant port(s) increased? If no, frames might be discarded in PHY. Read PHY error registers to check status.

    BR,
    Andreas

Children
No Data