Part Number: TMS320F28P550SJ
Hi everyone
I am currently trying to replace an older implementation of crc-computation for Modbus. On the new F28P55x we now want to utilize the capabilities of the VCU2 module. The crc algorithm I want to achive is this one:
| Algorithm | Check | Poly | Init | RefIn | RefOut | XorOut | |
|
CRC-16/MODBUS
MODBUS
|
0x4B37 | 0x8005 | 0xFFFF | true | true | 0x0000 |
However, my current implementation does not give me the expected results. This is what i have:
My Frame-struct has the data-fields defined as:
unsigned char data[254];
--------------------------------------------------------------------------------------------------------
This would be an example input:
https://crccalc.com/?crc=006605778899aaa2&method=CRC-16&datatype=hex&outtype=hex
In my data memory i have it as words (16bit values), {0x0000, 0x0066, 0x0005, 0x0077, 0x0088, 0x0099, 0x00AA, 0x00A2}. I would expect the result to be 0xC5B6.
I assume I need to performe some trickery with the input befor I can run it through the VCU2 but I cant' figure out what. Could somebody provide an example?