Which chips automatically do CRC on UDP?

I looked into the datasheets of all the chips (6100,5100s,5300…) The only one that seems to refer to any kind of CRC is the 5300. Is the 5300 the only one doing the CRC in UDP mode?

CRC of what and at which protocol level? What is the real problem or question?

UDP dataframe packet. According to the protocol it is optional for IPv4. So wiznet might or might not implement any CRC at any level for UDP packet at any level.

The datasheet for all the components make zero reference to a CRC to any level except for the 5300. However the 6100 has IPv6 in which CRC should be mandatory. So, for that reason I think that the other components might do a CRC even in UDP IPv4. But I don’t know.

I’m not sure which additional information might be required for the question. I’m not an expert in network, I just want a minimum rejection of corrupt data (I don’t care about missing packet or out of order.) But a corrupt packet is problematic.

If the answer is “do your own CRC”. Well I know I can implement my own CRC and all. But my question still stand: do any CRC is performed at any level for a UDP data transfer. It makes a big difference for adding a data corruption detection for near zero probably fail. I’m using the rp2040, I wan’t to avoid overloading the cpu or the communication channel by a corruption filter.

The communication is direct (Ethernet cable directly into computer). I’m using an ethernet communication instead of USB. To goal is have wired but isolated communication that is universal. Even though USB is “universal” it is bound through various driver limitations on OS and software. Android is not very great on that level. Ethernet bypass those limitations.

And just in case that my communication might pass as snarky or whatever, it is far from my intention. I just want to pass all the information that I could to get an answer on that topic because like I said : “I am not an expert in network”. So I’m in need of someone who might know :frowning:

If there’s still some missing informations, it’s probably because of my lack in expertise.

Regarding W5300 from datasheet it is not clear what CRC has to do with and what is the origination of the CRC (network or CRC is being calculated on the received data) because datasheet says to discard the CRC and it may be for some other diagnostic purposes. In addition, CRC is 4 bytes instead of required 2 bytes.
I have seen statements that IPv4 calculation algorithm has some caveats, therefore we must have confirmation from the WIZnet developers if it was really employed (properly). You can, of course, take packet sent by the chip and calculate CRC yourself to see if it is correct (and not just a -0 as a placeholder), but again it is not a guarantee. If RFC says the CRC is optional then unfortunately… the most secure and reliable way to implement your own CRC.

I got an answer from wiznet. The w6100 and w5100s do the CRC automatically in IPv4. I don’t know about the others.

The chip does the discarding automatically without the cpu involved. You won’t be able to read the CRC ( not sure why you would want to) or the corrupt dataframe (which I don’t care). On the PC side, some allows to read the CRC and other stuff, but being on the lower layer network,those are not always accessible, which is kind of the whole point of lower layers (cpu offloading).

So in sum, it’s been confirmed that w6100 and w5100s does CRC on IP.

1 Like

UDP datagrams contains a checksum. CRC is not used in UDP. Ethernet frames contain a CRC.

When transmitting UDP, both W5100S and W6100 also calculate and transmit checksum.
However, the user cannot check whether the checksum of the received UDP Datagram is correct or incorrect.

Only, the data in the Socket Buffer is saved from a valid Ethernet Frame.