![Sino Wealth SH79F3283 Скачать руководство пользователя страница 119](http://html1.mh-extra.com/html/sino-wealth/sh79f3283/sh79f3283_manual_1283063119.webp)
SH79F3283
119
8.12 CRC verification module
8.12.1 Feature
Generate CRC check code of the Flash Rom Code, verify the Flash Rom Code whether changed or not
CRC generator polynomial adopt the CRC-CCITT Standard: X
16
+X
12
+X
5
+1, high bit first
Two mode: High speed CRC mode and Normal CRC speed mode
To improve the system reliability, the SH79F3283 has one CRC verification module built-in, CRC check code can be used to
generate real-time code, using the generation polynomial: X
16
+X
12
+X
5
+1, which adopt the CRC-CCITT Standard. Users can
use this check code compared with the theory value, whether the changes in Flash content monitoring. The last two byte can
be stored in the ROM region of the CRC theoretical value (not involved in CRC check), or other location (such as class
EEPROM region, sequence number area user identification code area, etc.)
Set CRCADR[3:0] bits can select the CRC check size, set CRC_GO bit to 1 to enable CRC module. After CRC check is done,
CRC_GO will be cleared automatically by hardware, and set CRCIF to 1, if interrupt enable bit SCM_LPD_CRC and ECRC
are both set to 1, the CRC interrupt will generated in CPU, and the interrupt flag CRCIF will be cleared by software.
Normal CRC mode: the time of CPU operating is not influenced by the CRC check operating, but the time of CRC check is
long and uncontrollable.
High speed CRC mode: in order to improve the time of CRC check, there is a way which makes CPU into IDLE mode, the time
of CRC check will be reduced, and CRC interrupt can wake up IDLE mode.
Note: In Power-Down mode, and CRC is operating, this can make the CRC check code incorrectness. So please make sure
system not in the Power-Down mode before CRC is done.
8.12.2 Register
Table 8.44
CRC Control Register
FDH, Bank0
Bit7
Bit6
Bit5
Bit4
Bit3
Bit2
Bit1
Bit0
CRCCON
CRC_GO
CRCIF
-
-
CRCADR3 CRCADR2 CRCADR1 CRCADR0
R/W
R/W
-
-
R/W
R/W
R/W
R/W
Reset Value
(POR/WDT/LVR/PIN)
0
0
-
-
0
0
0
0
Bit Number
Bit Mnemonic
Description
7
CRC_GO
CRC GO_DONE Control bit
0: disable CRC module
1: enable CRC module, cleared when CRC check is done
6
CRCIF
CRC interrupt flag bit
0: CRC check is not done, clear by software
1: CRC check is done, set by hardware
3-0
CRCADR[3:0]
CRC Check address bits
0000: Check address is 0000 - 07FDH (2K - 2Byte)
0001: Check address is 0000 - 0FFDH (4K - 2Byte)
………….
1110: Check address is 0000 - 77FDH (30K - 2Byte)
1111: Check address is 0000 - 7FFDH (32K - 2Byte)