ARM Cortex-M common

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

Detailed Description


file  bit.h
 Bit access macros for Cortex-M based CPUs.
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.


 Interrupt stack canary value. More...


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 cortexm_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


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

◆ cortexm_isr_end()

static void cortexm_isr_end ( void  )

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

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

◆ cortexm_sleep()

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

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

◆ cortexm_sleep_until_event()

static void cortexm_sleep_until_event ( void  )

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.