cpu/stm32f1/include/cpu_conf.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2013 INRIA
3  * Copyright (C) 2014 Freie Universit├Ąt Berlin
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 #if defined(CPU_MODEL_STM32F103CB) || defined(CPU_MODEL_STM32F103RB)
29 #include "vendor/stm32f103xb.h"
30 #elif defined(CPU_MODEL_STM32F103RE)
31 #include "vendor/stm32f103xe.h"
32 #endif
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
42 #define CPU_DEFAULT_IRQ_PRIO (1U)
43 #define CPU_IRQ_NUMOF (60U)
44 #define CPU_FLASH_BASE FLASH_BASE
45 
51 #define FLASHPAGE_SIZE (2048U)
52 
53 #if defined(CPU_MODEL_STM32F103C8)
54 #define FLASHPAGE_NUMOF (32U)
55 #elif defined(CPU_MODEL_STM32F103CB) || defined(CPU_MODEL_STM32F103RB)
56 #define FLASHPAGE_NUMOF (64U)
57 #elif defined(CPU_MODEL_STM32F103RE)
58 #define FLASHPAGE_NUMOF (256U)
59 #endif
60 
69 void cpu_clock_scale(uint32_t source, uint32_t target, uint32_t *prescale);
70 
71 #ifdef __cplusplus
72 }
73 #endif
74 
75 #endif /* CPU_CONF_H */
76 
Common CPU definitione for Cortex-M family based MCUs.
void cpu_clock_scale(uint32_t source, uint32_t target, uint32_t *prescale)
Configure the CPU's clock system.