Hallo,
ich habe mit folgendem Code die Illegal Instruction Trap ausgelöst:
1 | #include <ez8.h>
|
2 |
|
3 | #pragma interrupt
|
4 | void isr_illegal_instruction() {
|
5 |
|
6 | while(1) {}
|
7 | }
|
8 |
|
9 | void main() {
|
10 |
|
11 | SET_VECTOR(TRAP, isr_illegal_instruction);
|
12 | EI();
|
13 |
|
14 | #pragma asm "\t DB 0c6h"
|
15 |
|
16 | while(1) {}
|
17 | }
|
Nach Einsprung in die ISR sollte das Master Interrupt Flag eigentlich
auf "0" gesetzt werden. Wird es aber nicht ;-)
Zitat Z8F640x Series Product Specification:
Interrupts are globally disabled by any of the following actions:
• Execution of a DI (Disable Interrupt) instruction
• eZ8 CPU acknowledgement of an interrupt service request from the
interrupt
controller
• Writing a 0 to the IRQE bit in the Interrupt Control register
• Reset
• Execution of a Trap instruction
• Illegal instruction trap
Woran kann das leigen?
MfG
R. F.