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: Transmission and Reception from CPSW2G to external device (CANoe)

Part Number: TDA4VM


Tool/software:

Hi Ti,

I am using CPSW2G and want to transmit and receive ethernet frames to and from external device, which is CANoe in my case.

I have a few questions which are as follows:

  1. I want to set transmit MTU for HOST Port (Port 0) to send data to CANoe, which CPSW register is needed for it?
    My understanding: CPSW_TX_PRI0_MAXLEN_REG


  2. I want to set reception MTU for HOST Port (Port 0) to receive data to CANoe, which CPSW register is needed for it?
    My understanding: There is no register to set this because Host Port acts as a transmit engine to external device.
    Athrough CPSW_P0_RX_MAXLEN_REG exists but this doesn't have any impact on setting of ethernet packets received from CANoe because this setting needs to be done with MAC Port.

  3. I want to set transmit MTU for MAC Port (Port 1) to send data to CANoe, which CPSW register is needed for it?
    My understanding: There is no register to set this because MAC Port acts as a receive engine tfrom the external device.

  4. I want to set reception MTU for MAC Port (Port 1), to receive data to CANoe which CPSW register is needed for it?
    My understanding: CPSW_PN_RX_MAXLEN_REG

Please correct me when I am wrong for the questions above based on my understanding.

Looking forward to your response.

Best Regards,
Hasan

  • Hi,

    Can you let me know which CPSW controller are you using? Is it Native Linux driver, native QNX driver or Ethfw or Enet LLD or MCAL Eth?

    Basically Host port will not interact with CANoe at all. Host port will just receive the frames from the Application and send the frames to Application. The external port will be the one sending frames to CANoe.

    For all the ports, the Tx maximum length is configured via CPSW_TX_PRI[0-7]_MAXLEN_REG. Which are per priority registers. Note that Tx for host port will be from Host port to the Application

    For host port, the Rx packets' (from Application to Host port) maximum length is controlled by CPSW_P0_RX_MAXLEN_REG

    For external port, the Rx packets' maximum length is controlled by CPSW_PN_RX_MAXLEN_REG

    Regards,
    Tanmay

  • Hi Tanmay,

    I am developing my own Cpsw2g driver using baremetal.

    The external port will be the one sending frames to CANoe.
    For external port, the Rx packets' maximum length is controlled by CPSW_PN_RX_MAXLEN_REG

    How to control the transmit MTU of external port for sending frames to CANoe?

    For host port, the Rx packets' (from Application to Host port) maximum length is controlled by CPSW_P0_RX_MAXLEN_REG

    How I am able to receive the data from Application to Host Port, the data which is afterwards passed to Application for transmission from external Port (MAC Port, Port 1) to CANoe? Although I have CPSW_P0_RX_MAXLEN_REG set to 0.

    Register settings I have:
    CPSW_TX_PRI[0-7]_MAXLEN_REG: 1518
    CPSW_P0_RX_MAXLEN_REG: 0
    CPSW_PN_RX_MAXLEN_REG: 1518

    Looking forward to your response.

    Best Regards,
    Hasan

  • Hi, 

    I have found a soultion. Ticket can be cloased.

    Best Regards,
    Hasan