Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8609

General • Re: Problems with powman_enable_gpio_wakeup()

$
0
0
What is adding to the mystery: after reset, I check the powman register LAST_SWCORE_PWRUP (powman_hw->last_swcore_pwrup). The register always has the value "2", which according to the docs is "pwrup1". But I am using powman_enable_gpio_wakeup(0,...) so I am expecting a "1" instead. I am also using powman_disable_all_wakeups() during setup so all gpio wakeup slots should be disabled.
Stating the obvious here, but if it returns pwrup1 when you set it to pwrup0 then chances are you either aren't setting it to pwrup0 in the first place or there's something else setting it again (possibly through your code path or something else entirely). And since you have a loop there:

Code:

for (unsigned i=0; i<_powman_wakeup_slots; ++i) {    [...]    powman_enable_gpio_wakeup(i, gpio_info.pin_number,
I have a suspicion that something is calling alarm_pin_pinalarm_set_alarms() again with values that you do not expect. Easiest way of debugging this is with a debugger connected, but just replacing the variables with constants should work well enough here as well.

Statistics: Posted by Tharre — Fri Aug 08, 2025 12:13 am



Viewing all articles
Browse latest Browse all 8609

Trending Articles