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):
// actual NVIC interrup is not required, only looking for flag
// 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 */
SYSCON->PIO_WAKEUP_EN0 = mask;