CHAPTER 16 ROM CORRECTION FUNCTION
492
User’s Manual U15109EJ3V0UD
Figure 16-2. ROM Correction Operation and Program Flow
START(reset vector)
Correction address?
CORENn = 1?
CORRQn = 0?
Yes
No
Data for ROM correction setting is loaded
from an external memory into the internal
RAM to initialize ROM correction function.
If there is a correction code, it is loaded in
the internal RAM.
Microcontroller initialization
Clears CORRQn flag.
JMP channel n correct code address
Executes internal ROM
program
Executes correction program code
Jumps to internal ROM
Yes
No
Yes
No
CORRQn flag set
JMP r0
The address of the internal RAM that
stores the correction code of channel n
should be preset before the instruction
that makes the program jump to this
address is stored in the internal ROM.
: Executed by a program stored in the internal ROM
: Executed by a program stored in the internal RAM
: Executed by the ROM correction function
Caution
Check the ROM correction generation from a vector table with a high interrupt level when
executing ROM correction during a vector interrupt routine. If an interrupt conflicts with ROM
correction, processing is branched to an interrupt vector, where, if ROM correction is being re-
executed, CORRQn is set (1) again and multiple CORRQn flags are set (1). The channel for
which ROM correction is to be executed is determined by the interrupt level.
Remark
n = 0 to 3