![]() |
S32 SDK
|
The S32 SDK provides both HAL and Peripheral Drivers for the Cyclic Redundancy Check (CRC) module of S32K devices.
The cyclic redundancy check (CRC) module generates 16/32-bit CRC code for error detection.
The CRC module provides a programmable polynomial, seed, and other parameters required to implement a 16-bit or 32-bit CRC standard.
The 16/32-bit code is calculated for 32 bits of data at a time.
To initialize the CRC module, call CRC_DRV_Init() function and pass the user configuration data structure to it.
This is example code to configure the CRC driver:
Function CRC_DRV_Configure() shall be used to write user configuration to CRC hardware module before starting operation by calling CRC_DRV_WriteData(). Finally, using CRC_DRV_GetCrcResult() function to get the result of CRC calculation.
This is example code to Configure and get CRC block:
Modules | |
CRC Driver | |
Cyclic Redundancy Check Peripheral Driver. | |
CRC HAL | |
Cyclic Redundancy Check Hardware Abstraction Layer. | |