Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
During a project at school, we ran into a problems with the interrupt pins on the LPCXpresso4337. We have discovered a bug in the gpio_irq_api.c file and modified the code. Code was tested on LPCXpresso4337.
OLD:
gpio_irq_api.c OLD
/* Set SCU */ if (channel < 4) { LPC_SCU->PINTSEL0 &= ~(0xFF << (portnum << 3)); LPC_SCU->PINTSEL0 |= (((portnum << 5) | pinnum) << (channel << 3)); } else { LPC_SCU->PINTSEL1 &= ~(0xFF << ((portnum - 4) << 3)); LPC_SCU->PINTSEL1 |= (((portnum << 5) | pinnum) << ((channel - 4) << 3)); }SUGGESTION:
gpio_irq_api.c SUGGESTION
/* Set SCU */ if (channel < 4) { LPC_SCU->PINTSEL0 &= ~(0xFF << (channel << 3)); LPC_SCU->PINTSEL0 |= (((portnum << 5) | pinnum) << (channel << 3)); } else { LPC_SCU->PINTSEL1 &= ~(0xFF << ((channel - 4) << 3)); LPC_SCU->PINTSEL1 |= (((portnum << 5) | pinnum) << ((channel - 4) << 3)); }