AnsweredAssumed Answered

Capturing GPIO edge change during PowerDown

Question asked by on Jan 23, 2020
Latest reply on Jan 27, 2020 by Sebastián Del Río



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));
// 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.


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 */


Thank you