cpu/stm32f0/include/cpu_conf.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016 Freie Universit├Ąt Berlin
3  * 2016 Inria
4  *
5  * This file is subject to the terms and conditions of the GNU Lesser General
6  * Public License v2.1. See the file LICENSE in the top level directory for more
7  * details.
8  */
9 
23 #ifndef CPU_CONF_H
24 #define CPU_CONF_H
25 
26 #include "cpu_conf_common.h"
27 
28 #ifdef CPU_MODEL_STM32F051R8
29 #include "vendor/stm32f051x8.h"
30 #endif
31 #ifdef CPU_MODEL_STM32F091RC
32 #include "vendor/stm32f091xc.h"
33 #endif
34 #ifdef CPU_MODEL_STM32F072RB
35 #include "vendor/stm32f072xb.h"
36 #endif
37 #ifdef CPU_MODEL_STM32F070RB
38 #include "vendor/stm32f070xb.h"
39 #endif
40 #ifdef CPU_MODEL_STM32F030R8
41 #include "vendor/stm32f030x8.h"
42 #endif
43 #ifdef CPU_MODEL_STM32F042K6
44 #include "vendor/stm32f042x6.h"
45 #endif
46 #ifdef CPU_MODEL_STM32F031K6
47 #include "vendor/stm32f031x6.h"
48 #endif
49 #ifdef __cplusplus
50 extern "C" {
51 #endif
52 
57 #define CPU_DEFAULT_IRQ_PRIO (1U)
58 #if defined(CPU_MODEL_STM32F030R8)
59 #define CPU_IRQ_NUMOF (29U)
60 #elif defined(CPU_MODEL_STM32F031K6)
61 #define CPU_IRQ_NUMOF (28U)
62 #elif defined(CPU_MODEL_STM32F051R8) || defined(CPU_MODEL_STM32F091RC)
63 #define CPU_IRQ_NUMOF (31U)
64 #else /* CPU_MODEL_STM32F042K6, CPU_MODEL_STM32F070RB, CPU_MODEL_STM32F072RB */
65 #define CPU_IRQ_NUMOF (32U)
66 #endif
67 
77 #if defined(CPU_MODEL_STM32F091RC) || defined(CPU_MODEL_STM32F072RB)
78 #define FLASHPAGE_SIZE (2048U)
79 #elif defined(CPU_MODEL_STM32F051R8) || defined(CPU_MODEL_STM32F042K6) \
80  || defined(CPU_MODEL_STM32F070RB) || defined(CPU_MODEL_STM32F030R8)
81 #define FLASHPAGE_SIZE (1024U)
82 #endif
83 
84 #if defined(CPU_MODEL_STM32F091RC)
85 #define FLASHPAGE_NUMOF (128U)
86 #elif defined(CPU_MODEL_STM32F051R8) || defined(CPU_MODEL_STM32F072RB) \
87  || defined(CPU_MODEL_STM32F030R8) || defined(CPU_MODEL_STM32F070RB)
88 #define FLASHPAGE_NUMOF (64U)
89 #elif defined(CPU_MODEL_STM32F042K6)
90 #define FLASHPAGE_NUMOF (32U)
91 #endif
92 
94 #ifdef __cplusplus
95 }
96 #endif
97 
98 #endif /* CPU_CONF_H */
99 
Common CPU definitione for Cortex-M family based MCUs.