
EXCEPTIONS
S3CC40D/FC40D_UM_REV1.20
FIQ EXCEPTION
When nFIQ (an input pin CalmRISC16 core) signal is active (transition from 1 to 0), “JMP addr:22” instruction is
automatically executed by CalmRISC16. The address of FIQ interrupt service routine is in 000002h (i.e., FIQ
vector address) of the program memory (i.e., “JMP {6’h00, PM[000002h]}”). The return address is saved in
{SPCH_FIQ, SPCL_FIQ} register pair, and the SR value is saved in SSR_FIQ register. PM bit is set. FE, IE, and
TE bits are cleared. When RET_FIQ instruction is executed, SR value is restored from SSR_FIQ, and the return
address is restored into PC from {SPCH_FIQ, SPCL_FIQ}.
IRQ EXCEPTION
When nIRQ signal (an input pin CalmRISC16 core) is active (transition from 1 to 0), “JMP {6’h00, PM[000004h]}”
instruction is forced to the instruction pipeline. The return address is saved in {SPCH_IRQ, SPCL_IRQ} register
pair, and the SR value is saved in SSR_IRQ register. PM bit is set. IE and TE bits are cleared. When RET_IRQ
instruction is executed, SR value is restored from SSR_IRQ, and return address is restored to PC from
{SPCH_IRQ, SPCL_IRQ}.
TRQ EXCEPTION
When TE bit is set, TRQ interrupt happens and “JMP {6’h00, PM[000006h]}” instruction is executed right after
each instruction is executed. TRQ interrupt uses the saved registers of IRQ(that is, {SPCH_IRQ, SPCL_IRQ}
register pair and SSR_IRQ) to save the return address and SR, respectively. PM bit is set. IE, TE bits are cleared.
SWI EXCEPTION
When “SWI imm:6” instruction is executed, the return address is saved in the register A14, and the value of SR is
saved in SSR_SWI. Then the program sequence jumps to the address (imm:6 * 4). PM bit is set. IE and TE bits
are cleared. “SWI 0” and “SWI 1” are prohibited because the addresses are reserved for other interrupts. When
RET_SWI instruction is executed, SR is restored from SSR_SWI, and the return address is restored to PC from
A14.
BREAK EXCEPTION
Break exception is reserved only for an in-circuit debugger. When a core input signal, BKREQ, is high, the
CalmRISC16 core is halted or in the break mode, until BKREQ is deactivated. Another way to drive the
CalmRISC16 core into the break mode is by executing a break instruction, BREAK. When BREAK is fetched, it is
decoded and the CalmRISC16 core output signal nBKACK is generated. An in-circuit debugger generates
BKREQ active by monitoring nBKACK to be active. BREAK instruction is exactly the same as the NOP (no
operation) instruction except that it does not increase the program counter and activates nBKACK. There, once
BREAK is encountered in the program execution, it falls into a deadlock. BREAK instruction is reserved for in-
circuit debuggers only, so it should not be used in user programs.
NOTE
imm:6 is defined as 6-bit immediate number
4-2