HARMcksL: ARM HAL toolbox (yet STM32 oriented) 1.6
SMFSW collection of HAL hacks for STM32
Loading...
Searching...
No Matches
CRC_stm32.h File Reference

Function dealing with STM32 CRC peripheral. More...

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

Typedefs

typedef enum eCRCFeedSize eCRCFeedSize
 

Enumerations

enum  eCRCFeedSize { CRC_Feed_BYTE = 1 , CRC_Feed_WORD = 2 , CRC_Feed_DWORD = 4 }
 CRC feed size. More...
 

Functions

FctERR crc_compute (uint32_t *const crc, const eCRCFeedSize feed_size, const uint32_t start_addr, const uint32_t size)
 CRC computation.
 
FctERR crc_check (const uint32_t crc_ref, const eCRCFeedSize feed_size, const uint32_t start_addr, const uint32_t size)
 CRC check.
 

Detailed Description

Function dealing with STM32 CRC peripheral.

Author
SMFSW

Typedef Documentation

◆ eCRCFeedSize

typedef enum eCRCFeedSize eCRCFeedSize

Enumeration Type Documentation

◆ eCRCFeedSize

CRC feed size.

Enumerator
CRC_Feed_BYTE 

CRC Feed is 8b size.

CRC_Feed_WORD 

CRC Feed is 16b size.

CRC_Feed_DWORD 

CRC Feed is 32b size.

Function Documentation

◆ crc_check()

FctERR crc_check ( const uint32_t crc_ref,
const eCRCFeedSize feed_size,
const uint32_t start_addr,
const uint32_t size )

CRC check.

Parameters
[in]crc_ref- CRC to check against
[in]feed_size- CRC peripheral feed size
[in]start_addr- Start address of block to compute CRC
[in]size- Size of block to compute CRC (in Bytes)
Return values
ERROR_OK- CRC consistent
ERROR_CRC- CRC inconsistent
ERROR_VALUE- feed_size is not a value of enum eCRCFeedSize
ERROR_COMMON- size is not int division with feed_size
Here is the call graph for this function:
Here is the caller graph for this function:

◆ crc_compute()

FctERR crc_compute ( uint32_t *const crc,
const eCRCFeedSize feed_size,
const uint32_t start_addr,
const uint32_t size )

CRC computation.

Parameters
[in,out]crc- Pointer to address to store CRC
[in]feed_size- CRC peripheral feed size
[in]start_addr- Start address of block to compute CRC
[in]size- Size of block to compute CRC (in Bytes)
Return values
ERROR_OK- CRC computed
ERROR_VALUE- feed_size is not a value of enum eCRCFeedSize
ERROR_COMMON- size is not int division with feed_size
Here is the caller graph for this function: