Author Topic: CRC5 for use in Start-of-Frame (SOF) token packets  (Read 9653 times)

herbertp

  • Member
  • ***
  • Posts: 1
CRC5 for use in Start-of-Frame (SOF) token packets
« 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

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: CRC5 for use in Start-of-Frame (SOF) token packets
« Reply #1 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.