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 #define CPU_IRQ_NUMOF (31U)
59 
69 #if defined(CPU_MODEL_STM32F091RC) || defined(CPU_MODEL_STM32F072RB)
70 #define FLASHPAGE_SIZE (2048U)
71 #elif defined(CPU_MODEL_STM32F051R8) || defined(CPU_MODEL_STM32F042K6) \
72  || defined(CPU_MODEL_STM32F070RB) || defined(CPU_MODEL_STM32F030R8)
73 #define FLASHPAGE_SIZE (1024U)
74 #endif
75 
76 #if defined(CPU_MODEL_STM32F091RC)
77 #define FLASHPAGE_NUMOF (128U)
78 #elif defined(CPU_MODEL_STM32F051R8) || defined(CPU_MODEL_STM32F072RB) \
79  || defined(CPU_MODEL_STM32F030R8) || defined(CPU_MODEL_STM32F070RB)
80 #define FLASHPAGE_NUMOF (64U)
81 #elif defined(CPU_MODEL_STM32F042K6)
82 #define FLASHPAGE_NUMOF (32U)
83 #endif
84 
86 #ifdef __cplusplus
87 }
88 #endif
89 
90 #endif /* CPU_CONF_H */
91 
Common CPU definitione for Cortex-M family based MCUs.