This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Class B Illegal word operand access trap, how do I debug

I'm getting Class B Illegal word operand access trap on a C161 board and I don't know why. The problem is reproducable, but moves unpredicatably as I modify the code. My trap handler spits out the top three stack entries, but they don't look credible, and the system continues running after the trap without visible problems. Short of hiring an ICE, does anyone have any advice?

Parents
  • Did you examine the registers?

    When a hardware trap occurs the PSW, CSP (in segmentation mode), and IP are pushed on the internal system stack and the CPU level in register PSW is set to the highest possible priority level (i.e. level 15), disabling all interrupts.

    The bit-addressable Trap Flag Register (TFR) allows a trap service routine to identify the kind of trap which caused the exception. Each trap function is indicated by a separate request flag. When a hardware trap occurs, the corresponding request flag in register TFR is set to 1.

    So look at the stack to determine where you came from in your code and the value of the TFR register. Then go to that place in the code to find out why you are in a class B trap.

Reply
  • Did you examine the registers?

    When a hardware trap occurs the PSW, CSP (in segmentation mode), and IP are pushed on the internal system stack and the CPU level in register PSW is set to the highest possible priority level (i.e. level 15), disabling all interrupts.

    The bit-addressable Trap Flag Register (TFR) allows a trap service routine to identify the kind of trap which caused the exception. Each trap function is indicated by a separate request flag. When a hardware trap occurs, the corresponding request flag in register TFR is set to 1.

    So look at the stack to determine where you came from in your code and the value of the TFR register. Then go to that place in the code to find out why you are in a class B trap.

Children