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.

RTOS/AMIC110: EtherCAT Slave PHY issue

Part Number: AMIC110

Tool/software: TI-RTOS

Hi Team,

My customer now is using the AMIC110 for EtherCAT slave project. The software version is PROCESSOR SDK RTOS 03_03_00_04, PRU-ICSS-ETHERCAT-SLAVE 01_00_03_01. 

For the hardware design, they chose to use the Micrel Semiconductor KSZ8041NLfollow the design of the design of the AMIC110 ICE EVM.

They're trying to use the EtherCAT full application demo, and it worked fine with the AMIC110 ICE. However, on their production board, after using the code on the production board, the link light was lighting but the EtherCAT cannot work. 

when tracing the PHY register, they found some register settings doesn't have the same values as those on the AMIC110 ICE. 

So they'd like to know:

1. is there any document could help to understand the register values? I've attached an example. 

2. is there any porting guide for this ethercat slave demo? for the  Micrel Semiconductor KSZ8041NL

3. is there any debug guide for this issue debugging? 

  • The RTOS team have been notified. They will respond here.
  • Hi Steven

    Regretfully our knowledge on this phy is very limited.

    A good source of information on Sitara processors is the Sitara FAQ http://processors.wiki.ti.com/index.php/FAQ_Sitara_Industrial

    The FAQ lists a guide on information on porting industrial applications from a TI Sitara EVM to a custom board that is available at http://processors.wiki.ti.com/index.php/Industrial_SDK_EMAC_Porting_Guide

    A debug guide is in development that is expected to be available by late December.

    Beckhoff also has some recommendations in their phy selection guide and trouble shooting guide at https://www.beckhoff.com/english.asp?download/ethercat_development_products.htm

    Can you provide more detail on what issues the customer is encountering?

    David

  • David, 

    Thanks for your feedback and providing the useful links! 

    The problem is that when customer change to the KSZ phy, the EtherCAT communication would fail. Specifically, the EtherCAT link doesn't work correctly even the link light is on.  

    After several days' debugging, it was found that the phy link has to be set established manually, then it could connect to the EtherCAT master. By adding the code of "while(bsp_pruss_mdio_phy_link_state(pruIcss1Handle, 1) != 2)" after phy initialization,  it could link normally.  However, without Ethercat cable plugged in, the code would stop waiting here.

    Here comes the questions:

    1. Does the PRU EtherCAT design requiring any special sequencing for the PHY? As the KSZ phy could work well with ET1100 (customers' previous design), but it cannot directly work with AMIC110. So customer is asking for the AMIC110 requirement about the PHY part, such as sequencing. 

    2. They're curious about  some operation, so want to get the document about the below AMIC registers definition and operation/programming model. Can we provide the documents?

       

    #define ESC_ADDR_TI_PORT0_ACTIVITY                  0xE00

    #define ESC_ADDR_TI_PORT1_ACTIVITY                  0xE04

    #define ESC_ADDR_TI_PORT0_PHYADDR                 0xE08

    #define ESC_ADDR_TI_PORT1_PHYADDR                 0xE09

    #define ESC_ADDR_TI_PDI_ISR_PINSEL                     0xE0A

    #define ESC_ADDR_TI_PHY_LINK_POLARITY             0XE0C

    #define ESC_ADDR_TI_PORT0_TX_START_DELAY    0xE10

    #define ESC_ADDR_TI_PORT1_TX_START_DELAY    0xE12

    #define ESC_ADDR_TI_ESC_RESET                           0xE14

    PS: Here is an example for why the document is needed. 

    Customer found that if they commented the below codes, the slave part cannot connect to the master normally. They want to learn what happen/operation is done here.

        //Indicate PHY address to firmware via vendor specfic registers

        bsp_write_byte(pruIcssHandle, pmdio_params->addr0, ESC_ADDR_TI_PORT0_PHYADDR);  //must done

        bsp_write_byte(pruIcssHandle, pmdio_params->addr1, ESC_ADDR_TI_PORT1_PHYADDR);

        bsp_write_byte(pruIcssHandle, (1 << PDI_ISR_EDIO_NUM),ESC_ADDR_TI_PDI_ISR_PINSEL);

  • Hi Steven

    In general basic  phy configuration is specified in the board library and the code that performs the MDIO configuration. 

    Board_phy.c

    Board_tlkphy.c

     and

    Bsp_init.c

     

    Reference http://processors.wiki.ti.com/index.php/Industrial_SDK_EMAC_Porting_Guide

     

    1. Does the PRU EtherCAT design requiring any special sequencing for the PHY? As the KSZ phy could work well with ET1100 (customers' previous design), but it cannot directly work with AMIC110. So customer is asking for the AMIC110 requirement about the PHY part, such as sequencing. 

     

    For the AMIC110 DP83822 it was necessary to perform a phy reset before enabling the pin mux.

     

    2. They're curious about some operation, so want to get the document about the below AMIC registers definition and operation/programming model. Can we provide the documents?

     

    The EtherCAT slave controller register list is http://processors.wiki.ti.com/index.php/PRU_ICSS_EtherCAT_Slave_Controller_Register_List

     

    The addresses shown are internal PRU interface addresses that are used by the EtherCAT controller to transfer values to/from the PRU and not meant for customer programing.

    #define ESC_ADDR_TI_PORT0_ACTIVITY 0xE00

    #define ESC_ADDR_TI_PORT1_ACTIVITY 0xE04

    #define ESC_ADDR_TI_PORT0_PHYADDR   0xE08

    #define ESC_ADDR_TI_PORT1_PHYADDR   0xE09

    #define ESC_ADDR_TI_PDI_ISR_PINSEL 0xE0A

    #define ESC_ADDR_TI_PHY_LINK_POLARITY   0XE0C

    #define ESC_ADDR_TI_PORT0_TX_START_DELAY   0xE10

    #define ESC_ADDR_TI_PORT1_TX_START_DELAY   0xE12

    #define ESC_ADDR_TI_ESC_RESET       0xE14

     

    David