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

This commit is contained in:
gdisirio 2014-09-27 08:10:38 +00:00
parent d737a6b340
commit 3ef7552609
27 changed files with 81091 additions and 9090 deletions

View File

@ -66,8 +66,12 @@
/* If the device type is not externally defined, for example from the Makefile,
then a file named board.h is included. This file must contain a device
definition compatible with the vendor include file.*/
#if !defined(STM32F40_41xxx) && !defined(STM32F427_437xx) && \
!defined(STM32F429_439xx) && !defined(STM32F401xx)
#if !defined(STM32F405xx) && !defined(STM32F415xx) && \
!defined(STM32F407xx) && !defined(STM32F417xx) && \
!defined(STM32F427xx) && !defined(STM32F437xx) && \
!defined(STM32F429xx) && !defined(STM32F439xx) && \
!defined(STM32F401xC) && !defined(STM32F401xE) && \
!defined(STM32F411xE)
#include "board.h"
#endif

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -2,25 +2,35 @@
******************************************************************************
* @file system_stm32f4xx.h
* @author MCD Application Team
* @version V1.2.1
* @date 19-September-2013
* @version V2.1.0
* @date 19-June-2014
* @brief CMSIS Cortex-M4 Device System Source File for STM32F4xx devices.
******************************************************************************
* @attention
*
* <h2><center>&copy; COPYRIGHT 2013 STMicroelectronics</center></h2>
* <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
*
* Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
* You may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of STMicroelectronics nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* http://www.st.com/software_license_agreement_liberty_v2
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************
*/
@ -55,7 +65,14 @@
/** @addtogroup STM32F4xx_System_Exported_types
* @{
*/
/* This variable is updated in three ways:
1) by calling CMSIS function SystemCoreClockUpdate()
2) by calling HAL API function HAL_RCC_GetSysClockFreq()
3) each time HAL_RCC_ClockConfig() is called to configure the system clock frequency
Note: If you use this function to configure the system clock; then there
is no need to call the 2 first functions listed above, since SystemCoreClock
variable is updated automatically.
*/
extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */

View File

