RZT Flexible Software Package Documentation
Release v2.2.0
|
|
Functions | |
fsp_err_t | R_CRC_Open (crc_ctrl_t *const p_ctrl, crc_cfg_t const *const p_cfg) |
fsp_err_t | R_CRC_Close (crc_ctrl_t *const p_ctrl) |
fsp_err_t | R_CRC_Calculate (crc_ctrl_t *const p_ctrl, crc_input_t *const p_crc_input, uint32_t *calculatedValue) |
fsp_err_t | R_CRC_CalculatedValueGet (crc_ctrl_t *const p_ctrl, uint32_t *calculatedValue) |
fsp_err_t | R_CRC_SnoopEnable (crc_ctrl_t *const p_ctrl, uint32_t crc_seed) |
fsp_err_t | R_CRC_SnoopDisable (crc_ctrl_t *const p_ctrl) |
Driver for the CRC peripheral on RZ microprocessor. This module implements the CRC Interface.
The CRC module provides a API to calculate 8, 16 and 32-bit CRC values on a block of data in memory using industry-standard polynomials.
Configuration | Options | Default | Description |
---|---|---|---|
Parameter Checking |
| Default (BSP) | If selected code for parameter checking is included in the build. |
Configuration | Options | Default | Description |
---|---|---|---|
Name | Name must be a valid C symbol | g_crc0 | Module name. |
Channel | Value must be 0 or 1 | 0 | Select the CRC channel. |
CRC Polynomial |
| CRC-32C | Select the CRC polynomial. |
Bit Order |
| MSB | Select the CRC bit order. |
There is no clock configuration for the CRC module.
This module does not use I/O pins.
When using CRC32 polynomial functions the CRC module produces the same results as popular online CRC32 calculators, but it is important to remember a few important points.
This is a basic example of minimal use of the CRC module in an application.
Data Structures | |
struct | crc_instance_ctrl_t |
struct crc_instance_ctrl_t |
Driver instance control structure.
fsp_err_t R_CRC_Open | ( | crc_ctrl_t *const | p_ctrl, |
crc_cfg_t const *const | p_cfg | ||
) |
Open the CRC driver module.
Implements crc_api_t::open
Open the CRC driver module and initialize the driver control block according to the passed-in configuration structure.
FSP_SUCCESS | Configuration was successful. |
FSP_ERR_ASSERTION | p_ctrl or p_cfg is NULL. |
FSP_ERR_ALREADY_OPEN | Module already open. |
FSP_ERR_IP_CHANNEL_NOT_PRESENT | The requested channel does not exist on this MCU. |
fsp_err_t R_CRC_Close | ( | crc_ctrl_t *const | p_ctrl | ) |
Close the CRC module driver.
Implements crc_api_t::close
FSP_SUCCESS | Configuration was successful. |
FSP_ERR_ASSERTION | p_ctrl is NULL. |
FSP_ERR_NOT_OPEN | The driver is not opened. |
fsp_err_t R_CRC_Calculate | ( | crc_ctrl_t *const | p_ctrl, |
crc_input_t *const | p_crc_input, | ||
uint32_t * | calculatedValue | ||
) |
Perform a CRC calculation on a block of 8-bit/32-bit (for 32-bit polynomial) data.
Implements crc_api_t::calculate
This function performs a CRC calculation on an array of 8-bit/32-bit (for 32-bit polynomial) values and returns an 8-bit/32-bit (for 32-bit polynomial) calculated value
FSP_SUCCESS | Calculation successful. |
FSP_ERR_ASSERTION | Either p_ctrl, p_crc_input, inputBuffer, or calculatedValue is NULL. |
FSP_ERR_INVALID_ARGUMENT | length value is NULL. |
FSP_ERR_NOT_OPEN | The driver is not opened. |
fsp_err_t R_CRC_CalculatedValueGet | ( | crc_ctrl_t *const | p_ctrl, |
uint32_t * | calculatedValue | ||
) |
Return the current calculated value.
Implements crc_api_t::crcResultGet
CRC calculation operates on a running value. This function returns the current calculated value.
FSP_SUCCESS | Return of calculated value successful. |
FSP_ERR_ASSERTION | Either p_ctrl or calculatedValue is NULL. |
FSP_ERR_NOT_OPEN | The driver is not opened. |
fsp_err_t R_CRC_SnoopEnable | ( | crc_ctrl_t *const | p_ctrl, |
uint32_t | crc_seed | ||
) |
crc_api_t::snoopEnable is not supported on the CRC.
FSP_ERR_UNSUPPORTED | Function not supported in this implementation. |
fsp_err_t R_CRC_SnoopDisable | ( | crc_ctrl_t *const | p_ctrl | ) |
crc_api_t::snoopDisable is not supported on the CRC.
FSP_ERR_UNSUPPORTED | Function not supported in this implementation. |