NEC UPD703116 User Manual page 209

32-bit single-chip microcontrollers
Table of Contents

Advertisement

[Sample coding]
<1> ST.B
r11, PSMR [r0]
<2> MOV
0x07, r10
<3> ST.B
r10, PRCMD [r0] ; Write PRCMD register
<4> ST.B
r10, PSC [r0]
<5> NOP
<6> NOP
<7> NOP
<8> NOP
<9> NOP
(next instruction)
No special sequence is required to read the specific register.
Cautions 1. A store instruction for the command register does not acknowledge interrupts. This coding
is made on assumption that <3> and <4> above are executed by the program with
consecutive store instructions. If another instruction is set between <3> and <4>, the above
sequence may become in effective when the interrupt is acknowledged by that instruction,
and a malfunction of the program may result.
2. Although the data written to the PRCMD register is dummy data, use the same register as
the general-purpose register used in specific register setting (<4>) for writing to the PRCMD
register (<3>). The same method should be applied when using a general-purpose register
for addressing.
3. At least 5 NOP instructions must be inserted after executing a store instruction to the PSC
register to set software STOP or IDLE mode.
4. Before executing this processing, complete all DMA transfer operations.
CHAPTER 8 CLOCK GENERATION FUNCTION
; Set PSMR register
; Prepare data for setting specific register in
arbitrary general-purpose register
; Set PSC register
; Dummy instruction
; Dummy instruction
; Dummy instruction
; Dummy instruction
; Dummy instruction
; Execution routine after software STOP mode and IDLE
mode release
User's Manual U14492EJ5V0UD
209

Advertisement

Table of Contents
loading

Table of Contents