Hello,
I am trying to use the CRC module on s32k144.
Using the below instructions to calculate a 32bit CRC, however when trying to access the CRC CTRL register a vector catch is encountered and the controller is reset.
Is there any condition that is to be taken care of before using the CRC module ?
Following snippet was written
CRC->CTRL |= (1 << CRC_CTRL_WAS_SHIFT);
/*Set data value to be interpreted as SeedValue*/
CRC->DATAu.DATA = SeedValue_u32;
/*Clear setting seed*/
CRC->CTRL &= (~(CRC_CTRL_WAS_MASK));
Thank you,
Aditya
Hi Aditya,
have you enabled clocks to CRC module?
PCC->PCCn[PCC_CRC_INDEX] |= PCC_PCCn_CGC_MASK; /* enable CRC clock */
You can find SW examples for CRC in this application note:
https://www.nxp.com/docs/en/application-note/AN5413.pdf
https://www.nxp.com/webapp/Download?colCode=AN5413SW&location=null
Regards,
Lukas