make/ztimer: auto-pull timer backend deps for ztimer_msec#16334
make/ztimer: auto-pull timer backend deps for ztimer_msec#16334haukepetersen wants to merge 2 commits intoRIOT-OS:masterfrom
Conversation
The issue with that is that periph_rtt doesn't always allow 1000hz (or higher) . Some only do 1hz. IIUC ztimer will silently fail in that case. |
|
I see, so it seems we need a smarter way to fix this. Would be great if we could fix this once and for all, sucks to have to care about this issue every time ztimer_msec is used... How about we model some kind of board feature that we can use to select a fitting ztimer backend? |
|
This really is an FAQ by now BTW, about everyone using ztimer runs into this issue ;)
That would probably be the best. First step would be to configure all RTT to the same frequency (by default), if possible. |
|
Its been a while since the last time I had a deep dive into ztimer. But couldn't we select |
Unfortunately, this would (at least in the current state) defeat the purpose: that would lead to the inclusion, and initialization, of the |
Isn't the respective |
We discussed something similar in #16116. A compatible RTT could be modeled as a feature. |
|
Ah, should have read further, I now saw that you came to the same conclusion :-). |
True. For a short moment I thought it is initialized in |
|
This issue had also been tackled in #14013, but came to the same issues. I thought for RTT we should have features exposing But then how to configure it? So far it's compile-time, so conflict between configurations should be caught, for OpenWSN I set the highest possible speed, and for a lot of platforms, I made the So to summarize:
|
|
In any case it makes a lot of sense to keep this discussion in a single place. anyone objecting to close this PR and continue discussion in #14013? |
|
ok then :-) closing in favor of #14013 |
Contribution description
For
ZTIMER_MSECwe have currently a slightly screwed situation, where every (or at least many) modules that use that timer try to figure out the best underlying timer for themselves, leading to duplicated dependency definitions throughout the build system. On top one can easily run into trouble when usingztimer_msecin a application, but at the same time there is no fitting ztimer backend included by any other module in the build (e.g. see #16322).So my suggested solution is to pull in
ztimer_periph_rttif available, orztimer_periph_timerotherwise in the caseztimer_msecis used.Testing procedure
Use
make info-moduleson all effected test/example applications an verify that theztimer_periph_rttandperiph_rttmodules are still included as before.Issues/PRs references
#16322 pointed towards this problem