Skip to content
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

RTOS does not honour SystemCoreClock and related CMSIS clocking setup #25

Closed
hugovincent opened this issue Aug 13, 2013 · 1 comment
Closed

Comments

@hugovincent
Copy link

The mbed-rtos library does not use or honour SystemCoreClock and is not responsive to changes in SystemCoreClock at run time. To change the core frequency, you must first change the registers and call SystemCoreClockUpdate() mechanism, but then you must update #define OS_CLOCK in mbed-rtos/rtx/RTX_Conf_CM.c. Obviously the later can't be done by code at run time, and this makes run-time clock changes impossible. This furthermore makes the RTOS almost impossible to use in a energy-constrained application. I realise fixing this properly is non-trivial, but I would urge you to find a good solution rather than a quick one.

@emilmont
Copy link
Contributor

Reporting here Hugo's investigation:

After a bit of digging I concluded it would be a fairly major architectural change.
I’m pretty sure that supporting clock-speed changing at run time would break the
“RT” part of “RTOS” (at least hard realtime), since you can be blocked for a
nondeterministic, unbounded amount of time waiting for the PLL to re-lock.
Most RTOS’s are like this, and basically fundamentally incompatible with
low-power/low-energy regimes.

We will not implement this change to the existing mbed-rtos implementation.

Perhaps, in the future, we could consider providing a different implementation optimized for low-power.

Emilio

bridadan pushed a commit that referenced this issue Jun 21, 2016
update reference to uvisor-mbed-lib for extern patch
pan- added a commit to pan-/mbed that referenced this issue Jul 20, 2016
SeppoTakalo pushed a commit that referenced this issue Nov 9, 2016
Check validity of transaction pointer when sending data
pan- pushed a commit to pan-/mbed that referenced this issue Apr 9, 2018
generate oob at will and without passing in connection handle
evedon added a commit to evedon/mbed-os that referenced this issue Jul 5, 2019
hugueskamba pushed a commit to hugueskamba/mbed-os that referenced this issue Jul 9, 2019
hugueskamba pushed a commit to hugueskamba/mbed-os that referenced this issue Jul 9, 2019
linlingao added a commit to linlingao/mbed-os that referenced this issue Jul 12, 2019
evedon added a commit to evedon/mbed-os that referenced this issue Jul 15, 2019
pan- pushed a commit to pan-/mbed that referenced this issue May 29, 2020
Port BLE_LED from mbed classic to mbed OS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants