You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Kernel namespace implements functions to read RTOS information. Currently it implements one function to read the current RTOS kernel millisecond tick count.
Copy file name to clipboardExpand all lines: docs/reference/api/rtos/rtos.md
+12-4Lines changed: 12 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,20 @@
1
1
<h2id="rtos-api">RTOS overview</h2>
2
2
3
-
The Arm Mbed RTOS is a C++ wrapper over the Keil RTX code. For more information about Keil RTX, check [the Keil CMSIS-RTOS tutorial](https://github.com/ARM-software/CMSIS/raw/master/CMSIS/Documentation/RTX/CMSIS_RTOS_Tutorial.pdf) and [the element14 introduction to Keil RTX](https://www.element14.com/community/docs/DOC-46650/l/arm-keil-rtx-real-time-operating-system-overview). You can use these resources as a general introduction to RTOS principles; it is important to be familiar with the concepts behind an RTOS in order to understand this guide.
3
+
The Arm Mbed RTOS is a wrapper over the Keil RTX code. The wrapper provides C++ abstraction for RTX objects like thread, synchronization objects and timer. It also provides interfaces for attaching application
4
+
specific idle hook function and to read the tick count from OS. The Arm Mbed RTOS layer also implements handlers for RTX errors and report them into Mbed-OS error handling system using Mbed-OS defined error status.
5
+
6
+
For more information about Keil RTX, check [the Keil CMSIS-RTOS tutorial](https://github.com/ARM-software/CMSIS/raw/master/CMSIS/Documentation/RTX/CMSIS_RTOS_Tutorial.pdf) and [the element14 introduction to Keil RTX](https://www.element14.com/community/docs/DOC-46650/l/arm-keil-rtx-real-time-operating-system-overview). You can use these resources as a general introduction to RTOS principles; it is important to be familiar with the concepts behind an RTOS in order to understand this guide.
4
7
5
8
The code of the Mbed RTOS can be found in the [`mbed-os`](https://github.com/ARMmbed/mbed-os) repository, in the [RTOS subdirectory](https://github.com/ARMmbed/mbed-os/tree/master/rtos). See [the Doxygen](https://os-doc-builder.test.mbed.com/docs/development/mbed-os-api-doxy/group__rtos.html) for more information.
6
9
7
-
#### SysTick
10
+
#### RTOS Ticker
11
+
Platforms using RTOS, including Mbed OS, need a mechanism for counting the time and scheduling tasks. This is usually done by a timer which generates periodic interrupts and is called system tick timer.
12
+
Under Mbed OS, we call this mechanism RTOS ticker.
8
13
9
-
System tick timer (SysTick) is a standard timer available on most Cortex-M cores. Its main purpose is to raise an interrupt with set frequency (usually 1ms). You can use it to perform any task in the system, but for platforms using RTOS, including Mbed OS, it provides an interval for the OS for counting the time and scheduling tasks.
14
+
SysTick is a standard timer available on most Cortex-M cores. Its main purpose is to raise an interrupt with set frequency (usually 1ms). In addition, many Mbed OS platforms
15
+
implement timers as part of peripherals. Mbed OS supports using SysTick or the peripheral timers as RTOS ticker.
10
16
11
-
Mbed OS uses default SysTick source for most targets, but you can override that using the [Tick API](http://arm-software.github.io/CMSIS_5/RTOS2/html/group__CMSIS__RTOS__TickAPI.html) that CMSIS-RTOS2 provides. In which case you'll need to provide your own source of the interrupts.
17
+
Mbed OS platforms uses SysTick as the default RTOS ticker, but if you want to use one of the peripheral timers as your RTOS ticker you can do so by overriding the default SysTick timer using the [Tick API](http://arm-software.github.io/CMSIS_5/RTOS2/html/group__CMSIS__RTOS__TickAPI.html) that CMSIS-RTOS2 provides. For example, see [Low Power Ticker](/docs/development/reference/low-power-ticker.html) on how to use external low power timer to perform power efficient timing operations that only requires millisecond accuracy.
12
18
13
19
#### RTOS APIs
14
20
@@ -23,6 +29,8 @@ The RTOS APIs handle creation and destruction of threads in Arm Mbed OS 5, as we
23
29
-[RtosTimer](/docs/development/reference/rtostimer.html): A deprecated class used to control timer functions in the system.
24
30
-[EventFlags](/docs/development/reference/eventflags.html): An event channel that provides a generic way of notifying other threads about conditions or events.
25
31
-[Event](/docs/development/reference/event.html): The queue to store events, extract them and excute them later.
32
+
-[ConditionVariable](/docs/development/reference/conditionvariable.html): The ConditionVariable class provides a mechanism to safely wait for or signal state changes.
33
+
-[Kernel](/docs/development/reference/kernel.html): Kernel namespace implements functions to control or read RTOS information like tick count.
0 commit comments