English
Language : 

M16C30P_07 Datasheet, PDF (196/317 Pages) Renesas Technology Corp – 16-BIT SINGLE-CHIP MICROCOMPUTER M16C FAMILY / M16C/30 SERIES
M16C/30P Group
17. CRC Calculation
17. CRC Calculation
The Cyclic Redundancy Check (CRC) operation detects an error in data blocks. The microcomputer uses a generator
polynomial of CRC_CCITT (X16 + X12 + X5 + 1) to generate CRC code.
The CRC code consists of 16 bits which are generated for each data block in given length, separated in 8 bit units.
After the initial value is set in the CRCD register, the CRC code is set in that register each time one byte of data is
written to the CRCIN register. CRC code generation for one-byte data is finished in two cycles.
Figure 17.1 shows the CRC Circuit Block Diagram. Figure 17.2 shows the CRC-related registers.
Figure 17.3 shows the calculation example using the CRC operation.
Data bus high-order
Data bus low-order
Eight low-order bits
CRCD register
Eight high-order bits
CRC code generating circuit
X16 + X12 + X5 + 1
CRCIN register
Figure 17.1 CRC Circuit Block Diagram
CRC Data Register
(b15)
(b8)
b7
b0 b7
b0
Symbol
Address
After Reset
CRCD
03BDh to 03BCh
Indeterminate
Function
Setting Range RW
When data is w ritten to the CRCIN register after setting the initial value 0000h to FFFFh
in the CRCD register, the CRC code can be read out f rom the CRCD
RW
register.
CRC Input Register
b7
b0
Data input
Symbol
CRCIN
Function
Figure 17.2 CRCD and CRCIN Registers
Address
03BEh
After Reset
Indeterminate
Setting Range RW
00h to FFh
RW
Rev.1.22 Mar 29, 2007 Page 180 of 291
REJ09B0179-0122