cpu.h File Reference

Basic definitions for the Cortex-M common module. More...

Detailed Description

Basic definitions for the Cortex-M common module.

When ever you want to do something hardware related, that is accessing MCUs registers, just include this file. It will then make sure that the MCU specific headers are included.

Author
Stefan Pfeiffer stefa.nosp@m.n.pf.nosp@m.eiffe.nosp@m.r@fu.nosp@m.-berl.nosp@m.in.d.nosp@m.e
Hauke Petersen hauke.nosp@m..pet.nosp@m.ersen.nosp@m.@fu-.nosp@m.berli.nosp@m.n.de
Joakim NohlgÄrd joaki.nosp@m.m.no.nosp@m.hlgar.nosp@m.d@ei.nosp@m.stec..nosp@m.se
Todo:
remove include irq.h once core was adjusted

Definition in file cpu.h.

#include <stdio.h>
#include "irq.h"
#include "sched.h"
#include "thread.h"
#include "cpu_conf.h"
+ Include dependency graph for cpu.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define STACK_CANARY_WORD   (0xE7FEE7FEu)
 Interrupt stack canary value. More...
 
#define PROVIDES_PM_SET_LOWEST
 All Cortex-m-based CPUs provide pm_set_lowest. More...
 
#define CORTEXM_SCB_CPACR_FPU_ACCESS_FULL   (0x00f00000)
 Pattern to write into the co-processor Access Control Register to allow full FPU access. More...
 

Functions

void cpu_init (void)
 Initialization of the CPU.
 
void cortexm_init (void)
 Initialize Cortex-M specific core parts of the CPU. More...
 
static void cortexm_init_fpu (void)
 Initialize Cortex-M FPU. More...
 
void cortexm_init_isr_priorities (void)
 Initialize Cortex-M interrupt priorities. More...
 
void cortexm_init_misc (void)
 Initialize Cortex-M misc functions. More...
 
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...
 
static void cpu_jump_to_image (uint32_t image_address)
 Jumps to another image in flash. More...
 
bool cpu_check_address (volatile const char *address)
 Checks is memory address valid or not. More...