Cannot wake up 11u68 with pin interrupt by GPIO

cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot wake up 11u68 with pin interrupt by GPIO

291 Views
Contributor III

I'm able to make my LPC11u68 into deep sleep mode, but i cannot wake it up. Can anyone help me?

 

The pin interrupt works if I don't put the MCU into Deep Sleep.  However, I cannot wake up the MCU if putting it to deep sleep mode by interrupting with GPIO.

#define GPIO_PININT_PIN               0     

#define GPIO_PININT_PORT              1

#define GPIO_PININT_INDEX             0

#define PININT_IRQ_HANDLER       PIN_INT0_IRQHandler     

#define PININT_NVIC_NAME         PIN_INT0_IRQn     

 

void PININT_IRQ_HANDLER(void)

{

     Chip_PININT_ClearIntStatus(LPC_PININT, PININTCH(GPIO_PININT_INDEX));

}

 

 

int main(void)

{

     CHIP_PMU_MCUPOWER_T crntPowerSetting;

 

     SystemCoreClockUpdate();

     Board_Init();

     SysTick_Config(SystemCoreClock / 10000 / 30);

 

     Chip_IOCON_PinMuxSet(LPC_IOCON, GPIO_PININT_PORT, GPIO_PININT_PIN,

               (IOCON_FUNC0 | IOCON_MODE_PULLUP | IOCON_CLKDIV(0) | IOCON_S_MODE(3)));

 

     Chip_GPIO_SetPinDIRInput(LPC_GPIO, GPIO_PININT_PORT, GPIO_PININT_PIN);

     Chip_Clock_EnablePeriphClock(SYSCTL_CLOCK_PINT);

     Chip_SYSCTL_SetPinInterrupt(GPIO_PININT_INDEX, GPIO_PININT_PORT, GPIO_PININT_PIN);

     Chip_PININT_ClearIntStatus(LPC_PININT, PININTCH(GPIO_PININT_INDEX));

     Chip_PININT_SetPinModeEdge(LPC_PININT, PININTCH(GPIO_PININT_INDEX));

     Chip_PININT_EnableIntLow(LPC_PININT, PININTCH(GPIO_PININT_INDEX));

     NVIC_ClearPendingIRQ(PININT_NVIC_NAME);

     NVIC_EnableIRQ(PININT_NVIC_NAME);

 

     Chip_SYSCTL_EnablePeriphWakeup(SYSCTL_WAKEUP_GPIOINT1);

     crntPowerSetting = PMU_MCU_DEEP_SLEEP;

 

     while (1) {

          ProcessPowerState(crntPowerSetting);

     }

     return 0;

}

2 Replies

12 Views
NXP Employee
NXP Employee

i intend use pin interrupt to wake-up MCU from power down modes.

Feel the pin interrupt can not wake up MCU from deep sleep and power down modes, after check your post content and the UM.

Only Group interrupt can help us wake up MCU from DSleep and Pdown modes.

Thank refer my codes as attached.

Thank you!

Hello World by UART

12 Views
NXP TechSupport
NXP TechSupport

Hi  Lee Chen,

Thank you for your interest in NXP Semiconductor products and 
the opportunity to serve you.

 

To provide the fastest possible support, I'd highly recommend you to refer to the periph_pinint demo in the LPCOpen library.

LPCOpen Software for LPC11XX|NXP 

TIC
 
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
0 Kudos