SPRAD72 February   2023 TMS320F28388D , TMS320F28388S , TMS320F28P650DH , TMS320F28P650DK , TMS320F28P650SH , TMS320F28P650SK , TMS320F28P659DH-Q1 , TMS320F28P659DK-Q1 , TMS320F28P659SH-Q1

 

  1.   Abstract
  2.   Trademarks
  3. 1Introduction of SMI
  4. 2PHY Selection and Configuration for EtherCAT
  5. 3How to Read and Write to the PHY Register Using SMI of ESC
    1. 3.1 PHY Register Configuration for EtherCAT
    2. 3.2 Steps to Read or Write PHY Register in C2000 ESC
    3. 3.3 Using the Script to Debug Ethernet PHY Register in CCS
  6. 4Summary
  7. 5References

PHY Register Configuration for EtherCAT

Using the F28388D controlCARD (TMDSCNCD28388D) as the example, there are two EtherCAT ports on the control card with PHY address 0x00 and 0x01, respectively. Use the SMI to program the DP83822 PHY registers to work for EtherCAT 100BASE-TX as follows.

  • LED 0:

    PHY register 0x19 value 0x8020 (Auto-MDIX enable and enable LED0 config)

    PHY register 0x18 value 0x0080 (Active High polarity)

  • LED 1:

    PHY register 0x469 value 0x0440 (Active High polarity)

    Auto negotiate enable configuration:

    Make sure PHY register 0x04 value is 0x01E1 by default (Advertise which modes PHY support)

    PHY register 0x09 value 0x0020 (Enable Robust Auto MDIX)

    PHY register 0x00 value 0x3300 (Enable Auto negotiate and restart process)

  • Odd-nibble Detection Disable Configuration:

    PHY register 0x0A value 0x0002 (Disable Odd-nibble detection)

  • Fast Link-Drop Enable:

    PHY register 0x0B value 0x0008 (Enable FLD with correct FLD features RX Error count)