Hi,
I am trying to verify that I can pre-determine a crc value and that it matches what the crc module generates on the TMS570. Eventually I will be using the crc module in auto mode across all of flash, but as a first step I wanted to see if I could run it in full mode and generate a crc value for one 64 bit chunk of data, and make sure it matches what I calculate. However, the two values do not match. Can someone take a look at my crc set up for full mode and let me know what I may be doing incorrectly? Is my approach valid?
When I calculate the value (using pycrc) I get 0x46A5A9388A5BEFFE. The value I get from the crc module is
0x46C80A306F49FA85. My input data is 123456789
Thanks
uint32 channel = 1; uint64 crcModuleValue = 0; crcConfig_t crcConfig; crcModConfig_t crcData; uint64 data = 123456789; crcData.mode = CRC_FULL_CPU; //< Mode of operation crcData.crc_channel = channel; //< CRC channel-0,1 crcData.src_data_pat = &data; //< Pattern data crcData.data_length = sizeof(data); crcConfig.crc_channel = channel; //< CRC channel-0,1 crcConfig.mode = CRC_FULL_CPU; //< Mode of operation crcConfig.pcount = 1; //< Pattern count crcConfig.scount = 1; //< Sector count crcConfig.wdg_preload = 0; //< Watchdog period crcConfig.block_preload = 0; crcInit(); crcSetConfig(crcREG, &crcConfig); crcSignGen(crcREG, &crcData); crcModuleValue = crcGetPSASig(crcREG, channel);