User`s manual

RX62N Group, RX621 Group 4. Library Reference
4) R_CRC_Read
Synopsis
Read the CRC calculation result.
Prototype
bool R_CRC_Read(
uint8_t data1,
// Control
uint16_t * data2
// Data storage location
);
Description
Reads and stores the CRC calculation result.
[data1]
Control the behaviour of the CRC unit.
The default setting is shown in bold. Specify PDL_NO_DATA to use the default.
Result register clearing
PDL_CRC_CLEAR_RESULT or
PDL_CRC_RETAIN_RESULT
Clear or retain the value in the result register.
[data2]
The address of the location where the result shall be stored.
For the 8-bit polynomial, the results are stored in the lower-order byte.
Return value
True.
Category
CRC
Reference
R_CRC_Create, R_CRC_Write
Remarks
None.
Program example
/* RPDL definitions */
#include "r_pdl_crc.h"
/* RPDL device-specific definitions */
#include "r_pdl_definitions.h"
void func(void)
{
uint16_t CRCresult;
/* Read the CRC result and clear it */
R_CRC_Read(
PDL_CRC_RETAIN_RESULT,
&CRCresult
);
}
R20UT0084EE0112 Rev.1.12 Page 4-186
July. 16, 2014