Fujitsu F2MC-16LX Hardware Manual page 171

Mb90470 series 16-bit microcontroller
Hide thumbs Also See for F2MC-16LX:
Table of Contents

Advertisement

Notes on Accessing the Low-Power Consumption Made Control Register (LPMCR) to Enter the
Standby Mode
To access the low-power consumption mode control register (LPMCR) with assembler
language
To set the low-power consumption mode control register (LPMCR) to enter the standby
mode, use the instruction listed in Table 6.3-2 "Instructions used for change to low-power
consumption mode".
The low-power consumption mode transition instruction in Table 6.3-2 "Instructions used for
change to low-power consumption mode" must always be followed by an array of
instructions highlighted by a line below.
MOV LPMCR,#H'
NOP
NOP
JMP
$+3
MOV A,#H'10
The devices does not guarantee its operation after returning from the low-power
consumption mode if you place an array of instructions other than the one enclosed in the
line.
To access the low-power consumption mode (LPMCR) with C language
To enter the standby mode using the low-power consumption mode control register (LPMCR),
use one of the following methods (1) to (3) to access the register:
(1) Specify the standby mode transition instruction as a function and insert two _wait_nop()
built-in functions after that instruction. If any interrupt other than the interrupt to return from
the standby mode can occur within the function, optimize the function during compilation to
suppress the LINK and UNLINK instructions from occurring.
Example: Watch mode or timebase timer mode transition function
(2) Define the standby mode transition instruction using _asm statements and insert two NOP
and JMP instructions after that instruction.
Example: Transition to sleep mode
; the low-power consumption mode transition instruction in table 6.3-2
XX
; jump to next instruction
; any instruction
Void enter_watch(){
IO_LPMCR_byte = 0x10 /* Set LPMCR TMD bit to 0 */
_wait_nop();
_wait_nop();
}
_asm(" MOV I: _IO_LPMCR,#H'58);
_asm(" NOP");
_asm(" NOP");
_asm(" JMP
$+3");
CHAPTER 6 LOW-POWER CONSUMPTION MODE
/* Set LPMCR SLP bit to 1 */
/* Jump to next instruction */
155

Advertisement

Table of Contents
loading

Table of Contents