Renesas M16C/60 Series Hardware Manual page 215

Hide thumbs Also See for M16C/60 Series:
Table of Contents

Advertisement

Under development
This document is under development and its contents are subject to change.
M16C/6N5 Group
Setup procedure and CRC operation when generating CRC code "80C4
(a) CRC operation performed by the M16C
CRC code: Remainder of a division in which the value written to the CRCIN register with its bit positions reversed is
divided by the generator polynomial
Generator polynomial: X
(b) Setting procedure
(1) Reverse the bit positions of the value "80C4
"80
"
"01
16
(2) Write 0000
(initial value)
16
(3) Write 01
16
(4) Write 23
16
(c) Details of CRC operation
In the case of (3) above, the value written to the CRCIN register "01
become "10000000
CRCD register s initial value "0000
modulo-2 arithmetic.
1 0001 0000 0010 0001 1000 0000 0000 0000 0000 0000
Generator polynomial
The value "0001 0001 1000 1001
reversing its bit positions may be read from the CRCD register.
If operation (4) above is performed subsequently, the value written to the CRCIN register "23
positions reversed to become "11000100
16 digits and the remainder in (3) "1001 0001 1000 1000
which is divided by the generator polynomial using modulo-2 arithmetic.
The value "0000 1010 0100 0001
the CRCD register.
Figure 1.18.3 CRC Calculation
Rev.1.00
2003.05.30
page 201
16
12
5
+ X
+ X
+ 1 (1 0001 0000 0010 0001
" bytewise in a program.
16
", "C4
"
"23
"
16
16
16
b15
b15
b15
". The value "1000 0000 0000 0000 0000 0000
2
" are added, the result of which is divided by the generator polynomial using
16
1000 1000 0001 0000 1
1000 0001 0000 1000 0
1000 1000 0001 0000 1
CRC code
(1189
)" derived from the remainder "1001 0001 1000 1000
2
16
". The value "1100 0100 0000 0000 0000 0000
2
(0A41
)" derived from the remainder by reversing its bit positions may be read from
2
16
)
2
b0
CRCD register
b7
b0
CRCIN register
Two cycles later, the CRC code for "80
9188
, has its bit positions reversed to become
16
"1189
16
b0
CRCD register
1189
16
b7
b0
CRCIN register
Two cycles later, the CRC code for "80C4
8250
, has its bit positions reversed to become
16
"0A41
16
b0
0A41
CRCD register
16
(00000001
16
" derived from that by adding 16 digits and the
2
1000 1000
Data
1001 0001 1000 1000
" which is left in the CRCD register are added, the result of
2
CRC Calculation
"
16
16
" which is stored in the CRCD register.
" which is stored in the CRCD register.
)" has its bit positions reversed to
2
Modulo-2 operation is
operation that complies
with the law given below.
0 + 0 = 0
0 + 1 = 1
1 + 0 = 1
1 + 1 = 0
-1 = 1
(9188
)" by
2
16
(00100011
)" has its bit
16
2
" derived from that by adding
2
," i.e.,
," i.e.,
16

Advertisement

Table of Contents
loading

This manual is also suitable for:

M16c/6n5

Table of Contents