Concrete implementation of IPlatform driver for the Arm Cortex-M0, M3, M4, M7 processors.
More...
#include <stk_arch_arm-cortex-m.h>
Concrete implementation of IPlatform driver for the Arm Cortex-M0, M3, M4, M7 processors.
Definition at line 24 of file stk_arch_arm-cortex-m.h.
◆ ~PlatformArmCortexM()
| stk::PlatformArmCortexM::~PlatformArmCortexM |
( |
| ) |
|
|
inline |
◆ GetCallerSP()
| Word stk::PlatformArmCortexM::GetCallerSP |
( |
| ) |
const |
|
virtual |
Get caller's Stack Pointer (SP).
- Note
- Valid for a Thread process only.
- Returns
- Current value of the Stack Pointer (SP) of the calling process.
Implements stk::IPlatform.
◆ GetTickResolution()
| uint32_t stk::PlatformArmCortexM::GetTickResolution |
( |
| ) |
const |
|
virtual |
Get resolution of the system tick timer in microseconds. Resolution means a number of microseconds between system tick timer ISRs.
- Returns
- Microseconds.
Implements stk::IPlatform.
◆ GetTid()
| TId stk::PlatformArmCortexM::GetTid |
( |
| ) |
const |
|
virtual |
◆ Initialize()
Initialize scheduler's context.
- Parameters
-
| [in] | event_handler | Event handler. |
| [in] | service | Kernel service. |
| [in] | resolution_us | Tick resolution in microseconds (for example 1000 equals to 1 millisecond resolution). |
| [in] | exit_trap | Stack of the Exit trap (optional, provided if kernel is operating in KERNEL_DYNAMIC mode). |
- Note
- Must be called once before Start().
Implements stk::IPlatform.
◆ InitStack()
Initialize stack memory of the user task.
- Parameters
-
| [in] | stack_type | Stack type. |
| [in] | stack | Stack descriptor. |
| [in] | stack_memory | Stack memory. |
| [in] | user_task | User task to which Stack belongs. |
- Returns
true on success, false if the stack memory is too small, misaligned, or the stack type is unsupported.
Implements stk::IPlatform.
◆ ProcessHardFault()
| void stk::PlatformArmCortexM::ProcessHardFault |
( |
| ) |
|
|
virtual |
◆ ProcessTick()
| void stk::PlatformArmCortexM::ProcessTick |
( |
| ) |
|
|
virtual |
Process one tick.
- Note
- Normally system tick is processed by the platform driver implementation. In case system tick handler is used by the application and should not be implemented by the driver then disable driver's handler in stk_config.h like this:
#define STK_SYSTICK_HANDLER _STK_SYSTICK_HANDLER_DISABLE
and then call ProcessTick() from your custom tick handler.
Implements stk::IPlatform.
◆ SetEventOverrider()
| void stk::PlatformArmCortexM::SetEventOverrider |
( |
IEventOverrider * | overrider | ) |
|
|
virtual |
Set platform event overrider.
- Note
- Must be set prior call to IKernel::Start.
- Parameters
-
| [in] | overrider | Platform event overrider. |
Implements stk::IPlatform.
◆ Sleep()
| void stk::PlatformArmCortexM::Sleep |
( |
Timeout | ticks | ) |
|
|
virtual |
Put calling process into a sleep state.
- Note
- Unlike Delay this function does not waste CPU cycles and allows kernel to put CPU into a low-power state.
- Parameters
-
| [in] | ticks | Time to sleep (ticks). |
Implements stk::IPlatform.
◆ SleepUntil()
| void stk::PlatformArmCortexM::SleepUntil |
( |
Ticks | timestamp | ) |
|
|
virtual |
Put calling process into a sleep state until the specified timestamp.
- Note
- Unlike Delay this function does not waste CPU cycles and allows kernel to put CPU into a low-power state.
-
Unsupported in HRT mode (see stk::KERNEL_HRT); in HRT mode tasks sleep automatically according to their periodicity and workload.
- Parameters
-
| [in] | timestamp | Absolute timestamp (ticks). |
- Warning
- ISR-unsafe. Calling from an ISR context is not permitted and will trigger an assertion.
Implements stk::IPlatform.
◆ Start()
| void stk::PlatformArmCortexM::Start |
( |
| ) |
|
|
virtual |
Start scheduling.
- Note
- This function never returns if kernel is initialized as KERNEL_STATIC. Must be called after Initialize().
Implements stk::IPlatform.
◆ Stop()
| void stk::PlatformArmCortexM::Stop |
( |
| ) |
|
|
virtual |
◆ SwitchToNext()
| void stk::PlatformArmCortexM::SwitchToNext |
( |
| ) |
|
|
virtual |
◆ Wait()
The documentation for this class was generated from the following file: