MTB CAT1 Peripheral driver library
cy_stc_dma_crc_config_t Struct Reference

Description

This structure holds the initialization values for the CRC feature, only for CPUSS_ver2.

Data Fields

bool dataReverse
 Specifies the bit order in which a data byte is processed (reversal is performed after XORing): 'false': Most significant bit (bit 1) first. More...
 
uint32_t dataXor
 Specifies a byte mask with which each data byte is XORed. More...
 
bool reminderReverse
 Specifies whether the remainder is bit reversed (reversal is performed after XORing). More...
 
uint32_t reminderXor
 Specifies a mask with which the remainder is XORed. More...
 
uint32_t polynomial
 CRC polynomial. More...
 
uint32_t lfsrInitVal
 The initial value of the Linear Feedback Shift Register.
 

Field Documentation

◆ dataReverse

bool cy_stc_dma_crc_config_t::dataReverse

Specifies the bit order in which a data byte is processed (reversal is performed after XORing): 'false': Most significant bit (bit 1) first.

'true': Least significant bit (bit 0) first.

◆ dataXor

uint32_t cy_stc_dma_crc_config_t::dataXor

Specifies a byte mask with which each data byte is XORed.

The XOR is performed before data reversal.

◆ reminderReverse

bool cy_stc_dma_crc_config_t::reminderReverse

Specifies whether the remainder is bit reversed (reversal is performed after XORing).

Note: this parameter doesn't affect the CRC value stored into the dstAddress. The reversed value remains in the CRC_REM_RESULT register.

◆ reminderXor

uint32_t cy_stc_dma_crc_config_t::reminderXor

Specifies a mask with which the remainder is XORed.

The XOR is performed before remainder reversal. Note: this parameter doesn't affect the CRC value stored into the dstAddress. The XORed value remains in the CRC_REM_RESULT register.

◆ polynomial

uint32_t cy_stc_dma_crc_config_t::polynomial

CRC polynomial.

The polynomial is represented WITHOUT the high order bit (this bit is always assumed '1'). The polynomial should be aligned/shifted such that the more significant bits (bit 31 and down) contain the polynomial and the less significant bits (bit 0 and up) contain padding '0's. Some frequently used polynomials:

  • CRC32: POLYNOMIAL is 0x04c11db7 (x^32 + x^26 + x^23 + x^22 + x^16 + x^12 + x^11 + x^10 + x^8 + x^7 + x^5 + x^4 + x^2 + x + 1).
  • CRC16: POLYNOMIAL is 0x80050000 (x^16 + x^15 + x^2 + 1, shifted by 16 bit positions).
  • CRC16 CCITT: POLYNOMIAL is 0x10210000 (x^16 + x^12 + x^5 + 1, shifted by 16 bit positions).