GPCRC_Init_TypeDef Struct ReferenceEMLIB > GPCRC

CRC initialization structure.

Definition at line 101 of file em_gpcrc.h .

#include < em_gpcrc.h >

Data Fields

bool autoInit
uint32_t crcPoly
bool enable
bool enableByteMode
uint32_t initValue
bool reverseBits
bool reverseByteOrder

Field Documentation

bool GPCRC_Init_TypeDef::autoInit

Enable automatic initialization by re-seeding the CRC result based on the init value after reading one of the CRC data registers.

Definition at line 153 of file em_gpcrc.h .

Referenced by GPCRC_Init() .

uint32_t GPCRC_Init_TypeDef::crcPoly

CRC polynomial value. GPCRC supports either a fixed 32-bit polynomial or a user configurable 16 bit polynomial. The fixed 32-bit polynomial is the one used in IEEE 802.3, which has the value 0x04C11DB7. To use the 32-bit fixed polynomial, just assign 0x04C11DB7 to the crcPoly field. To use a 16-bit polynomial, assign a value to crcPoly where the upper 16 bits are zero.

The polynomial should be written in normal bit order. For instance, to use the CRC-16 polynomial X^16 + X^15 + X^2 + 1, first convert it to hex representation and remove the highest order term of the polynomial. This would give us 0x8005 as the value to write into crcPoly.

Definition at line 116 of file em_gpcrc.h .

Referenced by GPCRC_Init() .

bool GPCRC_Init_TypeDef::enable

Enable/disable GPCRC when initialization is completed.

Definition at line 156 of file em_gpcrc.h .

Referenced by GPCRC_Init() .

bool GPCRC_Init_TypeDef::enableByteMode

Enable/disable byte mode. When byte mode is enabled, then all input is treated as single byte input even though the input is a 32-bit word or a 16-bit half word. Only the least significant byte of the data-word will be used for CRC calculation for all writes.

Definition at line 147 of file em_gpcrc.h .

Referenced by GPCRC_Init() .

uint32_t GPCRC_Init_TypeDef::initValue

CRC initialization value. This value is assigned to the GPCRC_INIT register. The initValue is loaded into the data register when calling the GPCRC_Start function or when one of the data registers are read while autoInit is enabled.

Definition at line 124 of file em_gpcrc.h .

Referenced by GPCRC_Init() .

bool GPCRC_Init_TypeDef::reverseBits

Reverse bits within each input byte. This setting enables or disables byte level bit reversal. When byte-level bit reversal is enabled, then each byte of input data will be reversed before entering CRC calculation.

Definition at line 139 of file em_gpcrc.h .

Referenced by GPCRC_Init() .

bool GPCRC_Init_TypeDef::reverseByteOrder

Reverse byte order. This has an effect when sending a 32-bit word or 16-bit half word input to the CRC calculation. When set to true, the input bytes are reversed before entering the CRC calculation. When set to false, the input bytes stay in the same order.

Definition at line 132 of file em_gpcrc.h .

Referenced by GPCRC_Init() .


The documentation for this struct was generated from the following file:
  • C:/repos/super_h1/platform/emlib/inc/ em_gpcrc.h