CHAPTER 6 CLOCK GENERATION FUNCTION
User’s Manual U13850EJ4V0UM
173
6.6 Notes on Power Save Function
If the V850/SB1 or V850/SB2 is used under the following conditions, the address indicated by the program counter
(PC) differs from the address that actually reads an instruction after the power save mode has been released.
Of the instructions 4 to 16 bytes after the instruction that writes data to the PSC register, the CPU may ignore 4 or
8 bytes of the instruction and execute wrong instructions.
[Conditions]
(i) If the power save mode (IDLE or STOP mode) is set while an instruction is being executed on the external ROM
(ii) If the power save mode is released by an interrupt request
(iii) If the subsequent instruction is executed while an interrupt request is being held pending after the power save
mode has been released
Conditions in which an interrupt request is held pending:
•
If the NP flag of the PSW register is “1” (during NMI servicing/set by software)
•
If the ID flag of the PSW register is “1” (during interrupt request servicing/DI instruction/set by software)
•
If the power save mode is released by an interrupt request with a priority the same as or lower than the
interrupt request being serviced even though interrupts are enabled (EI status)
Therefore, use the V850/SB1 and V850/SB2 under the following conditions:
[Conditions]
(i) Do not use a power save mode (IDLE or STOP mode) while an instruction is being executed on the external
ROM
(ii) Take the following measures using software if a power save mode is used while an instruction is being executed
on the external ROM:
•
Insert six NOP instructions 4 bytes after the instruction that writes data to the PSC register.
•
Insert the br $+2 instruction to eliminate the difference in the address of the CPU after the NOP instructions.
[Example of prevention program]
ldsr
rx, 5
; Sets value of rX to PSW.
st.b
r0, PRCMD[r0]
; Writes data to PRCMD.
st.b
rD, PSC[r0]
; Sets PSC register.
ldsr
rY, 5
; Returns value of PSW.
nop
; Six NOP instructions or more
nop
nop
nop
nop
br $+2
; Eliminates difference of PC
Remark
It is assumed that the following values have already been set:
rD
: PSC set value,
rX
: Value written to PSW,
rY
: Value written back to PSW
Содержание MPD703030A
Страница 2: ...User s Manual U13850EJ4V0UM 2 MEMO ...
Страница 514: ...User s Manual U13850EJ4V0UM 514 MEMO ...