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.

AM6442: How to Retrieve Ethernet Link Object

Part Number: AM6442

 

  • SDK: AM64x Industrial Communications SDK v11.00.00
  • Reference Sample: EtherNet/IP Adapter Demo
  • Target Processor: A processor with “E” functionality as described in section 9.1.2 of the JAJSL34G device naming convention
    (i.e., supports “D” functionality, with EtherCAT HW accelerator and CAN-FD enabled)
  • Stack: Third-party EtherNet/IP stack (not the one included in the SDK)

We are using a custom board based on AM64x and the Industrial SDK, and our implementation is based on a sample project provided in response to below question.

AM6442: HWAL_init() and API Usage in EtherNet/IP Adapter Demo - Processors forum - Processors - TI E2E support forums

We are referring to the value corresponding to attribute 4 of the Ethernet Link Object (for example, In Errors or Out Errors).

We could not find a way to retrieve this value.

Could you please advise how to obtain this value?

 

Thank you.

  • Hi Hiroki,

    you can use IOCTL command to read the statistics, here is a code snippet for Port1:

        ICSS_EMAC_PruStatistics pruStatStruct = {0};
        ICSS_EMAC_IoctlCmd  ioctlParams;
     
        ioctlParams.command =  ICSS_EMAC_IOCTL_STAT_CTRL_GET;
        ioctlParams.ioctlVal = (void *)&pruStatStruct;
        
        ICSS_EMAC_ioctl(icssEmacHandle, ICSS_EMAC_IOCTL_STATS_CTRL, (uint8_t)ICSS_EMAC_PORT_1, (void*)&ioctlParams);

    After the call to ICSS_EMAC_ioctl, the pruStatStruct variable would contain the statistic info you need to compose the response for attribute #4.

    Best regards,
    Pourya

  • Hi Pourya,
    Thank you very much for your clear explanation and the code snippet.
    Using ICSS_EMAC_ioctl with ICSS_EMAC_IOCTL_STATS_CTRL worked perfectly for retrieving the statistics needed for Ethernet Link Object.
    Your support helped us resolve the issue.
    Best regards,
    Hiroki