Fujitsu FR60 Hardware Manual page 150

32-bit microcontroller mb91301 series
Hide thumbs Also See for FR60:
Table of Contents

Advertisement

CHAPTER 3 CPU AND CONTROL UNITS
❍ Procedure of shut down
#macro wait_loop loop_number
#local _wait64_loop
_wait64_loop:
#endm
smooth_down_start3:
//Increase the divide-by rate of CLKT gradually.
//Increase the divide-by rate of CLKB and CLKP gradually.
//Reduce the multiply-by rate of the PLL gradually.
130
ldi
#loop_number,r0
add
#-1,r0
bne _wait64_loop
ldi
#_DIVR0,r1
ldi
#_DIVR1,r2
ldi
#_CLKR,r3
ldi
#0x11,r5
ldi
#0x3f,r6
ldi
#0xff,r8
ldi
#0x04,r9
ldi
#0x33,r10
ldi
#0xff,r12
ldi
#0x00,r13
ldi
#0x1f,r14
nop
nop
nop
// No CLKT division → 2
stb
r14,@r2
wait_loop 16
// Divide CLKT by 2 → 4
stb
r6,@r2
wait_loop 8
// Divide CLKT by 4 → 16
stb
r8,@r2
wait_loop 4
// No CLKB division → by 2, divide CLKP by 2 → 2
stb
r5,@r1
wait_loop 16
// Divide CLKB and CLKP by 2 → 4
stb
r10,@r1
wait_loop 8
//Divide CLKB and CLKP by 4 → 16
stb
r12,@r1
wait_loop 4
stb
r9,@r3
// Change from the PLL to the source oscillation of the X0/X1.
stb
r13,@r3
// PLL off
nop
nop
nop
ret
// Division register for CLKB and CLKP
// Division register for CLKT
// CLKR register

Advertisement

Table of Contents
loading

Table of Contents