
R01UH0336EJ0102 Rev.1.02
Page 274 of 1538
Jul 17, 2014
V850E2/PG4-L
Section 7 Clock Generation
(3)
Enabling CLMAn (Writing to the CLMAnCTL0 Register)
The control register (CLMAnCTL0) is the write-protection register and is used
to enable CLMAn.
Note
Once CLMAn is enabled, it cannot be disabled by software; it can only be
disabled by a reset.
(a)
Initial Value of the CLMAnCTL0 Register
The initial value of the CLMAnCTL0 register is 00
H
. Using software to set the
CLMAnCLME bit to 1 initiates CLMAn operation.
(b)
Procedure for Writing to Enable CLMAn
Execute instructions in the sequence below to set the CLMAnCTL0 register to
01
H
.
1. Write A5
H
to the CLMAnPCMD register.
2. The following sequence is required for writing to the CLMAnCTL0 register.
– Write 01
H
to enable CLMAn.
– Write the inverse of that value, i.e. FE
H
.
– Write the intended value (01
H
) again.
3. Read the CLMAnCTL0 register.
If the value of the register is 01
H
, CLMAn is enabled.
If this was not the value, check the settings in the CLMAnCTL0 register
and in the write operation status register (CLMAnPS).
– If the value in the CLMAnPS register is 01
H
, the instruction sequence
was not executed correctly. Restart the sequence for enabling CLMAn
from step 1.
– If the value in the CLMAnPS register is 00
H
, write 00
H
to the
CLMAnPCMD register and only then re-execute the sequence from step
1.