Content originally posted in LPCWare by sadfsdf on Wed Oct 21 06:03:15 MST 2015
Yes, you are right I am using GPIO6[12]..wrong comments...will edit them.
The problem is that it is working with PIN_INT1 for example, but is not working with PIN_INT7.
For PIN_INT1 code looks like that :
void proximityInt_init(const DRV_EXTERNAL_INTERRUPT_CALLBACK newProximityInt1Callback)
{
proximityInt1Callback = newProximityInt1Callback;
nvicDisableVector(PIN_INT1_IRQn);
/* Setup GPIO6 Pin 12 */
palSetPadMode(6, 12, PAL_MODE_INPUT);
/* Set up GPIO6 Pin 12 as interrupt */
LPC_SCU->PINTSEL0 |= (6 << 13) | (0xC << 8);
LPC_GPIO_PIN_INT->ISEL &= ~0x02; // Edge sensitive
LPC_GPIO_PIN_INT->SIENR |= 0x02; // Enable rising
LPC_GPIO_PIN_INT->SIENF |= 0x02; // Enable falling
/* Enable interrupts */
nvicEnableVector(PIN_INT1_IRQn, CORTEX_PRIORITY_MASK(2));
}