Tool/software: Code Composer Studio
Hi,
I am having a few questions related to CRC module of MSP430FR5969. As a reference, I am taking the sample code named "crc_ex1_buildSignature" mentioned in the code examples under Driver Library Sample Codes. Please correct me if I say anything wrong. I haven't had much experience with CRC before. However I am familiar with the module 2 technique.
Based on the TI's Guide on CRC, I conclude that CRC16 Module on MSP430FR5969 makes the use of Bitwise Method for CRC calculation. There seem to be 4 registers involved in the CRC module: CRCDI, CRCDIRB, CRCINIRES and CRCRESR. I am attaching a
Book1.xlsx
which has the values that the sample code writes/changes in the registers after execution of instruction. Based upon the observations, that can be seen in the file/ or CRC registers in CCS debug, I'm having a few questions:
1) I understand the CRCINIRES must be given an initial value to make the CRC module get to work. However, is this value, the generator polynomial G(x)? The UserGuide says G(x) is generated with the help of CRC-CCITT poly equation? Does it make the use of 0xBEEF(seed) at some point?
2) If CRCDIRB registers denotes the reverse byte, why it doesn't have the reverse of CRCDI content, at any point, like CRCRESR has of CRCINIRES's values?
3) Since CRC appends bits at the end, how does my data, after appending CRC, does not exceed 16 bits?
4) What is the final data that I should send to receiver? Should I send all the contents of CRCINIRES, to the receiver, once I get 0x7ADB (or) just the final 16 bit value i.e. 0x5119?
5) Finally, how is receiver going to extract the data and check if data was lost? I am unable to understand that what all does the receiver need from me?