I want to test the CRC module on the tm4c1294 board, so I took the function of the CRC module in crc32 example and combined it with my code, but the result of the CRC is wrong and I don't know why the value of the CRC for 1 is different from 0x2ff0435c
I used a Seed value 0xffffffff and CRC_CFG_TYPE_P4C11DB7
uint32_t inData[]={1};
CRC_LevX.data= inData;
CRC_LevX.datalength= sizeof(inData)/4;
SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ | SYSCTL_OSC_MAIN | SYSCTL_USE_PLL | SYSCTL_CFG_VCO_480), 120000000);
// The hardware is available, enable it.
SysCtlPeripheralEnable(SYSCTL_PERIPH_CCM0);
// Reset the peripheral to ensure we are starting from a known condition.
SysCtlPeripheralReset(SYSCTL_PERIPH_CCM0);
// Reset the peripheral to ensure we are starting from a known condition.
SysCtlPeripheralReset(SYSCTL_PERIPH_CCM0);
CRCConfigSet(CCM0_BASE, (CRC_CFG_INIT_SEED | CRC_CFG_TYPE_P4C11DB7 |
CRC_CFG_SIZE_32BIT));
CRCSeedSet(CCM0_BASE, 0xffffffff);
CRC_Result= CRCDataProcess(CCM0_BASE, CRC_LevX.data,
CRC_LevX.datalength, false);