NEC V850ES/KE1+ User Manual page 66

32-bit single-chip microcontrollers
Table of Contents

Advertisement

[Description Example] When using PSC register (standby mode setting)
ST.B r11, PSMR[r0]
<1> MOV 0x02, r10
<2> ST.B r10, PRCMD[r0] ; PRCMD register write
<3> ST.B r10, PSC[r0]
Note
<4> NOP
Note
<5> NOP
Note
<6> NOP
Note
<7> NOP
Note
<8> NOP
(next instruction)
No special sequence is required to read special registers.
Note When switching to the IDLE mode or the STOP mode (PSC.STP bit = 1), 5 NOP instructions must be
inserted immediately after switching is performed.
Cautions 1. Interrupts are not acknowledged for the store instruction for the PRCMD register. This is
because continuous execution of store instructions by the program in steps <2> and <3>
above is assumed. If another instruction is placed between step <2> and <3>, the above
sequence may not be realized when an interrupt is acknowledged for that instruction,
which may cause malfunction.
2. The data written to the PRCMD register is dummy data, but use the same register as the
general-purpose register used for setting data to the special register (step <3>) when
writing to the PRCMD register (step <2>). The same applies to when using a general-
purpose register for addressing.
(2) Command register (PRCMD)
The PRCMD register is an 8-bit register used to prevent data from being written to registers that may have a
large influence on the system, possibly causing the application system to unexpectedly stop, when an
inadvertent program loop occurs. Only the first write operation to the special register following the execution of
a previously executed write operation to the PRCMD register, is valid.
As a result, register values can be overwritten only using a preset sequence, preventing invalid write
operations.
This register can only be written in 8-bit units (if it is read, an undefined value is returned).
After reset: Undefined
PRCMD
REG7
66
CHAPTER 3 CPU FUNCTIONS
; PSMR register setting (IDLE, STOP mode setting)
; PSC register setting
; Dummy instruction
; Dummy instruction
; Dummy instruction
; Dummy instruction
; Dummy instruction
W
Address: FFFFF1FCH
7
6
5
REG6
REG5
REG4
User's Manual U16896EJ2V0UD
4
3
2
REG3
REG2
REG1
1
0
REG0

Advertisement

Table of Contents
loading

This manual is also suitable for:

?pd70f3302?pd703302?pd70f3302y?pd703302y

Table of Contents