Zephyr API Documentation
4.1.99
A Scalable Open Source RTOS
4.1.99
Toggle main menu visibility
Main Page
Related Pages
Topics
Data Structures
Data Structures
Data Structure Index
Data Fields
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
Enumerator
Files
File List
Globals
All
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
$
a
b
c
d
f
g
h
i
k
l
m
n
o
p
r
s
t
u
x
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Macros
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
▼
Zephyr API Documentation
►
Introduction
Deprecated List
►
Topics
►
Data Structures
▼
Files
▼
File List
►
doc
►
kernel
►
lib
►
subsys
▼
zephyr
►
acpi
►
app_memory
▼
arch
►
arc
▼
arm
►
cortex_a_r
▼
cortex_m
►
arm_mpu_mem_cfg.h
►
cpu.h
►
exception.h
►
fpu.h
memory_map.h
►
nvic.h
►
mmu
►
mpu
►
arch.h
►
arch_inlines.h
asm_inline.h
►
asm_inline_gcc.h
barrier.h
error.h
exception.h
►
gdbstub.h
►
irq.h
►
misc.h
nmi.h
structs.h
►
syscall.h
thread.h
►
arm64
►
common
►
mips
►
posix
►
riscv
►
rx
►
sparc
►
x86
►
xtensa
arch_inlines.h
►
arch_interface.h
►
cache.h
cpu.h
exception.h
structs.h
syscall.h
►
audio
►
bluetooth
►
canbus
►
console
►
crypto
►
data
►
debug
►
devicetree
►
dfu
►
display
►
drivers
►
dsp
►
dt-bindings
►
fs
►
input
►
internal
►
ipc
►
kernel
►
linker
►
llext
►
logging
►
lorawan
►
math
►
mem_mgmt
►
mgmt
►
misc
►
modbus
►
modem
►
multi_heap
►
net
►
platform
►
pm
►
pmci
►
portability
►
posix
►
psa
►
random
►
retention
►
rtio
►
sd
►
sensing
►
settings
►
shell
►
sip_svc
►
stats
►
storage
►
sys
►
task_wdt
►
timing
►
toolchain
►
tracing
►
usb
►
usb_c
►
xen
►
zbus
►
zvfs
►
bindesc.h
►
cache.h
►
device.h
►
devicetree.h
►
fatal.h
►
fatal_types.h
►
init.h
►
irq.h
►
irq_multilevel.h
►
irq_nextlevel.h
►
irq_offload.h
►
kernel.h
kernel_includes.h
►
kernel_structs.h
►
kernel_version.h
►
net_buf.h
►
shared_irq.h
►
smf.h
►
spinlock.h
►
sw_isr_table.h
►
sys_clock.h
►
syscall.h
►
toolchain.h
types.h
►
Globals
•
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Modules
Pages
Loading...
Searching...
No Matches
cpu.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2015, Wind River Systems, Inc.
3
*
4
* SPDX-License-Identifier: Apache-2.0
5
*/
6
7
#ifndef _CORTEX_M_CPU_H
8
#define _CORTEX_M_CPU_H
9
10
#ifdef _ASMLANGUAGE
11
12
#define _SCS_BASE_ADDR _PPB_INT_SCS
13
14
/* ICSR defines */
15
#define _SCS_ICSR (_SCS_BASE_ADDR + 0xd04)
16
#define _SCS_ICSR_PENDSV (1 << 28)
17
#define _SCS_ICSR_UNPENDSV (1 << 27)
18
#define _SCS_ICSR_RETTOBASE (1 << 11)
19
20
#define _SCS_MPU_CTRL (_SCS_BASE_ADDR + 0xd94)
21
22
/* CONTROL defines */
23
#define _CONTROL_FPCA_Msk (1 << 2)
24
25
/* EXC_RETURN defines */
26
#define _EXC_RETURN_SPSEL_Msk (1 << 2)
27
#define _EXC_RETURN_FTYPE_Msk (1 << 4)
28
29
#else
30
#include <
stdint.h
>
31
32
#ifdef __cplusplus
33
extern
"C"
{
34
#endif
35
36
/* CP10 Access Bits */
37
#define CPACR_CP10_Pos 20U
38
#define CPACR_CP10_Msk (3UL << CPACR_CP10_Pos)
39
#define CPACR_CP10_NO_ACCESS (0UL << CPACR_CP10_Pos)
40
#define CPACR_CP10_PRIV_ACCESS (1UL << CPACR_CP10_Pos)
41
#define CPACR_CP10_RESERVED (2UL << CPACR_CP10_Pos)
42
#define CPACR_CP10_FULL_ACCESS (3UL << CPACR_CP10_Pos)
43
44
/* CP11 Access Bits */
45
#define CPACR_CP11_Pos 22U
46
#define CPACR_CP11_Msk (3UL << CPACR_CP11_Pos)
47
#define CPACR_CP11_NO_ACCESS (0UL << CPACR_CP11_Pos)
48
#define CPACR_CP11_PRIV_ACCESS (1UL << CPACR_CP11_Pos)
49
#define CPACR_CP11_RESERVED (2UL << CPACR_CP11_Pos)
50
#define CPACR_CP11_FULL_ACCESS (3UL << CPACR_CP11_Pos)
51
52
#ifdef CONFIG_PM_S2RAM
53
54
struct
__cpu_context {
55
/* GPRs are saved onto the stack */
56
uint32_t
msp;
57
uint32_t
psp;
58
uint32_t
primask;
59
uint32_t
control;
60
61
#if defined(CONFIG_ARMV7_M_ARMV8_M_MAINLINE)
62
/* Registers present only on ARMv7-M and ARMv8-M Mainline */
63
uint32_t
faultmask;
64
uint32_t
basepri;
65
#endif
/* CONFIG_ARMV7_M_ARMV8_M_MAINLINE */
66
67
#if defined(CONFIG_CPU_CORTEX_M_HAS_SPLIM)
68
/* Registers present only on certain ARMv8-M implementations */
69
uint32_t
msplim;
70
uint32_t
psplim;
71
#endif
/* CONFIG_CPU_CORTEX_M_HAS_SPLIM */
72
};
73
74
typedef
struct
__cpu_context _cpu_context_t;
75
76
#endif
/* CONFIG_PM_S2RAM */
77
78
#ifdef __cplusplus
79
}
80
#endif
81
82
#endif
/* _ASMLANGUAGE */
83
84
#endif
/* _CORTEX_M_CPU_H */
stdint.h
uint32_t
__UINT32_TYPE__ uint32_t
Definition
stdint.h:90
zephyr
arch
arm
cortex_m
cpu.h
Generated on Sat May 17 2025 21:06:22 for Zephyr API Documentation by
1.12.0