-
Notifications
You must be signed in to change notification settings - Fork 2.1k
event/timeout: fixed dependency on ZTIMER_USEC preventing low-power operation #16891
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
Comments
I'm not sure how this could be related, that PR just enables ztimer as a backend for |
Just pulling ztimer_usec should not prevent power_saving if it isn't in use (has not timer running on it), one reason it might be in use is the uint32 extender for ztimer. |
How did you resolve the dependency on |
#17141 might improve on that |
How? AFAIK |
these usec uses are just nows -> they will not block power saving (if configured for i don't care for long term usec now values short term is enough) |
I don't understand, doesn't a running timer block power savings? |
yes, BUT having ztimer_usec does not mean to have it running. gcoap with #17141 does not run any timer on ztimer_usec -> will not keep usec running. (it is just running because other thing are done) Is it save to use for gcoap at that one point (you know the one that is allready mentioned trice in the gcoap-ztimer PR)? i think so as it is just used to keep track of doublets of packages -> these are send while the cpu is working -> CPU-OSC active #17229 would be a save alternative for now (create a timer an ask how log it takes for it to expire (and when it expires you may start another one/or not if u do not need it any more)). |
@haukepetersen i think this i fixed by #16958 |
Yes :-) |
Description
For testing some border router stuff I just wanted to re-flash one of my very-low-power nodes with a current firmware. But it turns out, that with current master I am not able anymore to get my low-power build to work... To recap: key to this build was to get rid of any
xtimer
andztimer_usec
depencency, as a running periph timer does prevent the Nordic from going to low power...The reason that is blocking my build now is the usage of
event/timeout
ingcoap
. More precisely: the recentztimer
-enabling ofevent/timeout
(#16505) introduces a fixed dependency toztimer_usec
- leading togcoap
always pulling in and enabling the periph timer...Possible solution:
The API changes/additions to
event/timeout
already contain newztimer
-specific functions that let the user decide for the time backend to use. So the problem is the mapping of the existing API functions, which are however always included in the build. The key to solving this problem lies IMHO in separating theztimer
and non-ztimer parts of theevent/callback
API more strictly: modules using this library should either use only theevent_timeout_ztimer_x()
API and declare that dependency by usingevent_timeout_ztimer
, or they should use the old, usec-based API, declaraing this by depending onevent_timeout
. Now it becomes possible to use that module without forcingZTIMER_USEC
into the build...Steps to reproduce the issue
build anything with
gcoap
,xtimer
orztimer_usec
are always pulled into the buildExpected results
Use
event/timeout
andgcoap
in low-power applicationsActual results
low-power not possible with
gcoap
at the momentVersions
master
The text was updated successfully, but these errors were encountered: