PER Firmware
Loading...
Searching...
No Matches
crc_priv.h File Reference

STM32G4 CRC register-level implementation interface. More...

#include "stm32g474xx.h"
Include dependency graph for crc_priv.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void CRC_PRIV_enableClock (void)
 Enable the CRC peripheral clock on AHB1.
 
void CRC_PRIV_setConfig (void)
 Configure the polynomial, size, and initial value for CRC-32/MPEG-2.
 
void CRC_PRIV_reset (void)
 Reset the CRC unit, reloading the initial value into the data register.
 
void CRC_PRIV_feedWord (uint32_t word)
 Feed one 32-bit word into the CRC data register.
 
uint32_t CRC_PRIV_readResult (void)
 Read the accumulated CRC result from the data register.
 

Variables

static constexpr uint32_t CRC_PRIV_POLY_CRC32 = 0x04C11DB7
 CRC-32/MPEG-2 polynomial.
 
static constexpr uint32_t CRC_PRIV_INIT_VALUE = 0xFFFFFFFF
 Initial CRC value loaded into the data register on reset.
 

Detailed Description

STM32G4 CRC register-level implementation interface.

Author
Hannah Song (song8.nosp@m.92@p.nosp@m.urdue.nosp@m..edu)

Function Documentation

◆ CRC_PRIV_enableClock()

void CRC_PRIV_enableClock ( void )

Enable the CRC peripheral clock on AHB1.

Here is the caller graph for this function:

◆ CRC_PRIV_feedWord()

void CRC_PRIV_feedWord ( uint32_t word)

Feed one 32-bit word into the CRC data register.

Here is the caller graph for this function:

◆ CRC_PRIV_readResult()

uint32_t CRC_PRIV_readResult ( void )

Read the accumulated CRC result from the data register.

Here is the caller graph for this function:

◆ CRC_PRIV_reset()

void CRC_PRIV_reset ( void )

Reset the CRC unit, reloading the initial value into the data register.

Here is the caller graph for this function:

◆ CRC_PRIV_setConfig()

void CRC_PRIV_setConfig ( void )

Configure the polynomial, size, and initial value for CRC-32/MPEG-2.

Here is the caller graph for this function:

Variable Documentation

◆ CRC_PRIV_INIT_VALUE

uint32_t CRC_PRIV_INIT_VALUE = 0xFFFFFFFF
staticconstexpr

Initial CRC value loaded into the data register on reset.

◆ CRC_PRIV_POLY_CRC32

uint32_t CRC_PRIV_POLY_CRC32 = 0x04C11DB7
staticconstexpr

CRC-32/MPEG-2 polynomial.