tests/periph_timer_short_relative_set: fix diff for non 32 bit timers#12856
Conversation
Don't have such a board at hand, could someone else give this a quick run? |
IoT-LAB provides quite a few of them. Is it required to have direct access to hardware to test this ? |
|
Physical access is not required so iot lab should do. Keep in mind that the expected result is that the tast will fail on that platform (refer to #12610 (comment)). |
cgundogan
left a comment
There was a problem hiding this comment.
Tested on an iotlab-m3 node with a 16-bit timer. I adjusted the interval variable in main.c to compensate for the timer width and assure that a wrap-around happens. With interval=1000 the counter goes down to 951, while this patch let's the test run down to iteration 2. ACK
Contribution description
Fixes the problem described in #12610 (comment): the diff calculation between two timestamps is not working properly for timers that are not 32 bit.
Testing procedure
Look at the code, run
/tests/periph_timer_short_relative_seton a platform with 16 bit timer (e.g. iotlab-m3).Issues/PRs references
#10493, #12610