Capturing GPIO edge change during PowerDown

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Capturing GPIO edge change during PowerDown

768 Views
arpad_toth
Contributor II

Hello,

On QN908x how can I capture a 'falling edge change' on PA6 in PowerDown0 mode without waking up the system?
Wake up is periodically triggered by RTC, after wake up I'm interested if there was a level change by reading a pending flag.

Using GPIO pin interrupt didn't capture level change during PowerDown0 (via pending flag):
GPIO_SetFallingEdgeInterrupt(GPIOA, BIT32(DIO_EXTI_INP_PIN));
GPIO_EnableInterrupt(GPIOA, BIT32(DIO_EXTI_INP_PIN));
// actual NVIC interrup is not required, only looking for flag
// PowerDown0
// toggle DIO_EXTI_INP_PIN
// after wakeup by RTC, this didn't capture capture toggling
if(GPIO_GetPinsInterruptFlags(GPIOA) & BIT32(DIO_EXTI_INP_PIN))
It works corrent during non powerdown mode.

Using EXTI interrupt also didn't work.
NVIC_ClearPendingIRQ(EXT_GPIO_WAKEUP_IRQn);
NVIC_EnableIRQ(EXT_GPIO_WAKEUP_IRQn);
if(NVIC_GetPendingIRQ(EXT_GPIO_WAKEUP_IRQn))

The QN seems to be missing one layer where I assign one GPIO to EXTI channel, and level triggers and EXTI_GetITStatus(EXTI_Line0).

Level changes are only available for wakeup, but I don't need this kind of wakeup, only a flag that level change happend.
SYSCON->PIO_WAKEUP_LVL0 = mask; /* disables others */
SYSCON->PIO_WAKEUP_LVL1 = 0u; /* disables others */
SYSCON->PIO_WAKEUP_EN0 = mask;

Thank you

Labels (1)
  • QN

Tags (2)
0 Kudos
Reply
1 Reply

717 Views
Sebastian_Del_Rio
NXP Employee
NXP Employee

Hi Arpad, I hope you're doing well!

 

I'm sorry for the inconveniences this may cause, but there's no existing implementation for an edge detection flag during sleep mode for this device.

 

The available options for edge detection are the ones implemented for GPIO and EXTIO, however, these are designed to wake the device up instead of just setting a flag, and will cause the device to exit sleep or power down modes.

 

Please let me know if you need any more information.

 

Best regards,

Sebastian

0 Kudos
Reply