Functions | |
void | CRCConfigSet (uint32_t ui32Base, uint32_t ui32CRCConfig) |
void | CRCSeedSet (uint32_t ui32Base, uint32_t ui32Seed) |
void | CRCDataWrite (uint32_t ui32Base, uint32_t ui32Data) |
uint32_t | CRCResultRead (uint32_t ui32Base, bool bPPResult) |
uint32_t | CRCDataProcess (uint32_t ui32Base, uint32_t *pui32DataIn, uint32_t ui32DataLength, bool bPPResult) |
void CRCConfigSet | ( | uint32_t | ui32Base, |
uint32_t | ui32CRCConfig | ||
) |
Set the configuration of CRC functionality with the EC module.
ui32Base | is the base address of the EC module. |
ui32CRCConfig | is the configuration of the CRC engine. |
This function configures the operation of the CRC engine within the EC module. The configuration is specified with the ui32CRCConfig argument. It is the logical OR of any of the following options:
CRC Initialization Value
Input Data Size
Post Process Reverse/Inverse
Input Bit Reverse
Endian Control
Operation Type
References ASSERT, CCM_O_CRCCTRL, CRC_CFG_ENDIAN_SBHW, CRC_CFG_ENDIAN_SHW, CRC_CFG_IBR, CRC_CFG_INIT_0, CRC_CFG_INIT_1, CRC_CFG_INIT_SEED, CRC_CFG_OBR, CRC_CFG_RESINV, CRC_CFG_SIZE_32BIT, CRC_CFG_SIZE_8BIT, CRC_CFG_TYPE_P1021, CRC_CFG_TYPE_P1EDC6F41, CRC_CFG_TYPE_P4C11DB7, CRC_CFG_TYPE_P8005, CRC_CFG_TYPE_TCPCHKSUM, and HWREG.
void CRCSeedSet | ( | uint32_t | ui32Base, |
uint32_t | ui32Seed | ||
) |
Write the seed value for CRC operations in the EC module.
ui32Base | is the base address of the EC module. |
ui32Seed | is the seed value. |
This function writes the seed value for use with CRC operations in the EC module. This value is the start value for CRC operations. If this value is not written, then the residual seed from the previous operation is used as the starting value.
References ASSERT, CCM_O_CRCSEED, and HWREG.
void CRCDataWrite | ( | uint32_t | ui32Base, |
uint32_t | ui32Data | ||
) |
Write data into the EC module for CRC operations.
ui32Base | is the base address of the EC module. |
ui32Data | is the data to be written. |
This function writes either 8 or 32 bits of data into the EC module for CRC operations. The distinction between 8 and 32 bits of data is made when the CRC_CFG_SIZE_8BIT or CRC_CFG_SIZE_32BIT flag is set using the CRCConfigSet() function.
When writing 8 bits of data, ensure the data is in the least significant byte position. The remaining bytes should be written with zero. For example, when writing 0xAB, ui32Data should be 0x000000AB.
References ASSERT, CCM_O_CRCDIN, and HWREG.
uint32_t CRCResultRead | ( | uint32_t | ui32Base, |
bool | bPPResult | ||
) |
Reads the result of a CRC operation in the EC module.
ui32Base | is the base address of the EC module. |
bPPResult | is true to read the post-processed result, or false to read the unmodified result. |
This function reads either the unmodified CRC result or the post processed CRC result from the EC module. The post-processing options are selectable through CRC_CFG_RESINV and CRC_CFG_OBR parameters in the CRCConfigSet() function.
References ASSERT, CCM_O_CRCRSLTPP, CCM_O_CRCSEED, and HWREG.
Referenced by CRCDataProcess().
uint32_t CRCDataProcess | ( | uint32_t | ui32Base, |
uint32_t * | pui32DataIn, | ||
uint32_t | ui32DataLength, | ||
bool | bPPResult | ||
) |
Process data to generate a CRC with the EC module.
ui32Base | is the base address of the EC module. |
pui32DataIn | is a pointer to an array of data that is processed. |
ui32DataLength | is the number of data items that are processed to produce the CRC. |
bPPResult | is true to read the post-processed result, or false to read the unmodified result. |
This function processes an array of data to produce a CRC result.
The data in the array pointed to be pui32DataIn is either an array of bytes or an array or words depending on the selection of the input data size options CRC_CFG_SIZE_8BIT and CRC_CFG_SIZE_32BIT.
This function returns either the unmodified CRC result or the post- processed CRC result from the EC module. The post-processing options are selectable through CRC_CFG_RESINV and CRC_CFG_OBR parameters.
References ASSERT, CCM_CRCCTRL_SIZE, CCM_O_CRCCTRL, CCM_O_CRCDIN, CRCResultRead(), and HWREG.