ST20-C1 STMICROELECTRONICS [STMicroelectronics], ST20-C1 Datasheet - Page 71

no-image

ST20-C1

Manufacturer Part Number
ST20-C1
Description
Instruction Set Reference Manual
Manufacturer
STMICROELECTRONICS [STMicroelectronics]
Datasheet
Exception handler code is completed by executing the eret instruction, which restores
the state of the interrupted or trapped process. When an interrupt handler executes
eret , it also signals to the interrupt controller that the interrupt has completed. This
allows the interrupt handler to start a lower priority waiting interrupt if required.
The exception instructions are listed in Table 6.1.
6.1
All exception handlers are identified by an integer called the exception level . Exception
levels 0 to HighestException (255) are available for user-defined exceptions, while
system exceptions have negative levels, as defined in Table 6.2.
Any exception may be triggered from software with the ecall instruction. User-defined
exceptions can be interrupt handlers, user processes waiting for DMA peripherals or
trap handlers used as system calls by executing ecall .
System exceptions are traps which may be triggered automatically when the CPU is in
certain states. They are intended mainly for operating system kernels to trap sched-
uling events and for debuggers to trap breakpoints. The circumstances in which each
system trap is taken are as follows:
Exception level
0 - 255
Exception levels
-1
-2
-3
-4
-5
-6
-7
el_breakpoint_trap
This trap is taken when either a breakpoint instruction is executed or a diag-
nostic controller (DCU) signals to the CPU requesting a breakpoint. If the trap
is null then the process continues. This trap is used by debuggers.
-
el_breakpoint_trap
el_illegal_instr_trap
el_idle_trap
el_schedule_exception_trap
el_run_trap
el_stop_trap
el_timeslice_trap
ecall
eret
breakpoint
Mnemonic
Table 6.1 Exception instructions
Name
Table 6.2 Exception levels
exception call
exception return
breakpoint
Interrupt, system call, DMA user process.
breakpoint instruction executed or DCU break-
point request.
Illegal op-code encountered.
CPU becomes idle.
Schedule a user process as an exception.
Execute a run instruction.
Execute a stop instruction.
Take a timeslice.
Circumstances when taken if not null
Name
6 Exceptions
71/205

Related parts for ST20-C1