Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
legic_1490776
Level 5
Level 5
25 likes received 10 likes received First like received

My application uses HIDoff to save power and wakes up from one of several GPIO interrupts.

Is there any way to tell which line generated the interrupt that cause the wakeup?

Is there a way to tell whether the wakeup was due to an interrupt, or due to some other cause (such as powerup)?

0 Likes
1 Solution
Anonymous
Not applicable

Try to use gpio_getPinInterruptStatus() or gpio_getPortInterruptStatus().

If it is a timed wake up, the mia_isResetReasonPor() will return false and gpio_getPinInterruptStatus(GPIO_PIN_P39/16, GPIO_PIN_P39%16) will return 1.

Otherwise, the wake up source should be some other GPIO (it  mia_isResetReasonPor() return false).

gpio_getPinInterruptStatus() or gpio_getPortInterruptStatus should indicate the pin number.

Hope it helps.

View solution in original post

5 Replies