r5f21368sdfp Renesas Electronics Corporation., r5f21368sdfp Datasheet - Page 694

no-image

r5f21368sdfp

Manufacturer Part Number
r5f21368sdfp
Description
Renesas Mcu R8c Family / R8c/3xt-a Series
Manufacturer
Renesas Electronics Corporation.
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
r5f21368sdfp#V0
Manufacturer:
Renesas Electronics America
Quantity:
10 000
Under development
R8C/36T-A Group
R01UH0240EJ0001 Rev.0.01
Apr 28, 2011
27.3
27.4
27.5
The CRC calculator generates 16-bit CRC code for an arbitrary length of a data block in 8-bit units. The generator
polynomial of CRC-CCITT (X
code.
After setting the initial value in the CRCD register, the CRC code is stored in the CRCD register every time 1 byte
of data is written to the CRCIN register. CRC code generation for 1-byte of data is completed in two CPU clock
cycles.
The CRC calculator has a CRC snoop function which monitors reads from and writes to a certain SFR address and
performs CRC calculation automatically on the data read from and written to the SFR address. Because the CRC
snoop recognizes writes to and reads from a certain SFR address as a trigger to perform CRC calculation, there is
no need to write data to the CRCIN register. All SFR addresses from 00080h to 002FFh and 06800h to 06FFFh are
subject to the CRC snoop.
To use this function, set a target SFR address in the CRCSAR register. Set the CRCSW bit in the CRCMR register
to 1 to enable snooping on writes to the target. Similarly, set the CRCSR bit in the CRCMR register to 1 to enable
snooping on reads from the target.
When the CRCSW bit is set to 1, if data is written to a target SFR address, the CRC calculator stores the data in the
CRCIN register and performs CRC calculation.
Similarly, when the CRCSR bit is set to 1, and data is written to a target SFR address, the CRC calculator stores the
data in the CRCIN register and performs CRC calculation.
The CRC calculation is performed 1 byte at a time. When the target SFR address is accessed in words (16 bits), the
CRC code is generated on the lower byte (1 byte) of data at the SFR address set in the CRCSAR register.
The following shows examples of CRC calculation to generate the CRC code for 80C4h.
• When CRC-CCITT is used with LSB first
(1) Reverse the bit order of 80C4h by a program.
(2) Set the CRCMR register to 00h.
(3) Set the CRCD register to the initial value 0000h.
(4) Set the CRCD register to 01h, a bit-order-reversed value of 80h.
(5) Set the CRCIN register to 23h, a bit-order-reversed value of C4h.
• When CRC-16 is used with MSB first
(1) Set the CRCMR register to 03h.
(2) Set the CRCD register to the initial value 0000h.
(3) Set the CRCIN register to 80h.
(4) Set the CRCIN register to C4h.
80h → 01h, C4h → 23h
1189h, which is a bit-order-reversed value of the CRC code 9188h for 80h, is stored in the CRCD register.
0A41h, which is a bit-order-reversed value of the CRC code 8250h for 80C4h, is stored in the CRCD register.
The CRC code 8303h for 80h is stored in the CRCD register.
The CRC code 0292h for 80C4h is stored in the CRCD register.
Operation
CRC Snoop
Usage Method
Preliminary document
Specifications in this document are tentative and subject to change.
16
+ X
12
+ X
5
+ 1) or CRC-16 (X
16
+ X
15
+ X
2
+ 1) is used to generate the CRC
27. CRC Calculator Function
Page 663 of 725

Related parts for r5f21368sdfp