HAL CRC Types

Enumerations

group CRC_Exported_Types_Group1

Enums

enum hal_crc_t

CRC Instance Definition

Values:

enumerator HAL_CRC

CRC instance

enum hal_crc_state_t

CRC Global State Definition

Values:

enumerator HAL_CRC_STATE_RESET

CRC is de-initialized

enumerator HAL_CRC_STATE_IDLE

CRC initialized and configured

enumerator HAL_CRC_STATE_ACTIVE

CRC calculation ongoing

enum hal_crc_polynomial_size_t

CRC Polynomial Size Definition

Values:

enumerator HAL_CRC_POLY_SIZE_32B

32-bit polynomial size Use a 32-bit generating polynomial size

enumerator HAL_CRC_POLY_SIZE_16B

0x00000008 16-bit polynomial size Use a 16-bit generating polynomial size

enumerator HAL_CRC_POLY_SIZE_8B

0x00000010 8-bit polynomial size Use an 8-bit generating polynomial size

enumerator HAL_CRC_POLY_SIZE_7B

7-bit polynomial size Use a 7-bit generating polynomial size

enum hal_crc_input_data_reverse_mode_t

CRC Input Data Reversibility Mode Definition

Values:

enumerator HAL_CRC_INDATA_REVERSE_NONE

Input Data bit order not affected No input data reversibility

enumerator HAL_CRC_INDATA_REVERSE_BYTE

0x00000020 Input Data bit reversal done by byte Byte-wise input data reverse mode

enumerator HAL_CRC_INDATA_REVERSE_HALFWORD

0x00000040 Input Data bit reversal done by half-word Halfword-wise input data reverse mode

enumerator HAL_CRC_INDATA_REVERSE_WORD

Input Data bit reversal done by word Word-wise input data reverse mode

enumerator HAL_CRC_INDATA_REVERSE_HALFWORD_BYWORD

Input Data halfword reversal done by word Input Data halfword reversal done by word

enumerator HAL_CRC_INDATA_REVERSE_BYTE_BYWORD

Input Data byte reversal done by word Input Data byte reversal done by word

enum hal_crc_output_data_reverse_mode_t

CRC Output Data Reversibility Mode Definition

Values:

enumerator HAL_CRC_OUTDATA_REVERSE_NONE

Output Data bit order not affected No output data reversibility

enumerator HAL_CRC_OUTDATA_REVERSE_BIT

0x00000080 Output Data bit reversal done by bit Byte-wise output data reverse mode

enumerator HAL_CRC_OUTDATA_REVERSE_HALFWORD_BYWORD

Output Data halfword reversal done by word Output Data halfword reversal done by word

enumerator HAL_CRC_OUTDATA_REVERSE_BYTE_BYWORD

Output Data byte reversal done by word Output Data byte reversal done by word

Handle Structure

group CRC_Exported_Types_Group2

Typedefs

typedef struct hal_crc_handle_s hal_crc_handle_t

CRC Handle type Definition

struct hal_crc_handle_s
#include <stm32c5xx_hal_crc.h>

CRC Handle Structure Definition

Public Members

hal_crc_t instance

CRC peripheral instance corresponding to the CRC peripheral registers base address

volatile hal_crc_state_t global_state

CRC state

const void * p_user_data

User Data Pointer

Configuration Structure

group CRC_Exported_Types_Group3
struct hal_crc_config_t
#include <stm32c5xx_hal_crc.h>

CRC Global Configuration Definition

Public Members

uint32_t polynomial_coefficient

Set CRC generating polynomial as a 7, 8, 16, or 32-bit long value for a polynomial degree respectively equal to 7, 8, 16 or 32 This field is written in normal representation e.g., for a polynomial of degree 7, X^7 + X^6 + X^5 + X^2 + 1 is written 0x65

hal_crc_polynomial_size_t polynomial_size

This parameter is a value of hal_crc_polynomial_size_t and indicates polynomial size. Value can be either one of:

uint32_t crc_init_value

Initial value to start CRC computation

hal_crc_input_data_reverse_mode_t input_data_reverse_mode

This parameter is a value of hal_crc_input_data_reverse_mode_t and specifies input data reversibility mode. Can be either one of the following values

hal_crc_output_data_reverse_mode_t output_data_reverse_mode

This parameter is a value of hal_crc_output_data_reverse_mode_t and specifies output data reversibility mode. Can be either