Using Hardware CRC module on s32k144

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Using Hardware CRC module on s32k144

1,596 Views
aditya_barve
Contributor II

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

0 Kudos
1 Reply

1,495 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

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