-
Notifications
You must be signed in to change notification settings - Fork 2k
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
cc2538: fix xtimer #6692
cc2538: fix xtimer #6692
Conversation
I'm trying to test in a cc2538dk board applying the same modifications without success... Why it should only work for remote boards? |
mhm, I'm unsure as well - because I was pretty sure I tested various settings yesterday, including 16Bit with 1MHz and it didn't work. However, today it worked 😕 |
I think we have cc2538dk here, too - so I'll try to test that, too |
|
I confirm that both tests are also not running on my cc2538dk. |
I just tested all xtimer tests and no one worked. I have a remote-reva. |
oops, during my debugging and tests session I found that only the cc2538 was missing the Please test again @PeterKietzmann, @kYc0o, and @A-Paul ! |
I think this was caused when the old |
to give a bit more rational on why |
@@ -0,0 +1 @@ | |||
FEATURES_PROVIDED += periph_pm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unrelated?!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NO its one essential part of the fix! Read my explanation above, otherwise everything gets stuck in idle thread. I could make a separate PR for this, but its already a commit and as said its part of the fix.
I ran |
23010dd
to
e0f7a28
Compare
On cc2538dk all tests/xtimer_* look good now. |
e0f7a28
to
40431fe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK. All xtimer tests passed.
Jenkins fails unrelated and both Murdocks succeeded. ACK and go |
finally 🎉 |
Thanks @smlng ! |
#define XTIMER_SHIFT (4) | ||
#define XTIMER_HZ (16000000UL) | ||
#define XTIMER_SHIFT (0) | ||
#define XTIMER_HZ (10000000UL) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're sure this has to be ten times higher than on the other boards?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was already fixed before merge! Reload the page and have another look?
This PR fixes #6419, at least for me.
It basically reverts xtimer configuration introduces in #5608, and resets XTIMER_SHIFT to 0 and XTIMER_HZ 1000000 (1 MHz). I have to admit, I'm not sure why this helps, but it does. In the last days I made extensive tests using the hardware timer and xtimer.
The cc2538 has 4 timers each can be configured in 16Bit mode with 2 channels and 32 Bit mode with 1 channel. For the latter only a frequency of 16 MHz is allowed, as prescaler is only available in 16 Bit mode. However, using 16Bit timer with 16Mhz or a 32Bit timer with 16 MHz the tests
xtimer_drift
andxtimer_periodic_wakeup
always fail, andxtimer_usleep
for 16Bit + 16MHz, too. All tests succeeded when using a 16 Bit timer with 1 MHz (which is the old setting).Can someone please confirm?