CHAPTER 6 STBC
Preliminary User’s Manual A14874EJ3V0UM
138
Use the procedure shown below to set data in the PSC register.
<1> Write the data that is to be set in the PSC register to an arbitrary general-purpose register (see
3.2.1
Program
registers
).
<2> Use the store instruction (ST or SST instruction) to write the contents of the general-purpose register, which
had been prepared in step <1>, to the command register (PRCMD).
<3> Use the following instructions to write the contents of the general-purpose register, which had been prepared
in step <1>, to the PSC register (Do this immediately after writing the contents of the general-purpose
register in the PRCMD register).
•
Store instruction (ST or SST instruction)
•
Bit manipulation instruction (SET1, CLR1, or NOT1 instruction)
<4> If the NU85E switches to software STOP mode, insert NOP instructions (five or more instructions).
Examples 1.
<1> mov
0x02, r11
movea base_address, r0, r20 ; base_address = FFFF000H
<2> st.b
r11, PRCMD[r20]
; PRCMD = 01FCH
<3> st.b
r11, PSC[r20]
; PSC = 01FEH
<4> nop
nop
nop
nop
nop
2.
<1> mov
0x02, r11
movea 0xF1FCH, r0, r20
movea 0xF1FEH, r0, r21
<2> st.b
r11, 0x0[r20]
; r20 = FFFFF1FCH ( = PRCMD)
<3> st.b
r11, 0x0[r21]
; r21 = FFFFF1FEH ( = PSC)
<4> nop
nop
nop
nop
nop
No special procedure is required to read the contents of the PSC register.
Remarks 1.
Interrupts are not acknowledged for store instructions for the PRCMD register.
2.
Steps <2> and <3> above are assumed to occur consecutively. If another instruction is placed
between the instructions described in steps <2> and <3>, then when the interrupt is acknowledged
for that instruction, the setting may not be established, causing abnormal operation.
3.
Although the data written in the PRCMD register is dummy data, use the same value (data) as the
value of the general-purpose register used for setting data in a specific register (step <3> in the
examples above) even when writing to the PRCMD register (step <2> in the examples above). This
is similar to using a general-purpose register for addressing.
4.
To enable interrupts immediately after the software STOP mode is entered, insert the EI instruction
between the <1> mov and <2> st.b instruction