cpu/nrf52/include/cpu_conf.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016 Freie Universit├Ąt Berlin
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
20 #ifndef CPU_CONF_H
21 #define CPU_CONF_H
22 
23 #include "cpu_conf_common.h"
24 
25 #ifdef CPU_MODEL_NRF52832XXAA
26 #include "vendor/nrf52.h"
27 #include "vendor/nrf52_bitfields.h"
28 #elif defined(CPU_MODEL_NRF52840XXAA)
29 #include "vendor/nrf52840.h"
30 #include "vendor/nrf52840_bitfields.h"
31 #else
32 #error "The CPU_MODEL of your board is currently not supported"
33 #endif
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
43 #define CPU_DEFAULT_IRQ_PRIO (2U)
44 #define CPU_FLASH_BASE (0x00000000)
45 #ifdef CPU_MODEL_NRF52832XXAA
46 #define CPU_IRQ_NUMOF (38U)
47 #elif CPU_MODEL_NRF52840XXAA
48 #define CPU_IRQ_NUMOF (46U)
49 #endif
50 
56 #define FLASHPAGE_SIZE (4096U)
57 
58 #if defined(CPU_MODEL_NRF52832XXAA)
59 #define FLASHPAGE_NUMOF (128U)
60 #elif defined(CPU_MODEL_NRF52840XXAA)
61 #define FLASHPAGE_NUMOF (256U)
62 #endif
63 
69 #ifdef SOFTDEVICE_PRESENT
70 #ifndef DONT_OVERRIDE_NVIC
71 #include "nrf_soc.h"
72 #undef NVIC_SetPriority
73 #define NVIC_SetPriority sd_nvic_SetPriority
74 #endif /* DONT_OVERRIDE_NVIC */
75 #endif /* SOFTDEVICE_PRESENT */
76 
78 #ifdef __cplusplus
79 }
80 #endif
81 
82 #endif /* CPU_CONF_H */
83 
Common CPU definitione for Cortex-M family based MCUs.