summaryrefslogtreecommitdiff
path: root/core/cortex-m0/cpu.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/cortex-m0/cpu.h')
-rw-r--r--core/cortex-m0/cpu.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/cortex-m0/cpu.h b/core/cortex-m0/cpu.h
index ac184090f9..c30095fd65 100644
--- a/core/cortex-m0/cpu.h
+++ b/core/cortex-m0/cpu.h
@@ -38,6 +38,14 @@
#define CPU_NVIC_CCR_UNALIGN_TRAP BIT(3)
+/* Bitfield values for EXC_RETURN. */
+#define EXC_RETURN_SPSEL_MASK BIT(2)
+#define EXC_RETURN_SPSEL_MSP 0
+#define EXC_RETURN_SPSEL_PSP BIT(2)
+#define EXC_RETURN_MODE_MASK BIT(3)
+#define EXC_RETURN_MODE_HANDLER 0
+#define EXC_RETURN_MODE_THREAD BIT(3)
+
/* Set up the cpu to detect faults */
void cpu_init(void);