New headers for STM32F0xx.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7332 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
gdisirio 2014-09-28 16:49:01 +00:00
parent 5d80af2a1b
commit 4846421f19
23 changed files with 45409 additions and 3226 deletions

View File

@ -61,7 +61,12 @@
/* If the device type is not externally defined, for example from the Makefile, /* 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 then a file named board.h is included. This file must contain a device
definition compatible with the vendor include file.*/ definition compatible with the vendor include file.*/
#if !defined(STM32F0030) && !defined(STM32F0XX_LD) && !defined(STM32F0XX_MD) #if !defined (STM32F030x6) && !defined (STM32F030x8) && \
!defined (STM32F031x6) && !defined (STM32F038xx) && \
!defined (STM32F042x6) && !defined (STM32F048xx) && \
!defined (STM32F051x8) && !defined (STM32F058xx) && \
!defined (STM32F071xB) && !defined (STM32F072xB) && \
!defined (STM32F078xx)
#include "board.h" #include "board.h"
#endif #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_stm32f0xx.h * @file system_stm32f0xx.h
* @author MCD Application Team * @author MCD Application Team
* @version V1.2.1 * @version V2.0.1
* @date 22-November-2013 * @date 18-June-2014
* @brief CMSIS Cortex-M0 Device Peripheral Access Layer System Header File. * @brief CMSIS Cortex-M0 Device System Source File for STM32F0xx devices.
****************************************************************************** ******************************************************************************
* @attention * @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"); * Redistribution and use in source and binary forms, with or without modification,
* You may not use this file except in compliance with the License. * are permitted provided that the following conditions are met:
* You may obtain a copy of the License at: * 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 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* Unless required by applicable law or agreed to in writing, software * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* distributed under the License is distributed on an "AS IS" BASIS, * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* See the License for the specific language governing permissions and * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* limitations under the License. * 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 STM32F0xx_System_Exported_types /** @addtogroup STM32F0xx_System_Exported_types
* @{ * @{
*/ */
/* This variable is updated in three ways:
1) by calling CMSIS function SystemCoreClockUpdate()
3) by calling HAL API function HAL_RCC_GetHCLKFreq()
3) by calling HAL API function HAL_RCC_ClockConfig()
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) */ extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */
/** /**

View File

@ -47,7 +47,7 @@
/* /*
* MCU type as defined in the ST header. * MCU type as defined in the ST header.
*/ */
#define STM32F030 #define STM32F030x8
/* /*
* IO pins assignments. * IO pins assignments.

View File

@ -47,7 +47,7 @@
/* /*
* MCU type as defined in the ST header. * MCU type as defined in the ST header.
*/ */
#define STM32F0XX_MD #define STM32F051x8
/* /*
* IO pins assignments. * IO pins assignments.

View File

@ -26,6 +26,12 @@
* - 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:
* - STM32F030x6, STM32F030x8 for Value Line devices.
* - STM32F031x6, STM32F038xx, STM32F042x6, STM32F048xx for
* Low Density devices.
* - STM32F051x8, STM32F058xx, STM32F071xB, STM32F072xB,
* STM32F078xx for Medium Density devices.
*
* - STM32F030 for Value Line devices. * - STM32F030 for Value Line devices.
* - STM32F0XX_LD for Low Density devices. * - STM32F0XX_LD for Low Density devices.
* - STM32F0XX_MD for Medium Density devices. * - STM32F0XX_MD for Medium Density devices.
@ -38,6 +44,9 @@
#ifndef _HAL_LLD_H_ #ifndef _HAL_LLD_H_
#define _HAL_LLD_H_ #define _HAL_LLD_H_
/*
* Registry definitions.
*/
#include "stm32_registry.h" #include "stm32_registry.h"
/*===========================================================================*/ /*===========================================================================*/
@ -48,25 +57,42 @@
* @name Platform identification macros * @name Platform identification macros
* @{ * @{
*/ */
#if defined(STM32F0XX_MD) || defined(__DOXYGEN__) #if defined(STM32F051x8) || defined(__DOXYGEN__)
#define PLATFORM_NAME "STM32F051xx/F061xx Entry Level Medium Density devices" #define PLATFORM_NAME "STM32F051x8 Entry Level Medium Density devices"
#elif defined(STM32F0XX_LD) #elif defined(STM32F058xx)
#define PLATFORM_NAME "STM32F050xx/F060xx Entry Level Low Density devices" #define PLATFORM_NAME "STM32F058xx Entry Level Medium Density devices"
#elif defined(STM32F030) #elif defined(STM32F071xB)
#define PLATFORM_NAME "STM32F030xx Entry Level Value Line devices" #define PLATFORM_NAME "STM32F071xB Entry Level Medium Density devices"
#elif defined(STM32F072xB)
#define PLATFORM_NAME "STM32F072xB Entry Level Medium Density devices"
#elif defined(STM32F078xx)
#define PLATFORM_NAME "STM32F078xx Entry Level Medium Density devices"
#elif defined(STM32F031x6)
#define PLATFORM_NAME "STM32F031x6 Entry Level Low Density devices"
#elif defined(STM32F038xx)
#define PLATFORM_NAME "STM32F038xx Entry Level Low Density devices"
#elif defined(STM32F042x6)
#define PLATFORM_NAME "STM32F042x6 Entry Level Low Density devices"
#elif defined(STM32F048xx)
#define PLATFORM_NAME "STM32F048xx Entry Level Low Density devices"
#elif defined(STM32F030x6)
#define PLATFORM_NAME "STM32F030x6 Entry Level Value Line devices"
#elif defined(STM32F030x8)
#define PLATFORM_NAME "STM32F030x8 Entry Level Value Line devices"
#else #else
#error "STM32F0xx device not specified" #error "STM32F0xx device not specified"
#endif #endif
/**
* @brief Sub-family identifier.
*/
#if !defined(STM32F0XX) || defined(__DOXYGEN__)
#define STM32F0XX
#endif
/** @} */ /** @} */
/** /**

View File

@ -25,6 +25,26 @@
#ifndef _STM32_REGISTRY_H_ #ifndef _STM32_REGISTRY_H_
#define _STM32_REGISTRY_H_ #define _STM32_REGISTRY_H_
#if defined(STM32F051x8) || defined(STM32F058xx) || \
defined(STM32F071xB) || defined(STM32F072xB) || \
defined(STM32F078xx)
#define STM32F0XX_MD
#elif defined(STM32F031x6) || defined(STM32F038xx) || \
defined(STM32F042x6) || defined(STM32F048xx)
#define STM32F0XX_LD
#elif defined(STM32F030x6) || defined(STM32F030x8)
#define STM32F030
#else
#error "STM32F0xx device not specified"
#endif
#if !defined(STM32F0XX) || defined(__DOXYGEN__)
#define STM32F0XX
#endif
/*===========================================================================*/ /*===========================================================================*/
/* Platform capabilities. */ /* Platform capabilities. */
/*===========================================================================*/ /*===========================================================================*/

View File

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

View File

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

View File

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

View File

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

View File

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