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.

TCI6638K2K Ethernet Switch PORTs ENABLE

Hello,

On my project, I want to see counter of flowing packet on ports. So I am observing switch stats(STATSA,STATSB,STATSC,STATSD). When I send to packet from port 2 Stats counters are not increased also Port 4. But if Packet is sent from Port 1 I saw increasing on stats counter. 

Switch initialization is done below step by step:

-SGMII Serdes 

-MAC 

-MDIO

-Switch

Could you tell me my wrong on steps and  how I can realize  initializing ports step by step?

Thank you 

  • Hi Serdar,

    Refer section 2.9 Initialization of KeyStone Architecture Gigabit Ethernet (GbE) Switch Subsystem User Guide(SPRUGV9D).

    GbE switch subsystem initialization procedure:
    1. Configure the CPSW_CONTROL Register
    2. Configure the MAC1_SA and MAC2_SA (MAC3_SA and MAC4_SA if KeyStone II) source address
    hi and lo registers
    3. Enable the desired statistics ports by programming the CPSW_STAT_PORT_EN Register
    4. Configure the ALE
    5. Configure MAC modules
    6. Configure the MDIO and external PHY (if used)
    7. Configure the SGMII modules

    Thank you.
  •  Hi Serdar,

    In addition to what Raja mentioned, recall also that STATB and STATD are combined stats for ports 1,2,3 & 4 respectively (i.e. all MAC ports). However, you may enable/disable stats per port via CPSW_STAT_EN register such that only port 1 or 2 are reflected in STATB (and same goes for 3 or 4 on STATD). Make sure that you have set value of 0x000000FF if you want all stats to be enabled and you want to have STATA/STATB visible in the memory map or a value of 0x1000000FF if you want all stats enable and STATC/STATD visible in the memory map.

    Double check that ALE_PORT_CONTROL registers for port 2 and port 4 are set to "Forward" mode.

    Regards,

    Javier