This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/MSP430FR5969: Looking for clarification and explanation on CRC Module

Part Number:

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?

  • Hello Dorman,

    Have you seen the CRC Code Example found within MSP430Ware? This should help you with your questions about how to use the CRC Module. The example can be found via the TI Resource Explorer in CCS or at dev.ti.com . Navigate to TI Resource Explorer -> Software -> MSP430Ware -> Devices -> MSP430FR5xx_6xx -> MSP430FR5969 -> Peripheral Examples -> Register Level -> msp430fr59xx_crc.c

    The polygon used is described in section 15.1 of the User Guide. Also, you would only send out the result register after all of your data has passed through. As shown in Figure 15-2, what is initially written into the result register (CRCINIRES) is looped back into the algorithm as the seed when you first start the algorithm. Subsequent results are looped back as well. Section 15.3.1 of the user guide explains how the reverse bit registers work as well.

**Attention** This is a public forum