CHAPTER 8 CLOCK GENERATION FUNCTION
186
User’s Manual U15195EJ5V0UD
[Sample coding]
<1>
ST.B
r11, PSMR [r0]
; Set PSMR register
<2>
MOV
0
×
04, r10
; Prepare data for setting
specific register in
general-purpose register
<3>
ST.B
r10, PRCMD [r0]
; Write PRCMD register
<4>
ST.B
r10, PSC [r0]
; Set PSC register
<5>
NOP
; Dummy instruction
<6>
NOP
; Dummy instruction
<7>
NOP
; Dummy instruction
<8>
NOP
; Dummy instruction
<9>
NOP
; Dummy instruction
(next instruction)
; Execution routine after software
STOP mode and IDLE mode release
No special sequence is required to read the specific register.
Cautions 1. Interrupts are not acknowledged in store instructions for the command register. 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 ineffective 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.
Содержание PD703114
Страница 2: ...2 User s Manual U15195EJ5V0UD MEMO ...