English
Language : 

UPD784938 Datasheet, PDF (107/733 Pages) NEC – 16-Bit Single-Chip Microcontrollers
CHAPTER 4 CLOCK GENERATOR
4.2 Control Registers
4.2.1 Standby control register (STBC)
STBC is a register used to set the standby mode and select the internal system clock. See CHAPTER 25 STANDBY
FUNCTION for details of the standby modes.
To prevent erroneous entry into standby mode due to an inadvertent program loop, the STBC register can only be written
to by a dedicated instruction. This instruction is the MOV STBC, #byte instruction, and has a special code configuration (4 bytes).
A write is only performed if the 3rd and 4th bytes of the op code are mutual complements. If the 3rd and 4th bytes of the op code
are not mutual complements, a write is not performed, and an operand error interrupt is generated. In this case, the return
address saved in the stack area is the address of the instruction which is the source of the error. The error source address can
thus be found from the return address saved on the stack area.
An endless loop will result if restore from an operand error is simply performed with an RETB instruction.
Because the operand error interrupt occurs only when the program hangs up (only the correct dedicated instruction is
generated with the NEC’s assembler RA78K4 when MOV STBC, #byte is described), make sure that the operand error interrupt
processing program initializes the system.
Other write instructions (“MOV STBC, A”, “AND STBC, #byte”, “SET1 STBC.7”, etc.) are ignored, and no operation is
performed. That is, a write is not performed on the STBC, and an interrupt such as an operand error interrupt is not generated.
STBC can be read at any time with a data transfer instruction.
RESET input sets STBC to 30H.
The format of STBC is shown in Figure 4-3.
Preliminary User’s Manual U13987EJ1V0UM00
107