Replies: 2 comments 6 replies
-
Before looking into the problems you are having, note that this cannot be considered a bug when the documentation clearly says the current wake-up pins API is only meant to be used for Poweroff (standby) exit. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Converting to a discussion. |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the bug
Hi all,
I am currently evaluating the stop 3 mode in combination with IRQ handlers on the nucleo_u575zi_q board and facing some weird behavior. My goal is to register a gpio irq handler to a wakup pin. Once the pin is pressed, the CPU should wake (because it's a wakeup pin) + execute the configured irq handler.
For testing, I have used the
zephyr/samples/boards/st/power_mgmt/wkup_pins
sample, added the irq handler, and changed from standby to stop3. Please find my code here: https://github.com/whati001/zephyr/tree/test/wkup_gpio_irq/samples/boards/st/power_mgmt/wkup_pinsThe crazy thing is that the irq is only executed once per rtc timeout. Argo, when I wait for 10 seconds until the RTC wakes up the CPU, I can press the nucleo button, and the IRQ is executed nicely. However, the IRQ is not executed if I press the button again (before the 10 seconds of the rtc timeout). After the RTC times out and wakes up the CPU, the button works again once. Here is the main code to understand what I mean:
To see if the CPU does something, I have added a print into the cortex_m irs_wrapper function:
The output shows that I received the following interrupts:
The RTC somehow resets the EXTI13 interrupt line, but I do not know where and how.
Because all button presses (after the first one, which works) only trigger a solely PWE WAKUP STOP3 interrupt without the EXTI one. I assume this is also the reason why the irq handler is not executed.
In addition, all the LPTIM1 interrupts confuse me. Shouldn't the LPTIM1 be disabled, and should RTC be used in stop 3? Why do I receive so many LPTIM1 interrupts here?
Regression
Steps to reproduce
Reproduce:
Relevant log output
Impact
Annoyance – Minor irritation; no significant impact on usability or functionality.
Environment
OS: Linux
Toolchain: zephyr-sdk-0.17.0
Zephyr: Zephyr 4.2.0-rc3
Additional Context
I have also added a printk to each exti controller function, but it seems that they are not called after an RTC wake up. I really do not understand why an RTC wake up "fixes" the button irq.
The board uses as wakup pin the PC13 on WKUP2:
And some notes that the RTC uses the PC13 for something:
What comes into my head are the following problems:
Beta Was this translation helpful? Give feedback.
All reactions