User`s manual
RX62N Group, RX621 Group 4. Library Reference
4.2.21. CRC calculator
1) R_CRC_Create
Synopsis
Configure the CRC calculator.
Prototype
bool R_CRC_Create(
uint8_t data
// Configuration
);
Description
Enable the CRC and set the operating conditions.
[data]
Calculation options. To set multiple options at the same time, use "|" to separate each value.
•
Polynomial selection
PDL_CRC_POLY_CRC_8 or
PDL_CRC_POLY_CRC_16 or
PDL_CRC_POLY_CRC_CCITT
X
8
+ X
2
+ X + 1
X
16
+ X
15
+ X
2
+ 1
X
16
+ X
12
+ X
5
+ 1
•
Bit order
PDL_CRC_LSB_FIRST or
PDL_CRC_MSB_FIRST
Select LSB or MSB-first operation.
Return value
True if all parameters are valid and exclusive; otherwise false.
Category
CRC
References
None.
Remarks
•
None.
Program example
/* RPDL definitions */
#include "r_pdl_crc.h"
/* RPDL device-specific definitions */
#include "r_pdl_definitions.h"
void func(void)
{
/* Set up the CRC in 8-bit mode with LSB first */
R_CRC_Create(
PDL_CRC_POLY_CRC_8 | PDL_CRC_LSB_FIRST
);
}
R20UT0084EE0112 Rev.1.12 Page 4-183
July. 16, 2014