SLUUDO2 September   2026 AM2611 , AM2612 , AM2612-Q1 , AM2631 , AM2631-Q1 , AM2632 , AM2632-Q1 , AM2634 , AM2634-Q1 , AM263P2 , AM263P2-Q1 , AM263P4 , AM263P4-Q1

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Acronyms
  5. 2Introduction
  6. 3Introduction to CPSWSS and ENET-LLD
    1. 3.1 Hardware
    2. 3.2 Software
    3. 3.3 Application Software
      1. 3.3.1 Board and Peripherals Initialization (SYSCFG)
      2. 3.3.2 CPSW Configuration (ENET-LLD)
      3. 3.3.3 Operating System (FreeRTOS or NoRTOS)
      4. 3.3.4 Middleware Stack (LwIP, Arm® Mbed™ Platform TLS, TSN)
      5. 3.3.5 Application Layer
  7. 4Debugging Hardware and Software
    1. 4.1 Hardware Debugging
      1. 4.1.1 Schematic Review Checklist
        1. 4.1.1.1 Management Data Input/Output (MDIO and MDC)
        2. 4.1.1.2 RGMII Interface
      2. 4.1.2 PHY Debug
        1. 4.1.2.1 PHY Bootstrap Settings
        2. 4.1.2.2 Trace Length
        3. 4.1.2.3 Clock Configuration
        4. 4.1.2.4 Mode Settings
        5. 4.1.2.5 IO MUX and SW Switch Settings
        6. 4.1.2.6 PHY Troubleshooting Guides
        7. 4.1.2.7 Custom Pin MUX Settings
      3. 4.1.3 Test Setup
      4. 4.1.4 Software Debugging
        1. 4.1.4.1 Using GEL Scripts in CCS
          1. 4.1.4.1.1 Statistics Using GEL Scripts
          2. 4.1.4.1.2 Statistics Using Expressions
      5. 4.1.5 Debugging Custom Ethernet Software
        1. 4.1.5.1 Debugging Initialization Sequence
        2. 4.1.5.2 PHY Debugging
        3. 4.1.5.3 MAC Port Debugging
        4. 4.1.5.4 TX Path Debugging
        5. 4.1.5.5 Systematic Debugging Checklist
          1. 4.1.5.5.1 RX Path Debugging
          2. 4.1.5.5.2 Multicast or Broadcast Does Not Work, But Unicast Works
    2. 4.2 Custom Hardware Bring-Up Process
      1. 4.2.1 Example 1: CPSW PHY Loopback
        1. 4.2.1.1 Failure: PHY Not Detected or MDIO Bus Not Alive
        2. 4.2.1.2 Failure: TX Packets Transmitted But RX Count = 0
      2. 4.2.2 Example 2: CPSW MAC Loopback Example
        1. 4.2.2.1 Failure: MAC Loopback Initialization Fails
        2. 4.2.2.2 Failure: TX Packets Increase But RX = 0
        3. 4.2.2.3 Failure: Nonzero Error Counters
      3. 4.2.3 Example 3: Enet_Layer2_CPSW and Enet_Layer2_cpsw_switch
        1. 4.2.3.1 Hardware Setup
        2. 4.2.3.2 Failure: Link Never Comes UP
        3. 4.2.3.3 Failure: Link is Up But No Frames Are Received or Transmitted
        4. 4.2.3.4 Failure: RX and TX Counters Increase But Error Rates Are High
      4. 4.2.4 Example 4: Enet_lwip_cpsw_example
        1. 4.2.4.1 Failure: Link Never Comes Up
        2. 4.2.4.2 Failure: Links Up But No IP Address Is Assigned
        3. 4.2.4.3 Failure: Ping Fails Despite Link and IP Address
    3. 4.3 Debugging Packet Forwarding Issues (ALE and Statistics)
      1. 4.3.1 CPSW Statistics Architecture
        1. 4.3.1.1 What Each Block Measures
        2. 4.3.1.2 Counter Reference Tables
          1. 4.3.1.2.1 MAC Port – RX Counters
          2. 4.3.1.2.2 MAC Port – TX Counters
          3. 4.3.1.2.3 MAC Port and Host Port – ALE and FIFO Drop Counters
          4. 4.3.1.2.4 Host Port – ALE Flood and Overrun Counters
          5. 4.3.1.2.5 MAC Port RX Issues
          6. 4.3.1.2.6 MAC Port TX Issues
          7. 4.3.1.2.7 Host Port RX Issues
          8. 4.3.1.2.8 Host Port TX Issues
    4. 4.4 Custom Board Enablement in SYSCFG
    5. 4.5 LwIP Debug Guide
      1. 4.5.1 LwIP Stack Configuration
      2. 4.5.2 lwip_stats
  8. 5Conclusion
  9. 6References

