RL78/F13, F14 CHAPTER 27 SAFETY FUNCTIONS
R01UH0368EJ0210 Rev.2.10 1585
Dec 10, 2015
<Operation flow>
Figure 27-3. Flowchart of Flash Memory CRC Operation Function (High-speed CRC)
Cautions 1. The CRC operation is executed only on the code flash.
2. Store the expected CRC operation value in the area below the operation range in the code flash.
3. Boot swapping is not performed while the CRC operation is being executed.
4. 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 value can be calculated by using tools such as the CubeSuite
+
development environment (see the
CubeSuite
+
user’s manual for details).
Start
; Store the expected CRC operation result
; value in the lowest 4 bytes.
; CRC operation range setting
; 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.
; 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.
HALT mode
Correctly complete
Abnormal complete
Set FEA5 to FEA0 bits
PGCRCL = 0000H
CRC0EN = 0
Read the value of PGCRCL.
Execute the RET instruction.
All xxMKx = 1
Copied to RAM to HALT instruction
and RET instruction,
initialize 10 bytes
CRC0EN = 1
Match
Not match
CALL instruction
Execute the HALT instruction.