TM STM32Fxxx HAL Libraries  v1.0.0
Libraries for STM32Fxxx (F0, F4 and F7 series) devices based on HAL drivers from ST from Tilen Majerle

Library Functions. More...

Functions

void TM_CRC_Init (void)
 Initializes and enables CRC peripheral. More...
 
void TM_CRC_DeInit (void)
 De initializes and disable CRC peripheral. More...
 
uint32_t TM_CRC_Calculate8 (uint8_t *arr, uint32_t count, uint8_t reset)
 Calculates 32-bit CRC value from 8-bit input array. More...
 
uint32_t TM_CRC_Calculate16 (uint16_t *arr, uint32_t count, uint8_t reset)
 Calculates 32-bit CRC value from 16-bit input array. More...
 
uint32_t TM_CRC_Calculate32 (uint32_t *arr, uint32_t count, uint8_t reset)
 Calculates 32-bit CRC value from 32-bit input array. More...
 

Detailed Description

Library Functions.

Function Documentation

uint32_t TM_CRC_Calculate16 ( uint16_t *  arr,
uint32_t  count,
uint8_t  reset 
)

Calculates 32-bit CRC value from 16-bit input array.

Parameters
*arrPointer to 16-bit data array for CRC calculation
countNumber of elements in array for calculation
resetReset CRC peripheral to 0 state before starting new calculations
  • 0: CRC unit will not be reset before new calculations will happen and will use previous data to continue
  • > 0: CRC unit is set to 0 before first calculation
Return values
32-bitCRC calculated number
uint32_t TM_CRC_Calculate32 ( uint32_t *  arr,
uint32_t  count,
uint8_t  reset 
)

Calculates 32-bit CRC value from 32-bit input array.

Parameters
*arrPointer to 32-bit data array for CRC calculation
countNumber of elements in array for calculation
resetReset CRC peripheral to 0 state before starting new calculations
  • 0: CRC unit will not be reset before new calculations will happen and will use previous data to continue
  • > 0: CRC unit is set to 0 before first calculation
Return values
32-bitCRC calculated number
uint32_t TM_CRC_Calculate8 ( uint8_t *  arr,
uint32_t  count,
uint8_t  reset 
)

Calculates 32-bit CRC value from 8-bit input array.

Parameters
*arrPointer to 8-bit data array for CRC calculation
countNumber of elements in array for calculation
resetReset CRC peripheral to 0 state before starting new calculations
  • 0: CRC unit will not be reset before new calculations will happen and will use previous data to continue
  • > 0: CRC unit is set to 0 before first calculation
Return values
32-bitCRC calculated number
void TM_CRC_DeInit ( void  )

De initializes and disable CRC peripheral.

Parameters
None
Return values
None
void TM_CRC_Init ( void  )

Initializes and enables CRC peripheral.

Parameters
None
Return values
None