R01UH0822EJ0100 Rev.1.00
Page 803 of 1041
Jul 31, 2019
RX13T Group
25. CRC Calculator (CRC)
25.3
Operation
The CRC calculator generates CRC codes for use in LSB first or MSB first transfer.
The following shows examples of generating the CRC code for input data (F0h) using the 16-bit CRC generating
polynomial (X
16
+ X
12
+ X
5
+ 1). In these examples, the value of the CRC data output register (CRCDOR) is cleared
before CRC calculation.
When an 8-bit CRC (with the polynomial X
8
+ X
2
+ X + 1) is in use, the valid bits of the CRC code are obtained in the
lower-order byte of the CRCDOR register.
Figure 25.2
LSB First Data Transmission
Figure 25.3
MSB First Data Transmission
CRCDOR
CRCCR
Clear CRCDOR
1
7
0
0
0
0
0
0
7
0
15
0
1
1
0
0
0
0
0
0
0
0
CRCDIR
CRC code generation
1
1
1
1
0
0
0
0
CRC code
Output
Data
7
7
7
F
F
F
0
8
0
0
1
1
1
1
0
1
1
1
1
0
0
0
1
1
1
1
1
1
1
1
0
0
0
0
2. Write F0h to the CRC data input register (CRCDIR)
3. Read the calculation result in the CRC data output register (CRCDOR)
CRC code = F78Fh
4. 8-bit serial transmission (LSB first)
1. Write 83h to the CRC control register (CRCCR)
0
0
0
0
0
0
0
0
CRCDOR
15
0
1
1
1
1
0
1
1
1
1
0
0
0
1
1
1
1
7
8
7
8
7
0
CRCDOR
CRCCR
Clear CRCDOR
1
7
0
0
0
0
1
0
7
0
15
0
1
1
0
0
0
0
0
0
0
0
CRCDIR
CRC code generation
1
1
1
1
0
0
0
0
CRC code
Output
Data
7
7
0
F
F
1
F
E
0
0
1
1
1
1
0
0
0
0
1
1
1
0
1
1
1
1
0
0
0
1
1
1
1
1
2. Write F0h to the CRC data input register (CRCDIR)
3. Read the calculation result in the CRC data output register (CRCDOR)
CRC code = EF1Fh
4. 8-bit serial transmission (MSB first)
1. Write 87h to the CRC control register (CRCCR)
0
0
0
0
0
0
0
0
CRCDOR
15
0
1
1
1
0
1
1
1
1
0
0
0
1
1
1
1
1
7
8
7
8
7
0