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
Copy file name to clipboardExpand all lines: docs/reference/api/rtos/EventFlags.md
+1-5Lines changed: 1 addition & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
<spanclass="images"><span>EventFlags class hierarchy</span></span>
4
4
5
-
The EventFlags class is a C++ wrapper over the Keil RTX EventFlags functionality. The EventFlags class provides a mechanism for setting and waiting for flags. It provides a generic way of notifying other threads about conditions or events. You can think of each instance of the EventFlags class as an event channel. There are 31 different flags available for each event. For more information and implementation details, see [the Keil CMSIS-RTOS documentation](http://arm-software.github.io/CMSIS_5/RTOS2/html/group__CMSIS__RTOS__EventFlags.html).
5
+
The EventFlags class provides a mechanism for setting and waiting for specific conditions. It provides a generic way of notifying other threads about conditions or events. You can think of each instance of the EventFlags class as an event channel. There are 31 different flags available for each event.
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/RtosTimer.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@
6
6
7
7
Use the RtosTimer class to create and control timer functions in the system. A timer function is called when a time period expires, so both one-shot and periodic timers are possible. You can start, restart or stop a timer.
8
8
9
-
The thread `osTimerThread` handles timers. Callback functions run under the control of this thread and may use CMSIS-RTOS API calls.
9
+
The thread `osTimerThread` handles timers. Callback functions run under the control of this thread and may use underlying RTOS API calls.
Copy file name to clipboardExpand all lines: docs/reference/api/rtos/rtos.md
+13-22Lines changed: 13 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,18 @@
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 APIs provides C++ APIs to manage RTOS 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 handles RTOS errors and report them into Mbed-OS error handling system.
4
5
5
6
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
7
7
-
#### SysTick
8
+
#### RTOS Ticker
9
+
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.
10
+
Under Mbed OS, we call this mechanism RTOS ticker.
8
11
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.
12
+
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
13
+
implement timers as part of peripherals. Mbed OS supports using SysTick or the peripheral timers as RTOS ticker.
10
14
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.
15
+
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. 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
16
13
17
#### RTOS APIs
14
18
@@ -23,6 +27,8 @@ The RTOS APIs handle creation and destruction of threads in Arm Mbed OS 5, as we
23
27
-[RtosTimer](/docs/development/reference/rtostimer.html): A deprecated class used to control timer functions in the system.
24
28
-[EventFlags](/docs/development/reference/eventflags.html): An event channel that provides a generic way of notifying other threads about conditions or events.
25
29
-[Event](/docs/development/reference/event.html): The queue to store events, extract them and excute them later.
30
+
-[ConditionVariable](/docs/development/reference/conditionvariable.html): The ConditionVariable class provides a mechanism to safely wait for or signal state changes.
31
+
-[Kernel](/docs/development/reference/kernel.html): Kernel namespace implements functions to control or read RTOS information like tick count.
26
32
27
33
##### Default timeouts
28
34
@@ -51,21 +57,6 @@ Each `Thread` can wait for signals and be notified of events:
The CMSIS-RTOS functions will return the following statuses:
57
-
58
-
-`osOK`: function completed; no event occurred.
59
-
-`osEventSignal`: function completed; signal event occurred.
60
-
-`osEventMessage`: function completed; message event occurred.
61
-
-`osEventMail`: function completed; mail event occurred.
62
-
-`osEventTimeout`: function completed; timeout occurred.
63
-
-`osErrorParameter`: a mandatory parameter was missing or specified an incorrect object.
64
-
-`osErrorResource`: a specified resource was not available.
65
-
-`osErrorTimeoutResource`: a specified resource was not available within the timeout period.
66
-
-`osErrorISR`: the function cannot be called from interrupt service routines (ISR).
67
-
-`osErrorISRRecursive`: function called multiple times from ISR with same object.
68
-
-`osErrorPriority`: system cannot determine priority or thread has illegal priority.
69
-
-`osErrorNoMemory`: system is out of memory; it was impossible to allocate or reserve memory for the operation.
70
-
-`osErrorValue`: value of a parameter is out of range.
71
-
-`osErrorOS`: unspecified RTOS error - runtime error but no other error message fits.
60
+
##### Status and Error codes
61
+
The Arm Mbed RTOS layer handles RTOS errors and report them using Mbed-OS error handling system. See the list of error codes in [Error Handling](/docs/development/reference/error-handling.html)
0 commit comments