English
Language : 

M16C65 Datasheet, PDF (726/829 Pages) Renesas Technology Corp – RENESAS MCU M16C FAMILY / M16C/60
Under development
M16C/65 Group
Preliminary Specification
This is a preliminary specification and is subject to change.
29. CRC Calculator
29.3 Operations
29.3.1 Basic Operation
The CRC (Cyclic Redundancy Check) calculation detects an error in data blocks. The MCU uses two
generator polynomials of CRC-CCITT (X16 + X12 + X5 + 1) and CRC-16 (X16 + X15 + X2 + 1) to
generate CRC.
The CRC is 16-bit code generated for a given length of a data block in 8 bits unit. After setting the
default value in the CRCD register, the CRC is stored in the CRCD register every time one-byte of data
is written to the CRCIN register. CRC generation for one-byte data is completed in two CPU clock
cycles.
29.3.2 CRC Snoop
CRC snoop monitors reads from and writes to a certain SFR address and performs CRC calculation on
the data read from and written to the aforementioned SFR address automatically. Because CRC snoop
recognizes writes to and reads from a certain SFR address as a trigger to perform CRC calculation
automatically, there is no need to write data to the CRCIN register. All SFR addresses from 0020h to
03FFh are subject to the CRC snoop. The CRC snoop is useful to monitor writes to the UART TX
buffer, and reads from the UART RX buffer.
To use this function, write a target SFR address to bits CRCSAR9 to CRCSAR0 in the CRCSAR
register. Then, set the CRCSW bit in the CRCSAR register to 1 to enable snooping on writes to the
target or the CRCSR bit in the CRCSAR register to 1 to enable snooping on reads from the target.
When setting the CRCSW bit to 1, and writing data to a target SFR address by CPU or DMA, CRC
calculator stores the data into the CRCIN register and performs CRC calculation. Similarly, when
setting the CRCSR bit to 1, and reading data in a target SFR address by CPU or DMA, CRC calculator
stores the data into the CRCIN register and performs CRC calculation.
The CRC calculation is performed on one-byte at a time. When the target SFR address is accessed in
word (16 bits), CRC is generated on the lower byte (one byte) of data.
REJ09B0484-0030 Rev.0.30 Sep 09, 2008
Page 691 of 791