git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6342 35acf78f-673a-0410-8e92-d51de3d6d3f4

This commit is contained in:
gdisirio 2013-10-01 12:47:08 +00:00
parent e23cb1d41f
commit 96edef9ffa
8 changed files with 37 additions and 31 deletions

View File

@ -93,9 +93,7 @@
*/ */
#if !defined (STM32F10X_LD) && !defined (STM32F10X_LD_VL) && !defined (STM32F10X_MD) && !defined (STM32F10X_MD_VL) && !defined (STM32F10X_HD) && !defined (STM32F10X_HD_VL) && !defined (STM32F10X_XL) && !defined (STM32F10X_CL) #if !defined (STM32F10X_LD) && !defined (STM32F10X_LD_VL) && !defined (STM32F10X_MD) && !defined (STM32F10X_MD_VL) && !defined (STM32F10X_HD) && !defined (STM32F10X_HD_VL) && !defined (STM32F10X_XL) && !defined (STM32F10X_CL)
/* CHIBIOS FIX */ #error "Please select first the target STM32F10x device used in your application (in stm32f10x.h file)"
#include "board.h"
// #error "Please select first the target STM32F10x device used in your application (in stm32f10x.h file)"
#endif #endif
#if !defined USE_STDPERIPH_DRIVER #if !defined USE_STDPERIPH_DRIVER

View File

@ -71,9 +71,7 @@
*/ */
#if !defined (STM32F37X) #if !defined (STM32F37X)
/* CHIBIOS FIX */ #error "Please select first the target STM32F37X device used in your application (in stm32f37x.h file)"
#include "board.h"
// #error "Please select first the target STM32F37X device used in your application (in stm32f37x.h file)"
#endif #endif
#if !defined (USE_STDPERIPH_DRIVER) #if !defined (USE_STDPERIPH_DRIVER)

View File

@ -76,9 +76,7 @@
*/ */
#if !defined (STM32F4XX) && !defined (STM32F40XX) && !defined (STM32F427X) #if !defined (STM32F4XX) && !defined (STM32F40XX) && !defined (STM32F427X)
/* CHIBIOS FIX */ #error "Please select first the target STM32F4xx device used in your application (in stm32f4xx.h file)"
#include "board.h"
// #error "Please select first the target STM32F4xx device used in your application (in stm32f4xx.h file)"
#endif #endif
#if !defined (USE_STDPERIPH_DRIVER) #if !defined (USE_STDPERIPH_DRIVER)

View File

@ -83,9 +83,7 @@
*/ */
#if !defined (STM32L1XX_MD) && !defined (STM32L1XX_MDP) && !defined (STM32L1XX_HD) #if !defined (STM32L1XX_MD) && !defined (STM32L1XX_MDP) && !defined (STM32L1XX_HD)
/* CHIBIOS FIX */ #error "Please select first the target STM32L1xx device used in your application (in stm32l1xx.h file)"
#include "board.h"
// #error "Please select first the target STM32L1xx device used in your application (in stm32l1xx.h file)"
#endif #endif
#if !defined USE_STDPERIPH_DRIVER #if !defined USE_STDPERIPH_DRIVER

View File

@ -26,7 +26,8 @@
* - STM32_HSE_BYPASS (optionally). * - STM32_HSE_BYPASS (optionally).
* . * .
* One of the following macros must also be defined: * One of the following macros must also be defined:
* - STM32F0XX for Entry Level devices. * - STM32F0XX_LD for Low Density Entry Level devices.
* - STM32F0XX_MD for Medium Density Entry Level devices.
* . * .
* *
* @addtogroup HAL * @addtogroup HAL

View File

@ -26,6 +26,7 @@
* One of the following macros must also be defined: * One of the following macros must also be defined:
* - STM32F10X_LD_VL for Value Line Low Density devices. * - STM32F10X_LD_VL for Value Line Low Density devices.
* - STM32F10X_MD_VL for Value Line Medium Density devices. * - STM32F10X_MD_VL for Value Line Medium Density devices.
* - STM32F10X_HD_VL for Value Line High Density devices.
* - STM32F10X_LD for Performance Low Density devices. * - STM32F10X_LD for Performance Low Density devices.
* - STM32F10X_MD for Performance Medium Density devices. * - STM32F10X_MD for Performance Medium Density devices.
* - STM32F10X_HD for Performance High Density devices. * - STM32F10X_HD for Performance High Density devices.

View File