Hardware

AM2612 AM2611 AM2634 AM2632 AM2631 AM263P4 AM263P2 AM263P4-Q1 AM263P2-Q1 AM2612-Q1 AM2634-Q1 AM2632 CPSWSS Block DiagramFigure 3-1 CPSWSS Block Diagram

The CPSW subsystem provides Ethernet communication with hardware switching capabilities compliant to the IEEE 802.3 (Ethernet Working Group) standard. CPSW3G on AM26x devices supports 10Mbps, 100Mbps, or 1000Mbps operations with a selectable MII, RMII, or RGMII.

Port Architecture

  • Port-0 (host port): Port-0 is a CPDMA and CPPI between the CPU and MAC ports. All packets to and from the Arm Cortex-R5F core traverse this port.
  • Port-1 and Port-2 (external MAC ports): Port-1 and Port-2 are physical Ethernet interfaces that support MII, GMII, RMII, RGMII, SGMII, and QSGMII.

SYSCFG automatically generates code and ENET-LLD handles the initial configuration. The application layer performs additional runtime configuration as necessary. Any packet entering the device externally enters through either the MAC port-1 or MAC port-2. If the packet is meant to be consumed by the device, the packet is forwarded to the host port. If the packet is meant to be sent to another port, the packet is switched to the other MAC port.

CPSW Sub-blocks

The CPSW subsystem is comprised of these smaller blocks:

  • CPDMA: The packet DMA controller handles transfers between the host port and the Arm Cortex-R5F core. The CPDMA implements Ethernet ports that support a line-rate bandwidth interface compliant to TI's CPPI 3.0 and CBA 3.1 transfer standards.
  • ALE (address look-up engine): The ALE processes incoming packets using a port number, destination and source MAC, EtherType, and VLAN information. The ALE has an output port-mask that indicates the forwarding destinations. The ALE is critical for packet routing and filtering.
  • Interrupt controller: The interrupt controller handles six interrupt sources, including TX/RX packet events, per-port statistical updates, link status changes, ECC errors, and ALE events.
  • Statistic module: This module includes hardware counters that track per-port statistics. The module captures good and bad frame counts, drop counts (ALE overrun, FIFO overrun, fragmentation, portmask drops, oversized or undersized frames), and CRC and alignment errors.
  • CPTS (common platform timesync): The CPTS is the timestamping engine for TX/RX packets. Timing events are pushed to the CPSW FIFO circuit for gPTP and TSN operations.
  • MDIO (management data input/output): The serial management interface that controls the external PHY devices according to IEEE 802.3 (Standard for Ethernet). The MDIO handles the PHY configuration (link speed, duplex, power), status monitoring (link up or down), and automatic negotiation.

Packet Classification

CPSW hardware can classify packets based on the following:

  • Destination MAC address
  • Source MAC address
  • VLAN ID and priority
  • EtherType
  • Destination and source IP header fields
  • A combination of the parameters in this list

Based on the above list, a variety of rules can be set for consuming, forwarding, or dropping a packet on MAC ports. The CPSW also supports hardware-based modification of some of the above fields of the frame—offloading this operation from the CPU or software.

VLAN Support

Hardware VLAN tagging and filtering enables logical network segmentation. CPSW supports the following:

  • Insertion and removal of the VLAN tags
  • Packet classification based on the VLAN
  • Inter-VLAN and Intra-VLAN routing in hardware
  • Broadcast domain isolation

Use-cases include isolating the control plane from the traffic of the data plane, prioritizing safety-critical messages, and multi-tenant communication over shared physical infrastructure.

Rate Limiting

Policers enforce bandwidth limits at the ingress and egress of each MAC port. Packets that exceed the configured thresholds are dropped or remarked. Policers are essential for preventing congestion and maintaining fairness and deterministic latency in time-sensitive applications. Policers combined with QoS and VLAN tagging, provides complete traffic management for industrial Ethernet systems.