The friendly Operating System for the Internet of Things
ARM Cortex-M common

Common implementations and headers for Cortex-M family based micro-controllers. More...

Detailed Description

Files

file  cortexm_common/include/cpu.h
 Basic definitions for the Cortex-M common module.
 
file  cpu_conf_common.h
 Common CPU definitione for Cortex-M family based MCUs.
 
file  mpu.h
 Cortex-M Memory Protection Unit (MPU) Driver Header File.
 
file  vectors_cortexm.h
 Default interrupt vectors shared by Cortex-M based CPUs.
 

Macros

#define STACK_CANARY_WORD   (0xE7FEE7FEu)
 Interrupt stack canary value. More...
 

Functions

void cpu_init (void)
 Initialization of the CPU.
 
void cortexm_init (void)
 Initialize Cortex-M specific core parts of the CPU.
 
static void cpu_print_last_instruction (void)
 Prints the current content of the link register (lr)
 
static void cpu_sleep_until_event (void)
 Put the CPU into the 'wait for event' sleep mode. More...
 
static void cortexm_sleep (int deep)
 Put the CPU into (deep) sleep mode, using the WFI instruction. More...
 
static void cortexm_isr_end (void)
 Trigger a conditional context scheduler run / context switch. More...
 

Macro Definition Documentation

#define STACK_CANARY_WORD   (0xE7FEE7FEu)
Note
0xe7fe is the ARM Thumb machine code equivalent of asm("bl #-2\n") or 'while (1);', i.e. an infinite loop.

Definition at line 51 of file cortexm_common/include/cpu.h.

Function Documentation

static void cortexm_isr_end ( void  )
inlinestatic

This function is supposed to be called in the end of each ISR.

Definition at line 110 of file cortexm_common/include/cpu.h.

static void cortexm_sleep ( int  deep)
inlinestatic
Parameters
[in]deep!=0 for deep sleep, 0 for light sleep

Definition at line 89 of file cortexm_common/include/cpu.h.

static void cpu_sleep_until_event ( void  )
inlinestatic

This function is meant to be used for short periods of time, where it is not feasible to switch to the idle thread and back.

Definition at line 79 of file cortexm_common/include/cpu.h.