English
Language : 

CC78K4 Datasheet, PDF (352/523 Pages) NEC – CC78K4 Ver.2.30 or Later, C Compiler Language
CHAPTER 11 EXTENDED FUNCTIONS
(13) CPU control instruction
CPU Control Instructions
#pragma HALT/STOP/BRK/NOP
FUNCTION
• The following codes are output to an object to create an object file.
(1) Instruction for HALT operationNote 1
(2) Instruction for STOP operationNote 2
(3) BRK instruction
(4) NOP instruction
Notes 1.
2.
The setting of STOP mode and selection of the internal system clock is possible using the STBC
register. The C compiler reads STBC, checks the CK1/CK0 value of the internal system clock
selection, and accordingly outputs the instruction to set the value for HALT to STBC.
The C compiler reads STBC, checks the CK1/CK0 value of the internal system clock selection, and
accordingly outputs the instruction to set the value for STOP to STBC.
EFFECT
• The standby function of a microcontroller can be used with a C program.
• A software interrupt can be generated.
• The clock can continue without the CPU operating.
USAGE
• Describe the #pragma HALT, #pragma STOP, #pragma NOP, and #pragma BRK instructions at the
beginning of the C source.
• The following items can be described before the #pragma directive.
• Comment statement
• Other #pragma directive
• Preprocessing directive that neither defines nor references a variable or function
• The keywords following #pragma can be described in either uppercase or lowercase letters.
352
User’s Manual U15556EJ1V0UM