1- Yes I have selected the correct pin : // Specify that the IRQ0 as an input pin PORTB.PDR.BIT.B5 = 0X0; /* Select the pin function for the lower 5 bits, PB5 Hi-Z */ MPC.PB5PFS.BIT.PSEL = 0x00; // Interrupt input function select for IRQ0 MPC.PB5PFS.BIT.ISEL = 0x1; 2- Yes , the interrupt request is made as: // Interrupt request disabled IEN(ICU, IRQ0) = 0x0; // Set detection direction as falling edge ICU.IRQCR[0].BIT.IRQMD = 0x1; // Clear IR flag -- if edge detection is in use IR(ICU, IRQ0) = 0x0; // Set interrupt priority level to 14 IPR(ICU, IRQ0) = 0xB; // Enable IRQ0 interrupt requests IEN(ICU, IRQ0) = 0x1; 3- I configured all IRQ0 registers following user manual
↧