lpcware

Problem with CRC engine in LPC11U67 Controller

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 18, 2016 by lpcware
Content originally posted in LPCWare by vdlsaranya on Thu Mar 10 21:19:15 MST 2016
Hi everyone,

                 we are using LPC11u67 microcontroller. we want to calculate CRC of a data packet. But the CRC given by the controller doesn't matches with the already calculated CRC for that packet.

Before using CRC engine, steps we had done are

1. Enabling the clock to it 28 bit of SYSAHBCLKCTRL register
2. Selection of CRC mode by placing 0x00 in CRC mode register. (CRC-CCITT polynomial, no bit order reversal no 1's complement)
3. Setting the seed value as 0xFFFF in CRC seed register

And loaded the packet to write register and checking the sum.

when we gave single byte, the following are the results we have obtained

(Byte value)               (Actual CRC)                             (CRC from controller)
0x00                          0x0000                                       0x84c0
0x01                          0x1021                                       0xF274

we have tried all the combinations by changing the mode and seed values, but any one of combination is not giving exact CRC for all the data we are giving to it.

Please Share if anything can be done to get it working properly.

Below is attachment regarding the code for CRC verification.

Thanks & Regards,
Saranya VDL.

Outcomes