beautypg.com

FUJITSU MB91F109 FR30 User Manual

Page 120

background image

96

CHAPTER 3 CLOCK GENERATOR AND CONTROLLER

[Example of setting the maximum gear speed]

Returning from the Sleep State

An interrupt or resetting can be used to return from the sleep state.

Return by way of an interrupt

When the enable bit for the interrupt, which is one of the peripheral functions, is on, a peripheral
interrupt can be used to return from the sleep state.

The procedure for returning from the stop state to the normal run state is as follows:

Interrupt generation --> restart of internal bus clock supply --> restart of internal CPU
clock supply

Program execution after clock supply is as follows:

When the level of the caused interrupt is enabled by the I flag of CPU ILM

The program saves the register, fetches the interrupt vector, and executes processing
beginning from the interrupt processing routine.

When the level of the caused interrupt is disabled by the I flag of CPU ILM

The program executes instructions beginning from the instruction following the instruction
that caused transition to the sleep state.

Return by way of a reset request

The procedure for returning from the stop state to the normal run state is as follows:

Occurrence of internal reset --> restart of internal bus clock supply --> restart of internal
CPU clock supply --> reset vector fetch --> restart of instruction execution from reset
entry address

When a peripheral interrupt is used as a DMA transfer request, the interrupt cannot be used
to return from the sleep state.

If a peripheral interrupt request has already been issued when the STCR register bits 7 and
6 are written, transition to the sleep state does not occur. If a DMA request and sleep

LDI:20

#GCR,R0

LDI:8

#00000011b,R1

; CHC=1,CPU=peripheral gear ratio

STB

R1,@R0

; If DBLON=0

LDI:20

#STCR,R0

LDI:8

#01010000b,R1

; SLEP=1

STB

R1,@R0

NOP

;

NOP

;

NOP

;

NOP

;

NOP

;

NOP

;