English
Language : 

M32C8A Datasheet, PDF (291/372 Pages) Renesas Technology Corp – RENESAS MCU M16C FAMILY / M32C/80 Series
M32C/8A Group
20. CRC Calculation
20. CRC Calculation
The CRC (Cyclic Redundancy Check) calculation detects an error in data blocks. A generator polynomial of CRC -
CCITT (X16 + X12 + X5 + 1) generates CRC code.
The CRC code is a 16-bit code generated for a given length of the data block in bytes. The CRC code is stored in the
CRCD register every time one-byte data is transferred to the CRCIN register after a default value is written to the
CRCD register. CRC code generation for one-byte data is completed in two bus clock cycles.
Figure 20.1 shows a block diagram of the CRC circuit. Figure 20.2 shows CRC-associated registers. Figure 20.3
shows an example of the CRC calculation.
High-order bits of data bus
Low-order bits of data bus
8 low-order bits
CRCD register
8 high-order bits
CRC code generation circuit
X16 + X12 + X5 + 1
CRCIN register
Figure 20.1 CRC Calculation Block Diagram
CRC Data Register
b15
b8 b7
b0
Symbol
CRCD
Address
037Dh - 037Ch
Function
After default value is written to the CRCD register, the CRC code
can be read from the CRCD register by writing data to the CRCIN
register. Bit position of the default value is inverted. The inverted
value is read as the CRC code.
CRC Input Register
b7
b0
Symbol
CRCIN
Adddress
037Eh
Function
Data input.
Inverse bit position of data
Figure 20.2 CRCD Register, CRCIN Register
Rev.1.00 Jul 15, 2007 Page 274 of 352
REJ09B0385-0100
After Reset
Undefined
Setting Range
RW
0000h to FFFFh
RW
After Reset
Undefined
Setting Range
RW
00h to FFh
RW