-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Relax us ticker frequency requirement + test update #11157
Conversation
This change is required by the Samsung S111(S5JS100). On this board timer clock used for us ticker operates at 26MHz. According to current requirements, 8 MHz is the top limit for us ticker timer. This change relaxes top limit to 100 MHz, but only for 32-bit timers. Ticker common layer schedules one interrupt per timer rollover to trace elapsed time. We need to ensure that this operation is not performed too frequently. I.e. in case of 16-bit timer at 32 MHz, the timer rollover will happen after ~2 ms. This may cause that there will be no time for other tasks. That is why we increase the top limit, but only for 32-bit timers.
Updated documentation: PR ARMmbed/mbed-os-5-docs#1123. |
CI started |
Test run: FAILEDSummary: 1 of 4 test jobs failed Failed test jobs:
|
@0xc0170 Looks not related. |
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.
Recent optimisations in #10609 were relying on the current limits.
But as long as this limit is only lifted for wide timers, I believe it doesn't break that. Maybe you could double-check - see _us_is_small_enough
macro in mbed_wait_api.h.
(I can imagine this being relaxed a bit more in future - maybe it isn't specific to 32-bit, maybe it could be a combined check of width+speed to ensure wrap time is greater than 8ms.)
Will restart tests once we have 5.13.3 RC tested |
CI restarted |
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
@kjbracey-arm Thanks for the review. Previously the worst case was for 16 bit counter @ 8 MHz. In this case, we have a rollover after ~ 8ms. |
Description
This change is required by the Samsung S111(S5JS100). On this board timer clock used for us ticker operates at 26MHz.
According to current requirements, 8 MHz is the top limit for us ticker timer.
This change relaxes top limit to 100 MHz, but only for 32-bit timers.
Ticker common layer schedules one interrupt per timer rollover to trace elapsed time. We need to ensure that this operation is not performed too frequently. I.e. in case of 16-bit timer at 32 MHz, the timer rollover will happen after ~2 ms. This may cause that there will be no time for other tasks. That is why we increase the top limit, but only for 32-bit timers.
Pull request type
Reviewers
@bulislaw @jamesbeyond @fkjagodzinski @maciejbocianski