@ -43,7 +43,7 @@
/*
* MCU type as defined in the ST header.
*/
#define STM32F40_41xxx
#define STM32F407xx
/*
* IO pins assignments.

View File

@ -46,7 +46,7 @@
/*
* MCU type, supported types are defined in ./os/hal/platforms/hal_lld.h.
*/
#define STM32F40_41xxx
#define STM32F407xx
/*
* IO pins assignments.

View File

@ -53,7 +53,7 @@
/*
* MCU type as defined in the ST header.
*/
#define STM32F40_41xxx
#define STM32F407xx
/*
* IO pins assignments.

View File

@ -53,7 +53,7 @@
/*
* MCU type as defined in the ST header.
*/
#define STM32F40_41xxx
#define STM32F407xx
/*
* IO pins assignments.

View File

@ -51,7 +51,7 @@
/*
* MCU type as defined in the ST header.
*/
#define STM32F40_41xxx
#define STM32F407xx
/*
* IO pins assignments.

View File

@ -50,7 +50,7 @@
/*
* MCU type as defined in the ST header.
*/
#define STM32F401xx
#define STM32F401xE
/*
* IO pins assignments.

View File

@ -49,7 +49,7 @@
/*
* MCU type as defined in the ST header.
*/
#define STM32F429_439xx
#define STM32F429xx
/*
* IO pins assignments.

View File

@ -49,7 +49,7 @@
/*
* MCU type as defined in the ST header.
*/
#define STM32F40_41xxx
#define STM32F407xx
/*
* IO pins assignments.

View File

@ -26,11 +26,12 @@
* - STM32_VDD (as hundredths of Volt).
* .
* One of the following macros must also be defined:
* - STM32F2XX for High-performance STM32 F-2 devices.
* - STM32F401xx for High-performance STM32 F-4 devices.
* - STM32F40_41xxx for High-performance STM32 F-4 devices.
* - STM32F427_437xx for High-performance STM32 F-4 devices.
* - STM32F429_439xx for High-performance STM32 F-4 devices.
* - STM32F405xx, STM32F415xx, STM32F407xx, STM32F417xx for
* High-performance STM32 F-2 devices.
* - STM32F427xx, STM32F437xx, STM32F429xx, STM32F439xx for
* High-performance STM32 F-4 devices.
* - STM32F401xC, STM32F401xE for High-performance STM32 F-4 devices.
* - STM32F411xE for High-performance STM32 F-4 devices.
* .
*
* @addtogroup HAL
@ -40,8 +41,6 @@
#ifndef _HAL_LLD_H_
#define _HAL_LLD_H_
#include "stm32_registry.h"
/*===========================================================================*/
/* Driver constants. */
/*===========================================================================*/
@ -55,17 +54,49 @@
* @name Platform identification macros
* @{
*/
#if defined(STM32F429_439xx) || defined(__DOXYGEN__)
#define PLATFORM_NAME "STM32F429/F439 High Performance with DSP and FPU"
#if defined(STM32F439xx) || defined(__DOXYGEN__)
#define PLATFORM_NAME "STM32F439 High Performance with DSP and FPU"
#define STM32F429_439xx
#elif defined(STM32F427_437xx)
#define PLATFORM_NAME "STM32F427/F437 High Performance with DSP and FPU"
#elif defined(STM32F429xx)
#define PLATFORM_NAME "STM32F429 High Performance with DSP and FPU"
#define STM32F429_439xx
#elif defined(STM32F40_41xxx)
#define PLATFORM_NAME "STM32F407/F417 High Performance with DSP and FPU"
#elif defined(STM32F437xx)
#define PLATFORM_NAME "STM32F437 High Performance with DSP and FPU"
#define STM32F427_437xx
#elif defined(STM32F401xx)
#define PLATFORM_NAME "STM32F401 High Performance with DSP and FPU"
#elif defined(STM32F427xx)
#define PLATFORM_NAME "STM32F427 High Performance with DSP and FPU"
#define STM32F427_437xx
#elif defined(STM32F405xx)
#define PLATFORM_NAME "STM32F405 High Performance with DSP and FPU"
#define STM32F40_41xxx
#elif defined(STM32F415xx)
#define PLATFORM_NAME "STM32F415 High Performance with DSP and FPU"
#define STM32F40_41xxx
#elif defined(STM32F407xx)
#define PLATFORM_NAME "STM32F407 High Performance with DSP and FPU"
#define STM32F40_41xxx
#elif defined(STM32F417xx)
#define PLATFORM_NAME "STM32F417 High Performance with DSP and FPU"
#define STM32F40_41xxx
#elif defined(STM32F401xC)
#define PLATFORM_NAME "STM32F401xC High Performance with DSP and FPU"
#define STM32F401xx
#elif defined(STM32F401xE)
#define PLATFORM_NAME "STM32F401xE High Performance with DSP and FPU"
#define STM32F401xx
#elif defined(STM32F411xE)
#define PLATFORM_NAME "STM32F411xE High Performance with DSP and FPU"
#define STM32F411xx
#elif defined(STM32F2XX)
#define PLATFORM_NAME "STM32F2xx High Performance"
@ -90,7 +121,8 @@
* @name Absolute Maximum Ratings
* @{
*/
#if defined(STM32F427_437xx) || defined(STM32F429_439xx) || \
#if defined(STM32F427xx) || defined(STM32F437xx) || \
defined(STM32F429xx) || defined(STM32F439xx) || \
defined(__DOXYGEN__)
/**
* @brief Absolute maximum system clock.
@ -176,7 +208,7 @@
* @brief Maximum SPI/I2S clock frequency.
*/
#define STM32_SPII2S_MAX 45000000
#endif /* STM32F40_41xxx */
#endif
#if defined(STM32F40_41xxx) || defined(__DOXYGEN__)
#define STM32_SYSCLK_MAX 168000000
@ -196,7 +228,7 @@
#define STM32_PCLK1_MAX 42000000
#define STM32_PCLK2_MAX 84000000
#define STM32_SPII2S_MAX 42000000
#endif /* STM32F40_41xxx */
#endif
#if defined(STM32F401xx) || defined(__DOXYGEN__)
#define STM32_SYSCLK_MAX 84000000
@ -216,7 +248,11 @@
#define STM32_PCLK1_MAX 42000000
#define STM32_PCLK2_MAX 84000000
#define STM32_SPII2S_MAX 42000000
#endif /* STM32F40_41xxx */
#endif
#if defined(STM32F411xx)
#error "missing Absolute Maximum Ratings for STM32F411xx"
#endif
#if defined(STM32F2XX)
#define STM32_SYSCLK_MAX 120000000
@ -236,7 +272,7 @@
#define STM32_PCLK1_MAX 30000000
#define STM32_PCLK2_MAX 60000000
#define STM32_SPII2S_MAX 30000000
#endif /* defined(STM32F2XX) */
#endif
/** @} */
/**
@ -764,6 +800,9 @@
#error "invalid VDD voltage specified"
#endif
#elif defined(STM32F411xx)
#error "missing WS settings for STM32F411xx"
#else /* STM32F2XX */
#if (STM32_VDD >= 270) && (STM32_VDD <= 360)
#define STM32_0WS_THRESHOLD 30000000
@ -1378,6 +1417,7 @@
/* Various helpers.*/
#include "nvic.h"
#include "stm32_registry.h"
#include "stm32_isr.h"
#include "stm32_dma.h"
#include "stm32_rcc.h"

View File

@ -663,7 +663,7 @@
*
* @api
*/
#define rccResetOTG_HS() rccResetAHB1(RCC_AHB1RSTR_OTGHSRST)
#define rccResetOTG_HS() rccResetAHB1(RCC_AHB1RSTR_OTGHRST)
/**
* @brief Enables the OTG_HS peripheral clock.

View File

@ -48,4 +48,5 @@
</scannerConfigBuildInfo>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
<storageModule moduleId="refreshScope"/>
</cproject>

View File

@ -48,4 +48,5 @@
</scannerConfigBuildInfo>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
<storageModule moduleId="refreshScope"/>
</cproject>

View File

@ -48,4 +48,5 @@
</scannerConfigBuildInfo>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
<storageModule moduleId="refreshScope"/>
</cproject>