Other Parts Discussed in Thread: MSP430FR5739
Tool/software: Code Composer Studio
Hello everybody!
I am working on an MSP430FR2422 design, and I am trying to write the little routine that verifies the TLV structure. The datasheet says use CRC-16-CCITT, and there is some sample code for a different CPU using the built-in CRC module. There are also a specification of how to apply the CRC-16-CCITT for this case on the internets somewhere.
None of this works.
On an odd chance I tried all permutations of the following: (1) initializing CRC accumulator with 0 or 0xFFFF, (2) loading data direct or bit-reversed, (2) swapping LS and MS bytes or not swapping, or loading data byte-wise, (3) checksumming the block up to 0x1AEF vs 0x1AFF. I also tried (4) checksumming the block starting at 0x1AF2, (5) calculating the old-style checksum (16-bit-wise sum of all words of the structure), and (6) XOR of all words of the structure (yes, this is 50 variations total, and no, it didn't take more than two hours -- I'm quick.)
None of that worked either.
Help, please?
-victor