-
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
cpu: native: fix native timer_set_absolute() #4585
cpu: native: fix native timer_set_absolute() #4585
Conversation
Might fix #4513. |
With this fix I was able to run the unittests @kaspar030 could you also provide a backport to the release branch? |
verified. |
ACK and go, when travis is green. |
NHDP issue is fixed in #4591. |
efa2f6c
to
d305643
Compare
|
|
||
int main(void) | ||
{ | ||
unsigned n = ITERATIONS; |
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.
ITERATIONS
is greater than 2 << 16
(which is relevant since unsigned
is uint16_t
on MSP-430 and AVR ;-))
ACK and GO as soon as @kaspar030 addressed @authmillenon's comment and travis shows green |
d305643
to
781ee87
Compare
|
Travis is green - GO |
cpu: native: fix native timer_set_absolute()
In #3344 I introduced a safeguard for native's indeterministic timers which would cause a timer with a very close absolute target time to be triggered at once in order to prevent an underflow.
Turned out that xtimer triggers this safeguard when 1. initializing the timer (setting it to 0), 2. setting an absolute target of 0xFFFFFFFF for its overflow, causing the first overflow to occur 2^32 usec too early.