From 9f95ff5b6ba01db09552b84a0ab79607060a2666 Mon Sep 17 00:00:00 2001 From: Ali Labbene Date: Wed, 11 Dec 2019 08:59:21 +0100 Subject: Official ARM version: v5.4.0 Add CMSIS V5.4.0, please refer to index.html available under \docs folder. Note: content of \CMSIS\Core\Include has been copied under \Include to keep the same structure used in existing projects, and thus avoid projects mass update Note: the following components have been removed from ARM original delivery (as not used in ST packages) - CMSIS_EW2018.pdf - .gitattributes - .gitignore - \Device - \CMSIS - \CoreValidation - \DAP - \Documentation - \DoxyGen - \Driver - \Pack - \RTOS\CMSIS_RTOS_Tutorial.pdf - \RTOS\RTX - \RTOS\Template - \RTOS2\RTX - \Utilities - All ARM/GCC projects files are deleted from \DSP, \RTOS and \RTOS2 Change-Id: Ia026c3f0f0d016627a4fb5a9032852c33d24b4d3 --- .../html/group__rtx5__specific__functions.html | 265 +++++++++++++++++++++ 1 file changed, 265 insertions(+) create mode 100644 docs/RTOS2/html/group__rtx5__specific__functions.html (limited to 'docs/RTOS2/html/group__rtx5__specific__functions.html') diff --git a/docs/RTOS2/html/group__rtx5__specific__functions.html b/docs/RTOS2/html/group__rtx5__specific__functions.html new file mode 100644 index 0000000..be6d83d --- /dev/null +++ b/docs/RTOS2/html/group__rtx5__specific__functions.html @@ -0,0 +1,265 @@ + + + + + +Functions +CMSIS-RTOS2: Functions + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
CMSIS-RTOS2 +  Version 2.1.3 +
+
Real-Time Operating System: API and RTX Reference Implementation
+
+
+ +
+
    + +
+
+ + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+ + +
+
+ +

RTX5 functions. +More...

+ + + + + + + + +

+Functions

uint32_t osRtxErrorNotify (uint32_t code, void *object_id)
 OS Error Callback function. More...
 
void osRtxIdleThread (void *argument)
 OS Idle Thread. More...
 
+

Description

+

Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
uint32_t osRtxErrorNotify (uint32_t code,
void * object_id 
)
+
+
Parameters
+ + + +
[in]codeThe code to identify the error condition.
[in]object_idA reference to any RTX object to identify the object that caused the issue, can be NULL.
+
+
+

Some system error conditions can be detected during runtime. If the RTX kernel detects a runtime error, it calls the runtime error function osRtxErrorNotify for an object specified by parameter object_id.

+

The parameter code passes the actual error code to this function:

+ + + + + + + + + + + + + +
Error Code Description
osRtxErrorStackUnderflow Stack overflow detected for thread (thread_id=object_id)
osRtxErrorISRQueueOverflow ISR Queue overflow detected when inserting object (object_id)
osRtxErrorTimerQueueOverflow User Timer Callback Queue overflow detected for timer (timer_id=object_id)
osRtxErrorClibSpace Standard C/C++ library libspace not available: increase OS_THREAD_LIBSPACE_NUM
osRtxErrorClibMutex Standard C/C++ library mutex initialization failed
+

The function osRtxErrorNotify must contain an infinite loop to prevent further program execution. You can use an emulator to step over the infinite loop and trace into the code introducing a runtime error. For the overflow errors this means you need to increase the size of the object causing an overflow.

+

Code Example

+
#include "rtx_os.h"
+
+
uint32_t osRtxErrorNotify (uint32_t code, void *object_id) {
+
(void)object_id;
+
+
switch (code) {
+ +
// Stack overflow detected for thread (thread_id=object_id)
+
break;
+ +
// ISR Queue overflow detected when inserting object (object_id)
+
break;
+ +
// User Timer Callback Queue overflow detected for timer (timer_id=object_id)
+
break;
+ +
// Standard C/C++ library libspace not available: increase OS_THREAD_LIBSPACE_NUM
+
break;
+ +
// Standard C/C++ library mutex initialization failed
+
break;
+
default:
+
break;
+
}
+
for (;;) {}
+
//return 0U;
+
}
+
+
+
+ +
+
+ + + + + + + + +
void osRtxIdleThread (void * argument)
+
+
Parameters
+ + +
[in]argumentUnused parameter, always set to NULL.
+
+
+

The function osRtxIdleThread is executed by the RTX kernel when no other threads are ready to run.

+

By default, this thread is an empty end-less loop that does nothing. It only waits until another task becomes ready to run. You may change the code of the osRtxIdleThread function to put the CPU into a power-saving or idle mode, see Tick-less Low-Power Operation.

+

The default stack size for this thread is defined in the file RTX_Config.h. Refer to Thread Configuration.

+
Attention
The idle thread should never be blocked nor terminated! Do not call +and do not return from this function when providing a user defined implementation.
+

Code Example

+
#include "rtx_os.h"
+
+
__NO_RETURN void osRtxIdleThread (void *argument) {
+
(void)argument;
+
+
for (;;) {}
+
}
+
+
+
+
+
+ + + + -- cgit