We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi,
I am trying to enable GPIO PIN interrupts using following procedure, But not getting why flags in IST itself not setting.
Please anyone point what went wrong here
my code:
NVIC_DisableIRQ(PIN_INT0_IRQn); NVIC_DisableIRQ(PIN_INT1_IRQn);
/* enbale tx interrupt, rx interrupt for module 0 */ SCU_PinInterruptSourceSelect(0x00, 0x06, 0x00); SCU_PinInterruptSourceSelect(0x01, 0x06, 0x02);
/* enable edge interrupt */
LPC_GPIO_PIN_INT->ISEL = 0x00UL;
/* enable rising edge interrupt */
LPC_GPIO_PIN_INT->IENR = (GPIO_PIN_INT_IENR_ENRL0_Msk | GPIO_PIN_INT_IENR_ENRL1_Msk );
LPC_GPIO_PIN_INT->SIENR = (GPIO_PIN_INT_SIENR_SETENRL0_Msk | GPIO_PIN_INT_SIENR_SETENRL1_Msk );
/* enable falling edge interrupt */
LPC_GPIO_PIN_INT->IENF = (GPIO_PIN_INT_IENF_ENAF0_Msk | GPIO_PIN_INT_IENF_ENAF0_Msk);
LPC_GPIO_PIN_INT->SIENF = (GPIO_PIN_INT_SIENF_SETENAF0_Msk | GPIO_PIN_INT_SIENF_SETENAF1_Msk );
/* Clear pending interrupt of pin interrupt 1*/ NVIC->ICPR[1] = (1UL << 1);
/* set priority for pin interrupt 1 */ NVIC_SetPriority(0x21, 1);
/* enable pin interrupt - 0x21 */ NVIC->ISER[1] = (1UL << 1);
Pon alagappan,
That's not much better than your first horrible attempt!
As it says just above the box where you type your message:
Place source code between <pre> and </pre>.