You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Comments in the protocol implementation suggest that a standard CRC16 calculation is being used with the polynomial 0x3D65 (typically used in CRC-16-DNP):
which is a different result than what the referenced online calculator generates when using the the same polynomial and initial value:
It probably doesn't make sense to change the algorithm at this point, but if it really is different, it should be documented so that driver implementers know that they have to reproduce this specific algorithm rather than using an existing CRC library.
It would also be handy to have a few test cases to make it easier to confirm correct implementation.
The text was updated successfully, but these errors were encountered:
Existing CRC libraries should be capable of handling this fine. You need to untick the input and result reflection options in the CRC detailed parameters section and there is no final Xor'ing, so set that to 0x0 or leave blank. Doing so will yield 0x9A3A as the result.
Comments in the protocol implementation suggest that a standard CRC16 calculation is being used with the polynomial
0x3D65
(typically used in CRC-16-DNP):https://github.com/madcowswe/ODrive/blob/4e039e160416f52195e2199cec62a92fa2f103b6/Firmware/fibre/python/fibre/protocol.py#L64-L66
However, running the commented code produces
0x9a3a
:which is a different result than what the referenced online calculator generates when using the the same polynomial and initial value:
It probably doesn't make sense to change the algorithm at this point, but if it really is different, it should be documented so that driver implementers know that they have to reproduce this specific algorithm rather than using an existing CRC library.
It would also be handy to have a few test cases to make it easier to confirm correct implementation.
The text was updated successfully, but these errors were encountered: