Rev. 1.10
134
November 04, 2019
Rev. 1.10
135
November 04, 2019
HT45F5Q-3
Battery Charger Flash MCU
HT45F5Q-3
Battery Charger Flash MCU
• CRCCR Register
Bit
7
6
5
4
3
2
1
0
Name
—
—
—
—
—
—
—
POLY
R/W
—
—
—
—
—
—
—
R/W
POR
—
—
—
—
—
—
—
0
Bit 7~1
Unimplemented, read as “0”
Bit 0
POLY
: 16-bit CRC generating polynomial selection
0: CRC-CCITT: X
16
+ X
12
+ X
5
+ 1
1: CRC-16: X
16
+ X
15
+ X
2
+ 1
• CRCIN Register
Bit
7
6
5
4
3
2
1
0
Name
D7
D6
D5
D4
D3
D2
D1
D0
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
POR
0
0
0
0
0
0
0
0
Bit 7~0
D7~D0
: CRC input data register
• CRCDL Register
Bit
7
6
5
4
3
2
1
0
Name
D7
D6
D5
D4
D3
D2
D1
D0
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
POR
0
0
0
0
0
0
0
0
Bit 7~0
D7~D0
: 16-bit CRC checksum low byte data register
• CRCDH Register
Bit
7
6
5
4
3
2
1
0
Name
D15
D14
D13
D12
D11
D10
D9
D8
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
POR
0
0
0
0
0
0
0
0
Bit 7~0
D15~D8
: 16-bit CRC checksum high byte data register
CRC Operation
The CRC generator provides the 16-bit CRC result calculation based on the CRC16 and CCITT CRC16
polynomials. In this CRC generator, there are only these two polynomials available for the numeric
values calculation. It cannot support the 16-bit CRC calculations based on any other polynomials.
The following two expressions can be used for the CRC generating polynomial which is determined
using the POLY bit in the CRC control register, CRCCR. The CRC calculation result is called as the
CRC checksum, CRCSUM, and stored in the CRC checksum register pair, CRCDH and CRCDL.
•
CRC-CCITT: X
16
+ X
12
+ X
5
+ 1.
•
CRC-16: X
16
+ X
15
+ X
2
+ 1.
CRC Computation
Each write operation to the CRCIN register creates a combination of the previous CRC value stored
in the CRCDH and CRCDL registers and the new data input. The CRC unit calculates the CRC data
register value is based on byte by byte. It will take one MCU instruction cycle to calculate the CRC
checksum.