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.

TMS320F28388D: EMAC UDP checksum issues

Part Number: TMS320F28388D


Hi,

I am having issues with UDP checksum on the EMAC peripheral while getting my hands on the EMAC peripheral.
Let me explain, step-by-step, what I did.

Step 1: Sending a packet to the host computer

I have first tried to transmit a correct UDP packet that I catch using wireshark.
As I am intending to have fragmented packet, I am computing the UDP checksum with a custom function.
So when writing the descriptors, I set the CIC field to 1 in the TDES3 in order to only let the EMAC peripheral manage the IP checksum computation and insertion.

The sent packet is correctly retrieved by wireshark which validates the packet, ie. good checksum included.

Step 2: Sending a packet to self (i.e. internal loopback activated) with custom checksum computation

After this successfull step, I am sending the exact same packet with internal loopback enabled and the IPC bit set in the MAC_Configuration register so that the EMAC peripheral checks the IP header checksum and UDP payload checksum upon reception.

Nothing is received and when I look into the status registers:

  • Rx_Unicast_Packets_Good is incremented
  • Rx_UDP_Error_Packets is incremented
  • Rx_UDP_Error_Octets contains the number of bytes from my UDP datagram

Step 3: Same but with auto computed/inserted checksum computation

As it wasn't working, I changed the CIC field value to 3 in the TDES3 in order to let the EMAC peripheral also manage the UDP checksum computation and insertion.

When I do that, the packets are correctly received, however the computed UDP checksum differs from the one I computed.

Step 4: Same but without the internal loopback

As the previous step was working, I decided to try to do the same but without the internal loopback in order to check the output with wireshark.

When I do that, wireshark indicates that the UDP checksum is incorrect.

So it seems that the UDP checksum computation offload in the EMAC peripheral is not working properly.

And per consequence, the checksum verification offload does not work either.

Please advise,
Best regards

Clément