
CHAPTER 3 CPU FUNCTIONS
User
’
s Manual U15862EJ3V0UD
131
3.4.7 Special registers
Special registers are registers that prevent invalid data from being written when an inadvertent program loop
occurs.
The V850ES/KF1, V850ES/KG1, and V850ES/KJ1 have the following three special registers.
Power save control register (PSC)
Processor clock control register (PCC)
Watchdog timer mode register (WDTM1)
Moreover, there is also a command register (PRCMD), which is a protection register for write operations to the
special registers that prevents the application system from unexpectedly stopping due to an inadvertent program loop.
Write access to the special registers is performed with a special sequence and illegal store operations are notified to
the system status register (SYS).
(1) Setting data to special registers
Setting data to a special registers is done in the following sequence.
<1>
<2>
<3>
Prepare the data to be set to the special register in a general-purpose register.
Write the data prepared in step <1> to the PRCMD register.
Write the setting data to the special register (using following instructions).
Store instruction (ST/SST instruction)
Bit manipulation instruction (SET1/CLR1/NOT1 instruction)
<4> to <8> Insert NOP instructions (5 instructions)
Note
.
[Description Example] When using PSC register (standby mode setting)
ST.B r11,PSMR[r0]
; PSMR register setting (IDLE, STOP mode setting)
<1> MOV 0x02,r10
<2> ST.B r10,PRCMD[r0]
<3> ST.B r10,PSC[r0]
Note
; PRCMD register write
; PSC register setting
<4> NOP
; Dummy instruction
<5> NOP
<6> NOP
Note
; Dummy instruction
; Dummy instruction
Note
<7> NOP
Note
; Dummy instruction
<8> NOP
(next instruction)
Note
; Dummy instruction
No special sequence is required to read special registers.
Note
When switching to the IDLE mode or the STOP mode (STP bit of PSC register = 1), 5 NOP instructions
must be inserted immediately after switching is performed.