2014-04-17 19:41:48 +02:00
|
|
|
/*
|
2016-08-29 10:55:46 +02:00
|
|
|
* Copyright (C) 2016 Freie Universität Berlin
|
|
|
|
* 2016 Inria
|
2014-04-17 19:41:48 +02:00
|
|
|
*
|
|
|
|
* This file is subject to the terms and conditions of the GNU Lesser General
|
|
|
|
* Public License v2.1. See the file LICENSE in the top level directory for more
|
|
|
|
* details.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @defgroup cpu_stm32f0 STM32F0
|
|
|
|
* @brief STM32F0 specific code
|
|
|
|
* @ingroup cpu
|
|
|
|
* @{
|
|
|
|
*
|
|
|
|
* @file
|
|
|
|
* @brief Implementation specific CPU configuration options
|
|
|
|
*
|
2017-01-19 21:45:23 +01:00
|
|
|
* @author Hauke Petersen <hauke.petersen@fu-berlin.de>
|
2016-08-29 10:55:46 +02:00
|
|
|
* @author Alexandre Abadie <alexandre.abadie@inria.fr>
|
|
|
|
*/
|
2014-04-17 19:41:48 +02:00
|
|
|
|
2016-06-28 20:30:29 +02:00
|
|
|
#ifndef STM32F0_CPU_CONF_H
|
|
|
|
#define STM32F0_CPU_CONF_H
|
2014-04-17 19:41:48 +02:00
|
|
|
|
2016-01-14 23:21:49 +01:00
|
|
|
#include "cpu_conf_common.h"
|
|
|
|
|
2014-04-17 19:41:48 +02:00
|
|
|
#ifdef CPU_MODEL_STM32F051R8
|
2017-03-06 16:28:11 +01:00
|
|
|
#include "vendor/stm32f051x8.h"
|
2014-04-17 19:41:48 +02:00
|
|
|
#endif
|
2015-03-13 10:13:15 +01:00
|
|
|
#ifdef CPU_MODEL_STM32F091RC
|
2017-03-06 16:28:11 +01:00
|
|
|
#include "vendor/stm32f091xc.h"
|
2015-03-13 10:13:15 +01:00
|
|
|
#endif
|
2016-02-26 17:00:11 +01:00
|
|
|
#ifdef CPU_MODEL_STM32F072RB
|
2017-03-06 16:28:11 +01:00
|
|
|
#include "vendor/stm32f072xb.h"
|
2016-02-26 17:00:11 +01:00
|
|
|
#endif
|
2016-08-29 10:55:46 +02:00
|
|
|
#ifdef CPU_MODEL_STM32F070RB
|
2017-03-06 16:28:11 +01:00
|
|
|
#include "vendor/stm32f070xb.h"
|
2016-08-29 10:55:46 +02:00
|
|
|
#endif
|
2016-09-02 10:56:51 +02:00
|
|
|
#ifdef CPU_MODEL_STM32F030R8
|
2017-03-06 16:28:11 +01:00
|
|
|
#include "vendor/stm32f030x8.h"
|
2016-09-02 10:56:51 +02:00
|
|
|
#endif
|
2016-12-28 13:43:15 +01:00
|
|
|
#ifdef CPU_MODEL_STM32F042K6
|
2017-03-06 16:28:11 +01:00
|
|
|
#include "vendor/stm32f042x6.h"
|
2016-12-28 13:43:15 +01:00
|
|
|
#endif
|
2017-02-02 17:45:53 +01:00
|
|
|
#ifdef CPU_MODEL_STM32F031K6
|
2017-03-06 16:28:11 +01:00
|
|
|
#include "vendor/stm32f031x6.h"
|
2017-02-02 17:45:53 +01:00
|
|
|
#endif
|
2014-10-13 10:53:20 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
2014-04-17 19:41:48 +02:00
|
|
|
|
|
|
|
/**
|
2015-05-27 23:07:43 +02:00
|
|
|
* @brief ARM Cortex-M specific CPU configuration
|
2014-04-17 19:41:48 +02:00
|
|
|
* @{
|
|
|
|
*/
|
2015-05-27 23:07:43 +02:00
|
|
|
#define CPU_DEFAULT_IRQ_PRIO (1U)
|
|
|
|
#define CPU_IRQ_NUMOF (31U)
|
2014-04-17 19:41:48 +02:00
|
|
|
/** @} */
|
|
|
|
|
2017-01-24 14:53:46 +01:00
|
|
|
/**
|
|
|
|
* @brief Flash page configuration
|
|
|
|
*
|
|
|
|
* STM32F03x, STM32F04x, STM32F05x: up to 64 pages of 1K
|
|
|
|
* STM32F07x, STM32F09x: up to 128 pages of 2K
|
|
|
|
*
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
#if defined(CPU_MODEL_STM32F091RC) || defined(CPU_MODEL_STM32F072RB)
|
|
|
|
#define FLASHPAGE_SIZE (2048U)
|
|
|
|
#elif defined(CPU_MODEL_STM32F051R8) || defined(CPU_MODEL_STM32F042K6) \
|
|
|
|
|| defined(CPU_MODEL_STM32F070RB) || defined(CPU_MODEL_STM32F030R8)
|
|
|
|
#define FLASHPAGE_SIZE (1024U)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(CPU_MODEL_STM32F091RC)
|
|
|
|
#define FLASHPAGE_NUMOF (128U)
|
|
|
|
#elif defined(CPU_MODEL_STM32F051R8) || defined(CPU_MODEL_STM32F072RB) \
|
|
|
|
|| defined(CPU_MODEL_STM32F030R8) || defined(CPU_MODEL_STM32F070RB)
|
|
|
|
#define FLASHPAGE_NUMOF (64U)
|
|
|
|
#elif defined(CPU_MODEL_STM32F042K6)
|
|
|
|
#define FLASHPAGE_NUMOF (32U)
|
|
|
|
#endif
|
|
|
|
/** @} */
|
|
|
|
|
2014-10-13 10:53:20 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2016-06-28 20:30:29 +02:00
|
|
|
#endif /* STM32F0_CPU_CONF_H */
|
2014-04-17 19:41:48 +02:00
|
|
|
/** @} */
|