-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
ports/stm32/powerctrl.c Enable user EWUP control #6494
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Ok now we have a duplicate for this issue, which is good, it means that it will be solved one way or another. So now we need to discuss the solutions. Solution 1 (time based): PR 6482:
Both solution have advantages and drawbacks. Drawbacks: Solution 2: How can we have this discussion ? Duplicate: #6482 |
This PR is a bugfix. It ensures that the Pyboard D behaves similarly to Pyboard 1.x. There is no conflict with alternative micropower solutions. |
@dpgeorge Any thoughts on this? It does seem unfortunate to lose functionality which has been available for years on Pyboard 1.x. Is there a reason for this? |
@peterhinch Sorry for the possibly dumb question but I'm not super familiar with STM32 power management. Is there a hidden interaction that I don't understand -- why is this way of solving it necessary? i.e. why doesn't removing the |
It would achieve the same thing. I gather Damien has identified a hardware issue whereby the wakeup sources must be disabled while clearing the global flag. This code comment indicates that this is the case. I therefore used this approach, which works in my testing. |
There are forum users asking about this. Is there a reason for not implementing this simple fix? |
Sorry, this PR got really lost. I agree with the fix, it is needed. ST examples do it this way (disable wake-up sources, clear wake-up flag, re-enable wake-up sources, enter stand-by mode). Tested and merged in 0facd89 Thank you very much @peterhinch ! |
include python executable path in the idf key
The Pyboard 1.x supports standby wakeup via X1 or X18, as implemented in this repo.
Unfortunately this line prevents this from working on the D series. This PR remedies this by saving and restoring any EWUP flags set by the user. Wakeup can now be performed on the D series via pins X1 and X18.