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.

RM57L843: CRC pattern length

Part Number: RM57L843

Tool/software:

Hi,

I am trying to use CRC on RM57. The structure passed to crcSignGen has "src_data_pat" whhich is a pointer to a buffer with 64 bit data buffer and another field  is "data_length" which is number of 64 bit sized words in src_data_pat. However, if say I only have 5 bytes of data, what shoukd each of these values be?

Also, I tried the following code with a 64 bit data and I am getting wrong CRC value. Could you any tell me if I am missing something? I have configured this in FULL_CPU mode and using CRC1 and channel 0.

crcModConfig_t param;
uint64_t data = 0x4142434445464748;

void main()

{

    crcInit();

    crcChannelReset(crcREG1, 0);
    param.crc_channel = 0;
    param.mode = CRC_FULL_CPU;
    param.data_length = 1;
    param.src_data_pat = &data;
    crcSignGen(crcREG1, &param);
    sig = crcGetSectorSig(crcREG1, 0);

}

The value I am getting is 0xB19C8742DDF0EBAA whereas the correct value is 0x38178634E55140F2.

Thanks,

Ravi