_asm_int_on: link A6,#-4 movem.l d7,(SP) move.w SR,D7 andi.l #0xf8ff,d7 /* enable interrupts */ move.w D7,SR movem.l (SP),D7 lea 4(SP),SP unlk A6 rts
IC_IMRL_0 &= ~0x02; // unmask interrupt source is correct when the general mask bit has ALREADY been cleared. IC_IMRL_0 &= ~0x03; // unmask interrupt source AND MASK ALL BIT This may be what is missing... Regards Mark
*******; 21: MCF_GPIO_PNQPAR = (0 | MCF_GPIO_PNQPAR_IRQ1_IRQ1); ;0x0000000E 0x41F900000000 lea ___IPSBAR,a00x00000014 0x223C00100068 move.l #1048680,d1 ; '...h'0x0000001A 0x7004 moveq #4,d00x0000001C 0x31801800 move.w d0,(a0,d1.l);; 22: MCF_EPORT_EPPAR0 = (0 | MCF_EPORT_EPPAR_EPPA1_BOTH); ;0x00000020 0x41F900000000 lea ___IPSBAR,a00x00000026 0x223C00130000 move.l #1245184,d1 ; '....'0x0000002C 0x700C moveq #12,d00x0000002E 0x31801800 move.w d0,(a0,d1.l);; 23: MCF_EPORT_EPIER0 = (0 | MCF_EPORT_EPIER_EPIE1); ;0x00000032 0x41F900000000 lea ___IPSBAR,a00x00000038 0x223C00130003 move.l #1245187,d1 ; '....'0x0000003E 0x7002 moveq #2,d00x00000040 0x11801800 move.b d0,(a0,d1.l);; 24: MCF_INTC0_ICR1 = (MCF_INTC_ICR_IL(4) | MCF_INTC_ICR_IP(4)); ;0x00000044 0x41F900000000 lea ___IPSBAR,a00x0000004A 0x7024 moveq #36,d00x0000004C 0x11400C41 move.b d0,3137(a0);; 25: MCF_INTC0_IMRL &= ~(MCF_INTC_IMRL_MASKALL); // Unmask all interrupts ;0x00000050 0x41F900000000 lea ___IPSBAR,a00x00000056 0x41E80C0C lea 3084(a0),a00x0000005A 0x2D48FFF8 move.l a0,-8(a6)0x0000005E 0x226EFFF8 movea.l -8(a6),a10x00000062 0x206EFFF8 movea.l -8(a6),a00x00000066 0x70FE moveq #-2,d00x00000068 0xC090 and.l (a0),d00x0000006A 0x2280 move.l d0,(a1);; 26: MCF_INTC0_IMRL &= ~MCF_INTC_IMRL_MASK1; ; 27: ;0x0000006C 0x41F900000000 lea ___IPSBAR,a00x00000072 0x41E80C0C lea 3084(a0),a00x00000076 0x2D48FFFC move.l a0,-4(a6)0x0000007A 0x226EFFFC movea.l -4(a6),a10x0000007E 0x206EFFFC movea.l -4(a6),a00x00000082 0x70FD moveq #-3,d00x00000084 0xC090 and.l (a0),d00x00000086 0x2280 move.l d0,(a1);********; 58: __interrupt__ void irq_1_isr(void) ; 59: { ;0x00000000 _irq_1_isr:; irq_1_isr:0x00000000 0x4E560000 link a6,#00x00000004 0x4FEFFFF4 lea -12(a7),a70x00000008 0x48D70103 movem.l d0-d1/a0,(a7);; 60: while (!(MCF_EPORT_EPPDR0 & MCF_EPORT_EPPDR_EPPD1)) {}; ;0x0000000C 0x41F900000000 lea ___IPSBAR,a00x00000012 0x203C00130005 move.l #1245189,d0 ; '....'0x00000018 0x12300800 move.b (a0,d0.l),d10x0000001C 0x7000 moveq #0,d00x0000001E 0x1001 move.b d1,d00x00000020 0x028000000002 andi.l #0x2,d0 ; '....'0x00000026 0x4A80 tst.l d00x00000028 0x67E2 beq.s *-28 ; 0x0000000c;; 61: stop=1; ;0x0000002A 0x7001 moveq #1,d00x0000002C 0x13C000000000 move.b d0,_stop0x00000032 0x4CD70103 movem.l (a7),d0-d1/a00x00000036 0x4E5E unlk a60x00000038 0x4E73 rte 0x0000003A 0x4E71 nop *******Thanks againI really appreciate your help
INTERRUPT_SETUP interrupt_setup; // interrupt configuration parameters interrupt_setup.int_type = PORT_INTERRUPT; // identifier when configuring interrupt_setup.int_handler = test_irq_1; // handling function interrupt_setup.int_priority = (INTERRUPT_LEVEL_2); // low priority interrupt_setup.int_port_bit = 1; // The IRQ input connected interrupt_setup.int_port_sense = IRQ_BOTH_EDGES; // Interrupt on this edge fnConfigureInterrupt((void *)&interrupt_setup); // configure test interrupt
/* * File: main.c * Purpose: sample program * */#include <stdio.h>#include "common.h" unsigned char stop=0; void delay(int t_end){ int i,j; for (i=0;i<t_end;i++) { for(j=0;j<10000;j++); }}int main(){ unsigned char i; MCF_GPIO_PNQPAR = 0 | MCF_GPIO_PNQPAR_IRQ1_IRQ1; MCF_EPORT_EPPAR0 = 0 | MCF_EPORT_EPPAR_EPPA1_LEVEL; MCF_EPORT_EPIER0 = 0 | MCF_EPORT_EPIER_EPIE1; MCF_INTC0_ICR1 = (MCF_INTC_ICR_IL(4) | MCF_INTC_ICR_IP(4)); Leds_Init(); while(1) { for (i=0; i<0x10; i++) {// board_led_display(i); // delay(100); if (stop==1) { return; } } } return 0;}__interrupt__ void irq_1_isr(void){ while (!(MCF_EPORT_EPPDR0 & MCF_EPORT_EPPDR_EPPD1)) {}; stop=1;}
. . .#define _irq_handler irq_handler#define _irq_1_isr irq_1_isr . . ..extern _irq_handler.extern _irq_1_isr . . .//vector41: .long _irq1_handlervector41: .long _irq_1_isr . . .