C Microkernel Realtime eXecutive
Realtime Operating System for Cortex-M based microcontrollers
 
Loading...
Searching...
No Matches

Description

Routines supporting access to Cortex-M core facilities.

These routines allow kernel to perform some cricital tasks that the architecture support layer needs to be able to execute in order to support CMRX on Cortex-M.

Macros

#define ALWAYS_INLINE   __STATIC_FORCEINLINE
 

Functions

ALWAYS_INLINE void __ISR_return ()
 Perform same actions as normal ISR return does.
 
ALWAYS_INLINE void * save_context ()
 Save application context.
 
ALWAYS_INLINE void load_context (uint32_t *sp)
 Load application context saved by save_context from address sp.
 

Macro Definition Documentation

◆ ALWAYS_INLINE

#define ALWAYS_INLINE   __STATIC_FORCEINLINE

Function Documentation

◆ __ISR_return()

ALWAYS_INLINE void __ISR_return ( )

Perform same actions as normal ISR return does.

When ISR performs return, then Cortex-M core does some specific steps to exit the ISR and return into thread whose execution has been interrupted. The ISR frame stored in thread stack is loaded back into registers. Perform the same steps.

◆ load_context()

ALWAYS_INLINE void load_context ( uint32_t *  sp)

Load application context saved by save_context from address sp.

Parameters
spaddress where top of the stack containing application context is

◆ save_context()

ALWAYS_INLINE void * save_context ( )

Save application context.

This function will grab process SP This operation will claim 32 bytes (8 registers * 4 bytes) on stack.

Returns
top of application stack after application context was saved