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.

TDA4VM: Minimum configuration required for CPSW

Part Number: TDA4VM

Hi there,

Hope you are doing well.

I am writing to ask a few questions about the CPSW module.

POV: I am not using PDK/SDK. I am writing my driver using Bare Metal.

The questions are as follows:

  1. Is it possible to establish a communication for data transmission and reception without the use ALE from one fixed port to another fixed port?
  2. What are the minimum configurations needed for data transmission across CPSW for a basic Ethernet frame? Do we need CPTS and STATS for this basic frame?
  3. Can you provide a basic working example of a CPSW driver?

Looking forward to hearing back from you.

Best regards,
Hasan Aarzoo

  • Hi,

    Is it possible to establish a communication for data transmission and reception without the use ALE from one fixed port to another fixed port?

    Do you mean transfer of Data coming from one of External Port to other External Port? If so, no it is not possible without ALE and also ports to configured in switch Mode (non MAC only Mode).
    If Port is configured in MAC only Mode, data will go Host Port(Internal CPPI port).

    What are the minimum configurations needed for data transmission across CPSW for a basic Ethernet frame? Do we need CPTS and STATS for this basic frame?

    CPTS is for Time sync applications when you have network PTP stack and timesync with external Network. (supports timestamping of ethernet packets).
    STATS are only for debug purpose, if you enable STATS of Port, Registers will automatically update as per data transfer on the port.

    In order to do data transfer following basic configuration are required.
    1. Configure the external Port interface from CTRLMMR register (ENET_CTRL registers) as RGMII or any as per required.
    2. Configure the Host Port (p0) Control registers.
    3. Configure the External Port Control registers.
    4. Configure the ALE, Policers.

    Please to TRM for the details of registers.

    Can you provide a basic working example of a CPSW driver?

    Please refer to PDK examples like "enet_loppback" and enet_lwip_example" form PDK User Guide.
    Source code is available at below path.


    Best Regards,
    Sudheer

  • Hi Sudheer,

    Thank you for the repsonse.

    I am using MCU_CPSW0 for communication. I will configure the port as MAC only. Is ALE necessary in this case as well ?


    Best regards,
    Hasan

  • Hi,

    I am using MCU_CPSW0 for communication. I will configure the port as MAC only. Is ALE necessary in this case as well ?

    You can run the traffic without using the ALE as well, but the transmission will be directed packets not based on forwarding rules i.e. need to provide the Port on which you want to send the traffic.

    We don't have any example without using ALE.

    May I know the use case of Ethernet without using the ALE?

    Best Regards,
    Sudheer

  • Hi Sudheer,

    Thank you for the reply.

    I want to transmit data in a multicast way. ALE is necessary in that case I guess.

    I have a few more questions which are as follows:

    1. I am using MCU_CPSW0 which has only 2 ports, but why in TRM register descriptions of MCU_CPSW0 it mentions 9 ports (0-8)? What does that mean?


    2. In CPSW 2G, VLAN unaware mode, is port/packet priority comes into picture?
    For example, we have 1 port and no vlan means ethernet packet is received and transmitted on/from same port in first in and first out order from the memory, Can you please correct me if I am wrong on this?

    3. What are the minimum configurations needed for ALE classifiers and policers ?

    Looking forward to hearing back from you.

    Best regards,
    Hasan Aarzoo

  • Hi,

    1. I am using MCU_CPSW0 which has only 2 ports, but why in TRM register descriptions of MCU_CPSW0 it mentions 9 ports (0-8)? What does that mean?

    It could be copy, and paste mistake.
    CPSW2G has only two Ports, you can enable bit0 & bit1.

    2. In CPSW 2G, VLAN unaware mode, is port/packet priority comes into picture?

    Usually CPSW used UDMA for transfer or receive of Data using dedicated PCIL links. (It has 8 Tx and 1 Rx Links)
    Also, if CPSW is enabled in VLAN aware mode, if any non VLAN packet is received default Port VLAN value will be inserted in the packet. We need to add VLAN entry for remove tag on egress.
    priority will be PCIL thread ID and packet will be hold in the corresponding buffer and Highest number buffer will send first.

    3. What are the minimum configurations needed for ALE classifiers and policers ?

    You need to add ALE entries for self MAC address, and policer to transfer the data to core where application is running.
    Enable ALE learning, so that it will add MAC address of incoming traffic, so when ever it sees traffic will be sent on external port from where it is received.
    VALN entries to suppress tag if VLAN mode is enabled.

    Please refer to examples mentioned and walk through the code, you may get some better understanding.

    Best Regards,
    Sudheer