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: MCU_CSPW0: Questions about CPSW FIFO and Queues

Part Number: TDA4VM

Hi TI,

I am working on TI PDK  Hello world example for CPSW from the latest PDK. I have modified the EnetMem_Init() to allocate memory for 5 Ethernet packets for transmission and 5 ethernet packets for reception.
The LOOPBACK mode for MAC is disabled. I am transmitting the packets to CANoe from CPU and receiving the packets from CANoe to CPU.

I have noticed that when I receive 5 packets from CANoe to CPU. I can read them. I can start the next reception after releasing the ready packets and enqueuing the free packets and submit RxPktQ.
If I don't performs the dequeuing, enqueueing and submit operation, the new packets transmitted from CANoe doesn't appear in the memory (packets are dropped).


Question: Is there a way to overwrite the oldest of 5 packets with the newly received ethernet packets rather than dropping it ?

Looking forward to hearing back from you.

Best regards,
Hasan
 

  • Hi,

    I have noticed that when I receive 5 packets from CANoe to CPU. I can read them. I can start the next reception after releasing the ready packets and enqueuing the free packets and submit RxPktQ.
    If I don't performs the dequeuing, enqueueing and submit operation, the new packets transmitted from CANoe doesn't appear in the memory (packets are dropped).

    The dequeuing, enqueuing is tied with UDMA descriptors if you are not done. UDMA doesn't know about the free descriptors and can't send anything.

    It must required to dequeuing, enqueuing of Tx & Rx queues for handling of transmission and reception of packets via CPSW using UDMA.

    Question: Is there a way to overwrite the oldest of 5 packets with the newly received ethernet packets rather than dropping it ?

    packet buffers you can use, but submitting the Descriptors to UDMA is happen via enqueuing, dequeuing. So, this can't be avoided.

    Best Regards,
    Sudheer