I captured the usb packets on a usb1.1 mouse using a generic 24mhz logic analyzer.
as per the usb docs.. a CRC5 is calculated for the token by taking into account the address(7bits) and endpoint(4bits) fields.
since both the addr and endp are zero for this transaction, the 11 bits are - 00000000000 so the crc calculated by the crc5 polynomial( 100101) should give zero, but i'm not able to understand that the crc field is 0x2.
fields are-- addr - 11; endp - 0;
so, from the datasheet(pg 173), the final 11 bit field is - 11010000000 . when crc5 is calculated on this field.. it gives 4 which matches correctly with the crc field. I used the long division method to calculate the crc.
am i miscalculating the crc for the first token?