Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Cyclic Redundancy Check Calculation Unit (CRCCU)

Driver for the Cyclic Redundancy Check Calculation Unit.

It provides access to the main features of the CRCCU controller.

Modules

 

Functions

void crccu_configure_descriptor (Crccu *p_crccu, uint32_t ul_crc_dscr_addr)
 Configure CRCCU descriptor. More...
 
void crccu_configure_mode (Crccu *p_crccu, uint32_t ul_mode)
 Configure the CRCCU mode. More...
 
void crccu_disable_dma (Crccu *p_crccu)
 Disable CRCCU. More...
 
void crccu_disable_dma_interrupt (Crccu *p_crccu)
 Disable CRCCU DMA transfer interrupt. More...
 
void crccu_disable_error_interrupt (Crccu *p_crccu)
 Disable cyclic redundancy check error interrupt. More...
 
void crccu_enable_dma (Crccu *p_crccu)
 Start CRCCU. More...
 
void crccu_enable_dma_interrupt (Crccu *p_crccu)
 Enable CRCCU DMA transfer interrupt. More...
 
void crccu_enable_error_interrupt (Crccu *p_crccu)
 Enable cyclic redundancy check error interrupt. More...
 
uint32_t crccu_get_dma_interrupt_mask (Crccu *p_crccu)
 Get DMA interrupt mask. More...
 
uint32_t crccu_get_dma_interrupt_status (Crccu *p_crccu)
 Check if DMA buffer transfer has been terminated. More...
 
uint32_t crccu_get_dma_status (Crccu *p_crccu)
 Check if DMA channel is enabled. More...
 
uint32_t crccu_get_error_interrupt_mask (Crccu *p_crccu)
 Get check CRC error interrupt mask. More...
 
uint32_t crccu_get_error_interrupt_status (Crccu *p_crccu)
 Check if there is a CRC error. More...
 
uint32_t crccu_read_crc_value (Crccu *p_crccu)
 Read cyclic redundancy check value. More...
 
void crccu_reset (Crccu *p_crccu)
 Reset CRCCU. More...
 

void crccu_configure_descriptor ( Crccu *  p_crccu,
uint32_t  ul_crc_dscr_addr 
)

Configure CRCCU descriptor.

Parameters
p_crccuPointer to a CRCCU instance.
ul_crc_dscr_addrCRCCU descriptor address.

Referenced by compute_crc(), crc32_calculate(), and generate_crc().

void crccu_configure_mode ( Crccu *  p_crccu,
uint32_t  ul_mode 
)

Configure the CRCCU mode.

Parameters
p_crccuPointer to a CRCCU instance.
ul_modeCRC work mode.

Referenced by compute_crc(), crc32_calculate(), and generate_crc().

void crccu_disable_dma ( Crccu *  p_crccu)

Disable CRCCU.

Parameters
p_crccuPointer to a CRCCU instance.
void crccu_disable_dma_interrupt ( Crccu *  p_crccu)

Disable CRCCU DMA transfer interrupt.

Parameters
p_crccuPointer to a CRCCU instance.
void crccu_disable_error_interrupt ( Crccu *  p_crccu)

Disable cyclic redundancy check error interrupt.

Parameters
p_crccuPointer to a CRCCU instance.
void crccu_enable_dma ( Crccu *  p_crccu)

Start CRCCU.

Note
To start the CRCCU, the user needs to set the CRC enable bit (ENABLE) in the CRCCU Mode Register (CRCCU_MR), and then configure it and finally set the DMA enable bit (DMAEN) in the CRCCU DMA Enable Register (CRCCU_DMA_EN).
The crccu_configure_descriptor() and crccu_configure_mode ()functions must be executed before calling this function.
Parameters
p_crccuPointer to a CRCCU instance.

Referenced by compute_crc(), crc32_calculate(), and generate_crc().

void crccu_enable_dma_interrupt ( Crccu *  p_crccu)

Enable CRCCU DMA transfer interrupt.

Parameters
p_crccuPointer to a CRCCU instance.
void crccu_enable_error_interrupt ( Crccu *  p_crccu)

Enable cyclic redundancy check error interrupt.

Parameters
p_crccuPointer to a CRCCU instance.
uint32_t crccu_get_dma_interrupt_mask ( Crccu *  p_crccu)

Get DMA interrupt mask.

Parameters
p_crccuPointer to a CRCCU instance.
Returns
DMA interrupt mask.
uint32_t crccu_get_dma_interrupt_status ( Crccu *  p_crccu)

Check if DMA buffer transfer has been terminated.

Parameters
p_crccuPointer to a CRCCU instance.
Returns
DMA interrupt status.
uint32_t crccu_get_dma_status ( Crccu *  p_crccu)

Check if DMA channel is enabled.

Parameters
p_crccuPointer to a CRCCU instance.
Returns
CRCCU DMA status.

Referenced by compute_crc(), crc32_calculate(), and generate_crc().

uint32_t crccu_get_error_interrupt_mask ( Crccu *  p_crccu)

Get check CRC error interrupt mask.

Parameters
p_crccuPointer to a CRCCU instance.
Returns
Error interrupt mask.
uint32_t crccu_get_error_interrupt_status ( Crccu *  p_crccu)

Check if there is a CRC error.

Parameters
p_crccuPointer to a CRCCU instance.
Returns
Error interrupt status.
uint32_t crccu_read_crc_value ( Crccu *  p_crccu)

Read cyclic redundancy check value.

Parameters
p_crccuPointer to a CRCCU instance.
Returns
CRC value.

Referenced by compute_crc(), generate_crc(), integrity_check(), and program_memory().

void crccu_reset ( Crccu *  p_crccu)

Reset CRCCU.

Referenced by compute_crc(), generate_crc(), integrity_check(), and program_memory().