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.

AM263P4: Implications of daisy chaining devices using Ethernet and CPSW

Part Number: AM263P4

Tool/software:

We are considering using the 2 ethernet ports on the AM263P4 MCUs to daisy chain multiple units together.

The plan is to use Ethernet and the CPSW block.  Currently the Ethernet works using the LWIP and enet stack.  (enet_lwip_cpsw example)

We may potentially daisy chain up to 7 units together. 

With your expertise, can you please provide comments regarding implications and challenges to this before we commit to this topology?

Some questions:

  1. Does CPSW and LWIP support daisy chaining?
  2. On unit 1, will the CPSW hardware automatically forward all the downstream packets or will all 7 unit's traffic be processed by enet driver taking up RAM and CPU time?
  3. Are there any examples of CPSW daisy chaining?
  4. Any other comments or concerns?

Thank you for the support.

  • Hi Huey,

    1. Yes CPSW supports daisy chaining, you can have both the MAC ports of CPSW functioning, this way CPSW in switch mode will consume packets addressed to that particular board, else the CPSW will forward it to the other node in the daisy chained network.

    2. We can forward the other board packets directly in hardware. The CPSW can classify packets based on Destination MAC Address, VLAN ID, Priority (based on VLAN IDs), Ether-Type, IP header fields, Combination of any of the above. Based on this you can decide what packets to consume in the Host and others to be forwarded to other ports (this forwarding is Hardware based and will not take up the RAM and CPU resources).

    3. We do not have any out-of-box examples in the SDK for daisy-chaining. To build one,
    3.1 Configure the MAC addresses and IP addresses uniquely,
    3.2 Configure the CPSW classifiers so packet forwarding happens properly,

    4. I would like to know more about the use-case here. I wanted to know if you have any expectations with respect to the total turn-around time for packets, Is there any expectation that the packet should reach the last (7th) node in "xyz" time? Any specific expectation w.r.t the throughput/bandwidth. Having all this cleared and setting the right expectation beforehand would help. What is the traffic rate? Is it periodic bursts of packet, is it continuous?

    Some points to note are:

    1. When using LwIP, it would be recommended to use Netconn APIs instead of Socket APIs for better performance.

    2. AM263Px does not have Cut-thru switching enabled in CPSW so the packet forwarding is a bit slower compared to some other devices such as AM243x, AM261x.

    3. If you do not use CPSW Stats in your application, you can disable those from the enet-lld driver as well to have some better performance (less interrupts from stats module, more CPU time for handling packets).

    Regards,
    Shaunak