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.

TM4C1290NCPDT: CRC16 CCITT in the driverlib.

Part Number: TM4C1290NCPDT

Hi, 

I have to implement a crc16-ccitt as explained  in http://srecord.sourceforge.net/crc16-ccitt.html#results 

This says for the textstring "1234546789", I should get "0xEC55", which also is the expected value of my specification. 

Although the code in the webpage works, I think it would be nice to make use of the CRC in the driverlib. 

My Code here is 

    uint32_t uRes=0;
    char zTest []="123456789";
    MAP_CRCConfigSet(CCM0_BASE,
                     CRC_CFG_INIT_SEED |
                     CRC_CFG_TYPE_P1021 | 
                     CRC_CFG_SIZE_8BIT);   
    CRCSeedSet(CCM0_BASE,0xFFFF);
    uRes = CRCDataProcess(CCM0_BASE, zTest, 9,false );

As an result I get 0x29B1, which is said to be an "bad crc calculation" in the link, it says "Among the problems with the “Bad_CRC” implementation is that it does not augment a zero-length message with 16 zero bits, as is required (either implicitly or explicitly) when calculating the standard CRC.  Thus, it reports a CRC of 0xFFFF — not 0x1D0F — for a zero-length message"

Any Ideas how to adapt to get the desired results are welcome. 

Regards

Micky