PORTS Forum

Ports and Interfaces => USB => Topic started by: herbertp on June 03, 2015, 05:47:23 pm

Title: CRC5 for use in Start-of-Frame (SOF) token packets
Post by: herbertp on June 03, 2015, 05:47:23 pm

In the CRC5 function found in usb_crc.c, that is available on this website, which CRC5 does it generate.

http://en.wikipedia.org/wiki/Polynomial_representations_of_cyclic_redundancy_checks

I was stepping through the code on a debugger when I noticed that the poly5 variable didn't match CRC5-USB.
It looked like it was CRC5-EPC instead.

Please help
Title: Re: CRC5 for use in Start-of-Frame (SOF) token packets
Post by: Jan Axelson on June 03, 2015, 09:06:34 pm
The source that file references:

http://www.usb.org/developers/whitepapers/crcdes.pdf

refers to x5 + x2 + x0, which would be CRC5-USB.

Also see 8.3.5 in the USB 2.0 spec.