CHAPTER 24 SAFETY FUNCTIONS
Page 779 of 920
<Operation flow>
Figure 24 - 3 Flowchart of Flash Memory CRC Operation Function (High-speed CRC)
Caution 1. The CRC operation is executed only on the code flash.
Caution 2. Store the expected CRC operation value in the area below the operation range in the code flash.
Caution 3. The CRC operation is enabled by executing the HALT instruction in the RAM area.
Be sure to execute the HALT instruction in RAM area.
The expected CRC operation value can be calculated by using the integrated development environment CS+
development environment. Refer to the CS+ integrated development environment user’s manual for details.
Start
; Store the expected CRC operation result
; value in the lowest 4 bytes.
; CRC operation range setting
Set FEA5 to FEA0 bits
PGCRCL = 0000H
All xxMKx = 1
Copied to RAM to HALT instruction
and RET instruction,
initialize 10 bytes
CRC0EN = 1
CALL instruction
; Copy the HALT and RET instructions to be
; executed on the RAM to the RAM.
; Initialize the 10 bytes after the RET
; instruction.
; Masks all interrupt
; Enables CRC operation
; Initialize the CRC operation result register
; Call the address of the HALT instruction
; copied to the RAM.
Execute the HALT instruction
CRC operation complete
Execute the RET instruction
Yes
No
; CRC operation starts by HALT instruction
; execution
; When the CRC operation is complete, the HALT
; mode is released and control is returned from RAM
; Prohibits CRC operation
; Read CRC operation result
; Compare the value with the stored expected
; value.
Correctly complete
Abnormal complete
CRC0EN = 0
Read the value of PGCRCL
Compare the value with
the expected CRC value
Match
Not match
Содержание RL78/G1H
Страница 941: ...R01UH0575EJ0120 RL78 G1H...