Exceptions

The Exceptions tab is available with P&E Microcomputer Systems, simulator, and Freescale USB and Ethernet TAP remote connections. Use this tab to specify hardware exceptions that you want the debugger to catch. Before you load and run the program, the debugger inserts its own exception vector for each exception you check in tab. To use your own exception vectors instead, clear the corresponding checkboxes.

If you check any options, the debugger reads the Vector_Based_Register (VBR), finds the corresponding existing exception vector and then writes a new vector at that register location. The address of this new vector is offset 0x408 from the VBR address. For example, if the VBR address is 0x0000 0000, the new vector at address 0x0000 0408 catches and handles the checked exceptions.

The debugger writes a Halt instruction and a Return from Exception instruction at this same location.

Note: If your exceptions are in Flash or ROM, do not check any boxes in the CF Exceptions panel.
Figure 1. Exceptions Tab - For ColdFire
Exceptions Tab - For ColdFire

The following table describes the exceptions settings.

Table 1. Exceptions Settings - For ColdFire
Option Description
2 - Access Error Determines whether the debugger handles the access error exception. Check this option to catch and display access errors. Clear this option to ignore access errors.
3 - Address error Determines whether the debugger handles the address error exception. Check this option to catch and display address errors. Clear this option to ignore address errors.
4 - Illegal instruction Determines whether the debugger handles an invalid instruction exception. Check this option to catch and display invalid instructions. Clear this option to ignore invalid instructions.
5 - Divide by zero Determines whether the debugger handles a divide by zero exception. Check this option to catch and display any attempt to divide by zero. Clear this option to ignore divide by zero attempts.
8 - Privilege violation Determines whether the debugger handles a privilege violation exception. Check this option to catch and display privilege violations. Clear this option to ignore privilege violations.
9 - Trace Determines whether the debugger handles a Trace exception. Check this option to catch and display trace exceptions. Clear this option to ignore trace exceptions.
10 -Unimplemented line-a opcode Determines whether the debugger handles a unimplemented line-A opcode exception. Check this option to catch and display unimplemented line-A opcodes Clear this option to ignore unimplemented line-A opcodes.
11- Unimplemented line-f opcode Determines whether the debugger handles a unimplemented line-F opcode exception. Check this option to catch and display unimplemented line-F opcodes. Clear this option to ignore unimplemented line-F opcodes.
12 - Non-PC breakpoint debug interrupt Determines whether the debugger handles non-PC breakpoint debug interrupts. Check this option to catch and display non-PC breakpoint debug interrupts. Clear this option to ignore non-PC breakpoint debug interrupts.
13 - PC breakpoint debug interrupt Determines whether the debugger handles PC breakpoint debug interrupts. Check this option to catch and display PC breakpoint debug interrupts. Clear this option to ignore PC breakpoint debug interrupts.
14 - Format error Determines whether the debugger handles format error exceptions. Check this option to catch and display format errors. Clear this option to ignore format errors.
15 - Uninitialized interrupt Determines whether the debugger handles uninitialized interrupts. Check this option to catch and display uninitialized interrupts. Clear this option to ignore uninitialized interrupts.
24 - Spurious interrupt Determines whether the debugger handles spurious interrupts. Check this option to catch and display spurious interrupts. Clear this option to ignore spurious interrupts.
31 - Level 7 autovectored interrupt (Suspend Button) Determines whether the debugger handles level 7 suspend button exceptions. Check this option to catch and display the use of the level 7 interrupts. Clear this option to ignore level 7 interrupts.
46 - Trap #14 instruction (Console I/O) Determines whether the debugger handles trap # 14 instructions, which implement console I/O. Clear this option to ignore trap 14 instructions. Check this option to catche and display uses of trap 14 instructions.
61 - Unsupported instruction Determines whether the debugger handles the unsupported instruction exception. Check this options to catch and display unsupported instructions. Clear this option to ignore unsupported instructions.
Handle user application provided Trap #14 for console I/O Determines whether the debugger handles trap # 14 exceptions when they occur in an application. Clear this option to ignore trap 14 instructions. Check this option to catches and display uses of trap 14 instructions.
Figure 2. Exceptions Tab - For Kinetis
Exceptions Tab - For Kinetis

The following table describes the exceptions settings.

Table 2. Exceptions Settings - For Kinetis
Option Description
Enable File I/O Support Check to enable file input-output support.
Fault occuring during exception entry or return Check to suspend execution if a fault occurs during exception or return.
Hard Fault Generic fault that exists for all classes of fault that cannot be handled by any of the other exception mechanisms; typically used for unrecoverable system failure situations, though this is not required, and some uses of HardFault might be recoverable. HardFault is permanently enabled and has a fixed priority of -1.
UsageFault due to checking error The UsageFault fault handles non-memory related faults caused by the instruction execution. A number of different situations will cause usage faults, including:
  • UNDEFINED Instructions
  • invalid state on instruction execution
  • errors on exception return
  • disabled or unavailable coprocessor access.
The following can cause usage faults when the core is configured to report them:
  • unaligned addresses on word and halfword memory accesses
  • division by zero.
UsageFault can be disabled (in this case, a UsageFault will escalate to HardFault). UsageFault has a configurable priority.
MemManage MemManage fault handles memory protection related faults which are determined by the Memory Protection Unit or by fixed memory protection constraints, for both instruction and data generated memory transactions. The fault can be disabled (in this case, a MemManage fault will escalate to HardFault). MemManage has a configurable priority.
BusFault Handles memory related faults other than those handled by the MemManage fault for both instruction and data generated memory transactions. These faults arise from errors detected on the system buses. Implementations are permitted to report synchronous or asynchronous BusFaults according to the circumstances that trigger the exceptions. The fault can be disabled (in this case, a BusFault will escalate to HardFault). BusFault has a configurable priority.
UsageFault due to state information error Check to suspend execution if a usage fault due to state information occurs.
UsageFault access to a Coprocessor Check to suspend execution if a usage fault access to coprocessor occurs.