-
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
boards/nucle-f0xx: fixed timer configuration #6494
Conversation
nucelo-l091 still doesn't work. Which platform did you use for testing? |
|
I did not touch anything for the |
Does tests/xtimer_uslep and tests/xtimer_drift proceed on the |
will fix this |
done |
* @{ | ||
*/ | ||
#define XTIMER_WIDTH (16) | ||
#define XTIMER_WIDTH (16) |
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.
It picky but why tab?
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.
copy paste
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.
Was this addressed?
test/xtimer_usleep seems ok. tests/xtimer_drift seems of for the first 105 seconds and then floods the console with outputs (didn't go into details, is it intended in this test??). tests/xtimer_longterm acts a bit weird. Look at the following ouput. The first "1min" notification comes after 2 minutes and the second "1min" comes at the same time (after 2 minutes as intended). The third "1min" notification comes in time,. After the first "3min" notification is seems as if some "1min" ticks are lost.
|
seems like this has something to do with the xtimer configuration. But I must say, I have never understood how to anticipate the correct values for this... |
Neither did I :-(. I already assumed xtimer config problems in #6419. Maybe @kaspar030 can have a brief look at this? |
I didn't test on other nucleo boards but at least on nucleo-f091 it gaves me impressive results: 2017-01-31 23:14:21,261 - INFO # main(): This is RIOT! (Version: 2017.04-devel-2-g57948-snake.local-pr/stm32f0_timers)
2017-01-31 23:14:21,263 - INFO # xtimer long-term test
2017-01-31 23:14:21,268 - INFO # Refer to the README to get information on the expected output.
2017-01-31 23:14:21,271 - INFO # sleep -- 18min -- 0 ticks since
2017-01-31 23:14:21,274 - INFO # sleep -- 5min -- 0 ticks since
2017-01-31 23:15:21,227 - INFO # TICK -- 1min
2017-01-31 23:16:21,229 - INFO # TICK -- 1min
2017-01-31 23:17:21,230 - INFO # TICK -- 1min
2017-01-31 23:17:21,281 - INFO # msg -- 3min -- 3 ticks since
2017-01-31 23:18:21,232 - INFO # TICK -- 1min
2017-01-31 23:19:21,233 - INFO # TICK -- 1min
2017-01-31 23:19:21,285 - INFO # sleep -- 5min -- 5 ticks since
2017-01-31 23:20:21,302 - INFO # TICK -- 1min
2017-01-31 23:20:21,355 - INFO # msg -- 3min -- 3 ticks since
2017-01-31 23:21:21,303 - INFO # TICK -- 1min
2017-01-31 23:22:21,305 - INFO # TICK -- 1min
2017-01-31 23:23:21,307 - INFO # TICK -- 1min
2017-01-31 23:23:21,364 - INFO # msg -- 3min -- 3 ticks since
2017-01-31 23:24:21,309 - INFO # TICK -- 1min
2017-01-31 23:24:21,363 - INFO # sleep -- 5min -- 5 ticks since
2017-01-31 23:25:21,311 - INFO # TICK -- 1min
2017-01-31 23:26:21,313 - INFO # TICK -- 1min
2017-01-31 23:26:21,373 - INFO # msg -- 3min -- 3 ticks since
2017-01-31 23:27:21,315 - INFO # TICK -- 1min
2017-01-31 23:28:21,316 - INFO # TICK -- 1min
2017-01-31 23:28:21,368 - INFO # msg -- 14min -- 14 ticks since
2017-01-31 23:29:21,318 - INFO # TICK -- 1min
2017-01-31 23:29:21,375 - INFO # sleep -- 5min -- 5 ticks since
2017-01-31 23:29:21,381 - INFO # msg -- 3min -- 3 ticks since
2017-01-31 23:30:21,320 - INFO # TICK -- 1min
2017-01-31 23:31:21,321 - INFO # TICK -- 1min
2017-01-31 23:32:21,324 - INFO # TICK -- 1min
2017-01-31 23:32:21,371 - INFO # sleep -- 18min -- 18 ticks since
2017-01-31 23:32:21,388 - INFO # msg -- 3min -- 3 ticks since I'd say that this PR solves the problem and should be merged asap. As for @PeterKietzmann results, I think it could be related to some UART issues, which revision your board has? Do you have external oscillator? Try also to upgrade the firmware of the ST-Link part, since we (@haukepetersen and me) experienced some bug fixing by applying the update. |
I opened #6542 to keep track of this |
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.
I tested several tests: periph_rtc, xtimer_msg, xtimer_usleep on the nucleo-f0xx I have.
- nucleo-f070 => ok
- nucleo-f030 => ok
- nucleo-f091(RC) => ok
- nucleo-f072 => ok
Alles gut for me.
@miri64 why? |
Not good? Saw it was approved and the CIs were happy so why not? |
I thought there was a comment without modification. I commented above. |
That was really nitpicky (and also please if you do want it to be changed, mark it as change request ;-)) |
It was not my comment, was @PeterKietzmann, if he's OK, I have nothing to object ;-) |
Timers were broken on the nucleo-f0xx boards. The reason was a mixture of broken timer configuration and a miss-conception by the timer driver: the timer driver expects the configured timer to have exactly 4 capture compare channels. But apparently not all timers on the STM32F0s have 4 of them, some have only a single channel (e.g. TIM14), while other have 2 of them (e.g. TIM15/16/17).
This PR fixes the issue for now by choosing
TIM1
as default timer for all STM32F0 based nucleo boards.I will also open an issue for adapting the timer driver to cope with non-4-cc-channel timers...