
R01UH0336EJ0102 Rev.1.02
Page 255 of 1538
Jul 17, 2014
V850E2/PG4-L
Section 6 Memory Modules
6.7.2
Setting the FLMDCNT Register
The FLMDCNT register is protected against writing. Specifically, writing is only
effective when performed in the following sequence.
STEP1
Write the fixed value (A5
H
) to the protection register (FLMDPCMD).
STEP2
Write the new setting to the corresponding register (FLMDCNT).
STEP3
Write the inverse of the new setting to the corresponding register (FLMDCNT).
STEP4
Write the new setting to the corresponding register (FLMDCNT).
STEP5
Confirm that the setting has been written to the protected register by checking
that the FLMDPS.FLMDPRERR bit is 0.
Writing to an FLMD pin setting register (for details, refer to Table 6-9, List of
FLMD Pin Setting Registers) between steps 1 and 4 of the sequence specified
above leads to failure in writing to the protected register (, which is indicated
with the FLMDPS.FLMDPRERR set to 1).
In such a case, the sequence has to be restarted from step 1.
Access to registers other than FLMD pin setting registers can proceed during
the sequence without preventing its completion.
The protection function operates as follows when the sequence is suspended.
• Suspension of the sequence due to the arrival of an interrupt
If an interrupt request is accepted while the above specified sequence for
writing is in progress and the interrupt service routine does not access any
of the FLMD pin setting registers (for details, refer to Table 6-9, List of FLMD
Pin Setting Registers), the sequence is not obstructed. Writing to the
protected register can proceed successfully on return from the interrupt
service routine.
• Suspension of the sequence due to halting of the emulator
If the emulator is halted because it reached a break point, for example, while
the above specified sequence for writing is in progress, the sequence of
writing to the register is fully suspended until the emulator returns from the
halted state to normal operation.
In other words, even access to an FLMD pin setting register (for details,
refer to Table 6-9, List of FLMD Pin Setting Registers) while the emulator is
halted does not obstruct the sequence of writing. Furthermore, access to an
FLMD pin setting register does not lead to setting of the
FLMDPS.FLMDPRERR bit.