Skip to content

Make event queue use RTOS tick count #6693

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

Merged
merged 1 commit into from
Apr 27, 2018
Merged

Conversation

kjbracey
Copy link
Contributor

@kjbracey kjbracey commented Apr 20, 2018

Description

Event queue was using its own Timer or LowPowerTimer objects to derive millisecond tick counts. This is unnecessary in RTOS builds, where the RTOS is maintaining a tick count.

It also makes more sense to use the actual RTOS tick count, as the values are being used to compute tick timeouts for RTOS calls. Computing these RTOS tick delays with a separate timer could conceivably lead to rounding errors.

Fixes: #5378
See also: #6653 and #6698

Pull request type

[ ] Fix
[X] Refactor
[ ] New target
[ ] Feature
[ ] Breaking change

@kjbracey kjbracey requested a review from geky April 20, 2018 08:42
@kjbracey
Copy link
Contributor Author

FYI @kivaisan

Event queue was using its own Timer or LowPowerTimer objects to derive
millisecond tick counts. This is unnecessary in RTOS builds, where the
RTOS is maintaining a tick count.

It also makes more sense to use the actual RTOS tick count, as the
values are being used to compute tick timeouts for RTOS calls. Computing
these RTOS tick delays with a separate timer could conceivably lead to
rounding errors.

Fixes: ARMmbed#5378
@@ -23,7 +23,7 @@
"value": 256
},
"use-lowpower-timer-ticker": {
"help": "Enable use of low power timer and ticker classes. May reduce the accuracy of the event queue.",
"help": "Enable use of low power timer and ticker classes in non-RTOS builds. May reduce the accuracy of the event queue. In RTOS builds, the RTOS tick count is used, and this configuration option has no effect.",
Copy link
Contributor

@geky geky Apr 20, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So is there a "lowpower timer" option for the RTOS? (@bulislaw?)

If so we should probably note that here

@geky
Copy link
Contributor

geky commented Apr 20, 2018

@MikeDK fyi

Copy link
Contributor

@geky geky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 25, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Apr 25, 2018

Build : SUCCESS

Build number : 1851
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/6693/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build
/morph mbed2-build

@mbed-ci
Copy link

mbed-ci commented Apr 25, 2018

@mbed-ci
Copy link

mbed-ci commented Apr 25, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants