cancel
Showing results for 
Search instead for 
Did you mean: 

Ethernet not performing hardware CRC on STM32F765

LMore.5
Associate II

I'm bringing up an Ethernet project with the latest FreeRTOS+TCP and SPL ported from the F407.

I've got it sending packets but the responses to the ICMP when I ping the device come across in wireshark as having invalid CRCs of all zeros (see wireshark attached). Checking the Status word of the DMATxDesc before we set the own bit shows the CIC bits as 11 to have the hardware perform all the checksums.

Any recommendations as to what the problem may be and how to resolve?

0693W00000GWq4NQAT.png0693W00000GWq4DQAT.png

7 REPLIES 7

>>Ethernet not performing hardware CRC on STM32F765

The Ethernet one (802.3), or the TCP/IP layer one

Check the Errata

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Thanks,

The errata mentions an issue with IPv6 packet checksums, but we're not supporting IPv6 at this time and using IPv4.

Checksum is the IP layer checksum. Header checksum is there (as shown in the attached image).

My checksum setting is 0b11, so according to the reference manual RM0410 Rev 4 section 42.6.7 Tx DMA configuration:

11: IP Header checksum and payload checksum calculation and insertion are enabled, and
pseudo-header checksum is calculated in hardware.

My understanding is this should calculate both sets of checksums and insert them in the packet before sending.

This is third, transport level (here: ICMP header - okay, ICMP is that "intermediate" level, not transport; but from "header layering" perspective it's en par with TCP/UDP) checksum.

RM says that it won't be calculated (while IP header checksum will be) if there's not enough space in FIFO; that would imply some heavy traffic.

So, what were the conditions of the test, exactly? Do you stress-test the application? Do *all* ICMP messages fail in this way, or only some?

JW

Really light traffic: Only my computer and the device connected via an ethernet cable. Still trying to get things up so haven't started stress testing yet. All of the ICMP Ping messages I try to send from my computer fail this way.

I changed our stack to not use the HW checksum and calculate everything in software and I can communicate now. Ideally we'd use the hardware checksum.

Read the checksum-offload narrative in RM and try to go through all the registers which may appear to be relevant. Try to change the payload size and alignment of the packet in memory. Check if size set to transfer packet through DMA matches size in header(s). Check if the ICMP checksum is set to 0 before calculation.

JW

CErle.1
Associate II

@LMore.5​ 

Have you found a solution?