@ -26,7 +26,8 @@
* . * .
* One of the following macros must also be defined: * One of the following macros must also be defined:
* - STM32F2XX for High-performance STM32 F-2 devices. * - STM32F2XX for High-performance STM32 F-2 devices.
* - STM32F4XX for High-performance STM32 F-4 devices. * - STM32F40XX for High-performance STM32 F-4 devices.
* - STM32F42XX for High-performance STM32 F-4 devices.
* . * .
* *
* @addtogroup HAL * @addtogroup HAL
@ -51,18 +52,20 @@
* @name Platform identification * @name Platform identification
* @{ * @{
*/ */
#if defined(STM32F4XX) || defined(__DOXYGEN__) #if defined(STM32F40XX) || defined(__DOXYGEN__)
#define PLATFORM_NAME "STM32F4xx High Performance" #define PLATFORM_NAME "STM32F40x/STM32F41x High Performance"
#else /* !defined(STM32F4XX) */ #if defined(STM32F42XX)
#define PLATFORM_NAME "STM32F42x/STM32F43x High Performance"
#else /* !defined(STM32F40XX) */
#define PLATFORM_NAME "STM32F2xx High Performance" #define PLATFORM_NAME "STM32F2xx High Performance"
#endif /* !defined(STM32F4XX) */ #endif /* !defined(STM32F40XX) */
/** @} */ /** @} */
/** /**
* @name Absolute Maximum Ratings * @name Absolute Maximum Ratings
* @{ * @{
*/ */
#if defined(STM32F4XX) || defined(__DOXYGEN__) #if defined(STM32F40XX) || defined(__DOXYGEN__)
/** /**
* @brief Maximum HSE clock frequency. * @brief Maximum HSE clock frequency.
*/ */
@ -128,7 +131,7 @@
*/ */
#define STM32_SPII2S_MAX 37500000 #define STM32_SPII2S_MAX 37500000
#else /* !defined(STM32F4XX) */ #else /* !defined(STM32F40XX) */
#define STM32_SYSCLK_MAX 120000000 #define STM32_SYSCLK_MAX 120000000
#define STM32_HSECLK_MAX 26000000 #define STM32_HSECLK_MAX 26000000
#define STM32_HSECLK_MIN 1000000 #define STM32_HSECLK_MIN 1000000
@ -143,7 +146,7 @@
#define STM32_PCLK1_MAX 30000000 #define STM32_PCLK1_MAX 30000000
#define STM32_PCLK2_MAX 60000000 #define STM32_PCLK2_MAX 60000000
#define STM32_SPII2S_MAX 37500000 #define STM32_SPII2S_MAX 37500000
#endif /* !defined(STM32F4XX) */ #endif /* !defined(STM32F40XX) */
/** @} */ /** @} */
/** /**
@ -158,7 +161,7 @@
* @name PWR_CR register bits definitions * @name PWR_CR register bits definitions
* @{ * @{
*/ */
#if defined(STM32F4XX) || defined(__DOXYGEN__) #if defined(STM32F40XX) || defined(__DOXYGEN__)
#define STM32_VOS_MASK (1 << 14) /**< Core voltage mask. */ #define STM32_VOS_MASK (1 << 14) /**< Core voltage mask. */
#define STM32_VOS_LOW (0 << 14) /**< Core voltage set to low. */ #define STM32_VOS_LOW (0 << 14) /**< Core voltage set to low. */
#define STM32_VOS_HIGH (1 << 14) /**< Core voltage set to high. */ #define STM32_VOS_HIGH (1 << 14) /**< Core voltage set to high. */
@ -354,7 +357,7 @@
#define STM32_SW STM32_SW_PLL #define STM32_SW STM32_SW_PLL
#endif #endif
#if defined(STM32F4XX) || defined(__DOXYGEN__) #if defined(STM32F40XX) || defined(__DOXYGEN__)
/** /**
* @brief Core voltage selection. * @brief Core voltage selection.
* @note This setting affects all the performance and clock related * @note This setting affects all the performance and clock related
@ -416,7 +419,7 @@
#define STM32_PLLQ_VALUE 7 #define STM32_PLLQ_VALUE 7
#endif #endif
#else /* !defined(STM32F4XX) */ #else /* !defined(STM32F40XX) */
/** /**
* @brief Clock source for the PLLs. * @brief Clock source for the PLLs.
* @note This setting has only effect if the PLL is selected as the * @note This setting has only effect if the PLL is selected as the
@ -467,7 +470,7 @@
#if !defined(STM32_PLLQ_VALUE) || defined(__DOXYGEN__) #if !defined(STM32_PLLQ_VALUE) || defined(__DOXYGEN__)
#define STM32_PLLQ_VALUE 5 #define STM32_PLLQ_VALUE 5
#endif #endif
#endif /* !defined(STM32F4XX) */ #endif /* !defined(STM32F40XX) */
/** /**
* @brief AHB prescaler value. * @brief AHB prescaler value.
@ -564,7 +567,7 @@
/* Derived constants and error checks. */ /* Derived constants and error checks. */
/*===========================================================================*/ /*===========================================================================*/
#if defined(STM32F4XX) || defined(__DOXYGEN__) #if defined(STM32F40XX) || defined(__DOXYGEN__)
/* /*
* Configuration-related checks. * Configuration-related checks.
*/ */
@ -582,20 +585,20 @@
#define STM32_SYSCLK_MAX 144000000 #define STM32_SYSCLK_MAX 144000000
#endif #endif
#else /* !defined(STM32F4XX) */ #else /* !defined(STM32F40XX) */
/* /*
* Configuration-related checks. * Configuration-related checks.
*/ */
#if !defined(STM32F2xx_MCUCONF) #if !defined(STM32F2xx_MCUCONF)
#error "Using a wrong mcuconf.h file, STM32F2xx_MCUCONF not defined" #error "Using a wrong mcuconf.h file, STM32F2xx_MCUCONF not defined"
#endif #endif
#endif /* !defined(STM32F4XX) */ #endif /* !defined(STM32F40XX) */
/** /**
* @brief Maximum frequency thresholds and wait states for flash access. * @brief Maximum frequency thresholds and wait states for flash access.
* @note The values are valid for 2.7V to 3.6V supply range. * @note The values are valid for 2.7V to 3.6V supply range.
*/ */
#if defined(STM32F4XX) || defined(__DOXYGEN__) #if defined(STM32F40XX) || defined(__DOXYGEN__)
#if ((STM32_VDD >= 270) && (STM32_VDD <= 360)) || defined(__DOXYGEN__) #if ((STM32_VDD >= 270) && (STM32_VDD <= 360)) || defined(__DOXYGEN__)
#define STM32_0WS_THRESHOLD 30000000 #define STM32_0WS_THRESHOLD 30000000
#define STM32_1WS_THRESHOLD 60000000 #define STM32_1WS_THRESHOLD 60000000
@ -636,7 +639,7 @@
#error "invalid VDD voltage specified" #error "invalid VDD voltage specified"
#endif #endif
#else /* !defined(STM32F4XX) */ #else /* !defined(STM32F40XX) */
#if ((STM32_VDD >= 270) && (STM32_VDD <= 360)) || defined(__DOXYGEN__) #if ((STM32_VDD >= 270) && (STM32_VDD <= 360)) || defined(__DOXYGEN__)
#define STM32_0WS_THRESHOLD 30000000 #define STM32_0WS_THRESHOLD 30000000
#define STM32_1WS_THRESHOLD 60000000 #define STM32_1WS_THRESHOLD 60000000
@ -676,7 +679,7 @@
#else #else
#error "invalid VDD voltage specified" #error "invalid VDD voltage specified"
#endif #endif
#endif /* !defined(STM32F4XX) */ #endif /* !defined(STM32F40XX) */
/* /*
* HSI related checks. * HSI related checks.

View File

@ -25,6 +25,8 @@
* . * .
* One of the following macros must also be defined: * One of the following macros must also be defined:
* - STM32L1XX_MD for Ultra Low Power Medium-density devices. * - STM32L1XX_MD for Ultra Low Power Medium-density devices.
* - STM32L1XX_MDP for Ultra Low Power Medium-density Plus devices.
* - STM32L1XX_HD for Ultra Low Power Medium-density devices.
* . * .
* *
* @addtogroup HAL * @addtogroup HAL
@ -359,6 +361,13 @@
#error "Using a wrong mcuconf.h file, STM32L1xx_MCUCONF not defined" #error "Using a wrong mcuconf.h file, STM32L1xx_MCUCONF not defined"
#endif #endif
/*
* MCU variant check.
*/
#if defined(STM32L1XX_MDP) || defined(STM32L1XX_HD)
#error "unsupported STM32L1XX variant"
#endif
/* Voltage related limits.*/ /* Voltage related limits.*/
#if (STM32_VOS == STM32_VOS_1P8) || defined(__DOXYGEN__) #if (STM32_VOS == STM32_VOS_1P8) || defined(__DOXYGEN__)
/** /**