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. | |
#define ALWAYS_INLINE __STATIC_FORCEINLINE |
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.
ALWAYS_INLINE void load_context | ( | uint32_t * | sp | ) |
Load application context saved by save_context from address sp.
sp | address where top of the stack containing application context is |
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.