stm3210 up to lib3.1.2

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@75 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
wuyangyong 2009-10-08 14:53:36 +00:00
parent cfbcf2e82f
commit 088b3a75ca
59 changed files with 1228 additions and 1227 deletions

View File

@ -1,8 +1,8 @@
;******************** (C) COPYRIGHT 2009 STMicroelectronics ********************
;* File Name : startup_stm32f10x_cl.s
;* Author : MCD Application Team
;* Version : V3.1.0
;* Date : 06/19/2009
;* Version : V3.1.2
;* Date : 09/28/2009
;* Description : STM32F10x Connectivity line devices vector table for RVMDK
;* toolchain.
;* This module performs:

View File

@ -1,8 +1,8 @@
;******************** (C) COPYRIGHT 2009 STMicroelectronics ********************
;* File Name : startup_stm32f10x_hd.s
;* Author : MCD Application Team
;* Version : V3.1.0
;* Date : 06/19/2009
;* Version : V3.1.2
;* Date : 09/28/2009
;* Description : STM32F10x High Density Devices vector table for RVMDK
;* toolchain.
;* This module performs:

View File

@ -1,8 +1,8 @@
;******************** (C) COPYRIGHT 2009 STMicroelectronics ********************
;* File Name : startup_stm32f10x_ld.s
;* Author : MCD Application Team
;* Version : V3.1.0
;* Date : 06/19/2009
;* Version : V3.1.2
;* Date : 09/28/2009
;* Description : STM32F10x Low Density Devices vector table for RVMDK
;* toolchain.
;* This module performs:

View File

@ -1,8 +1,8 @@
;******************** (C) COPYRIGHT 2009 STMicroelectronics ********************
;* File Name : startup_stm32f10x_md.s
;* Author : MCD Application Team
;* Version : V3.1.0
;* Date : 06/19/2009
;* Version : V3.1.2
;* Date : 09/28/2009
;* Description : STM32F10x Medium Density Devices vector table for RVMDK
;* toolchain.
;* This module performs:

View File

@ -2,8 +2,8 @@
******************************************************************************
* @file startup_stm32f10x_cl.s
* @author MCD Application Team
* @version V3.1.0
* @date 06/19/2009
* @version V3.1.2
* @date 09/28/2009
* @brief STM32F10x Connectivity line Devices vector table for RIDE7 toolchain.
* This module performs:
* - Set the initial SP
@ -33,7 +33,6 @@
.thumb
.global g_pfnVectors
.global SystemInit_ExtMemCtl_Dummy
.global Default_Handler
/* start address for the initialization values of the .data section.

View File

@ -2,8 +2,8 @@
******************************************************************************
* @file startup_stm32f10x_hd.s
* @author MCD Application Team
* @version V3.1.0
* @date 06/19/2009
* @version V3.1.2
* @date 09/28/2009
* @brief STM32F10x High Density Devices vector table for RIDE7 toolchain.
* This module performs:
* - Set the initial SP
@ -15,7 +15,7 @@
* calls main()).
* After Reset the Cortex-M3 processor is in Thread mode,
* priority is Privileged, and the Stack is set to Main.
*******************************************************************************
******************************************************************************
* @copy
*
* THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS

View File

@ -2,8 +2,8 @@
******************************************************************************
* @file startup_stm32f10x_ld.s
* @author MCD Application Team
* @version V3.1.0
* @date 06/19/2009
* @version V3.1.2
* @date 09/28/2009
* @brief STM32F10x Low Density Devices vector table for RIDE7 toolchain.
* This module performs:
* - Set the initial SP
@ -13,7 +13,7 @@
* calls main()).
* After Reset the Cortex-M3 processor is in Thread mode,
* priority is Privileged, and the Stack is set to Main.
*******************************************************************************
******************************************************************************
* @copy
*
* THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
@ -32,7 +32,6 @@
.thumb
.global g_pfnVectors
.global SystemInit_ExtMemCtl_Dummy
.global Default_Handler
/* start address for the initialization values of the .data section.

View File

@ -2,8 +2,8 @@
******************************************************************************
* @file startup_stm32f10x_md.s
* @author MCD Application Team
* @version V3.1.0
* @date 06/19/2009
* @version V3.1.2
* @date 09/28/2009
* @brief STM32F10x Medium Density Devices vector table for RIDE7 toolchain.
* This module performs:
* - Set the initial SP
@ -32,7 +32,6 @@
.thumb
.global g_pfnVectors
.global SystemInit_ExtMemCtl_Dummy
.global Default_Handler
/* start address for the initialization values of the .data section.

View File

@ -1,8 +1,8 @@
;/******************** (C) COPYRIGHT 2009 STMicroelectronics ********************
;* File Name : startup_stm32f10x_cl.s
;* Author : MCD Application Team
;* Version : V3.1.0
;* Date : 06/19/2009
;* Version : V3.1.2
;* Date : 09/28/2009
;* Description : STM32F10x Connectivity line devices vector table for
;* EWARM5.x toolchain.
;* This module performs:

View File

@ -1,8 +1,8 @@
;/******************** (C) COPYRIGHT 2009 STMicroelectronics ********************
;* File Name : startup_stm32f10x_hd.s
;* Author : MCD Application Team
;* Version : V3.1.0
;* Date : 06/19/2009
;* Version : V3.1.2
;* Date : 09/28/2009
;* Description : STM32F10x High Density Devices vector table for EWARM5.x
;* toolchain.
;* This module performs:

View File

@ -1,8 +1,8 @@
;/******************** (C) COPYRIGHT 2009 STMicroelectronics ********************
;* File Name : startup_stm32f10x_ld.s
;* Author : MCD Application Team
;* Version : V3.1.0
;* Date : 06/19/2009
;* Version : V3.1.2
;* Date : 09/28/2009
;* Description : STM32F10x Low Density Devices vector table for EWARM5.x
;* toolchain.
;* This module performs:

View File

@ -1,8 +1,8 @@
;/******************** (C) COPYRIGHT 2009 STMicroelectronics ********************
;* File Name : startup_stm32f10x_md.s
;* Author : MCD Application Team
;* Version : V3.1.0
;* Date : 06/19/2009
;* Version : V3.1.2
;* Date : 09/28/2009
;* Description : STM32F10x Medium Density Devices vector table for
;* EWARM5.x toolchain.
;* This module performs:

View File

@ -2,8 +2,8 @@
******************************************************************************
* @file stm32f10x.h
* @author MCD Application Team
* @version V3.1.0
* @date 06/19/2009
* @version V3.1.2
* @date 09/28/2009
* @brief CMSIS Cortex-M3 Device Peripheral Access Layer Header File.
* This file contains all the peripheral register's definitions, bits
* definitions and memory mapping for STM32F10x Connectivity line, High
@ -100,7 +100,7 @@
*/
#define __STM32F10X_STDPERIPH_VERSION_MAIN (0x03) /*!< [31:16] STM32F10x Standard Peripheral Library main version */
#define __STM32F10X_STDPERIPH_VERSION_SUB1 (0x01) /*!< [15:8] STM32F10x Standard Peripheral Library sub1 version */
#define __STM32F10X_STDPERIPH_VERSION_SUB2 (0x00) /*!< [7:0] STM32F10x Standard Peripheral Library sub2 version */
#define __STM32F10X_STDPERIPH_VERSION_SUB2 (0x02) /*!< [7:0] STM32F10x Standard Peripheral Library sub2 version */
#define __STM32F10X_STDPERIPH_VERSION ((__STM32F10X_STDPERIPH_VERSION_MAIN << 16)\
| (__STM32F10X_STDPERIPH_VERSION_SUB1 << 8)\
| __STM32F10X_STDPERIPH_VERSION_SUB2)

View File

@ -2,8 +2,8 @@
******************************************************************************
* @file system_stm32f10x.c
* @author MCD Application Team
* @version V3.1.0
* @date 06/19/2009
* @version V3.1.2
* @date 09/28/2009
* @brief CMSIS Cortex-M3 Device Peripheral Access Layer System Source File.
******************************************************************************
*
@ -641,7 +641,7 @@ static void SetSysClockTo48(void)
/* PCLK2 = HCLK */
RCC->CFGR |= (uint32_t)RCC_CFGR_PPRE2_DIV1;
/* PCLK1 = HCLK */
/* PCLK1 = HCLK/2 */
RCC->CFGR |= (uint32_t)RCC_CFGR_PPRE1_DIV2;
#ifdef STM32F10X_CL
@ -737,9 +737,9 @@ static void SetSysClockTo56(void)
/* Enable Prefetch Buffer */
FLASH->ACR |= FLASH_ACR_PRFTBE;
/* Flash 1 wait state */
/* Flash 2 wait state */
FLASH->ACR &= (uint32_t)((uint32_t)~FLASH_ACR_LATENCY);
FLASH->ACR |= (uint32_t)FLASH_ACR_LATENCY_1;
FLASH->ACR |= (uint32_t)FLASH_ACR_LATENCY_2;
/* HCLK = SYSCLK */
RCC->CFGR |= (uint32_t)RCC_CFGR_HPRE_DIV1;
@ -747,7 +747,7 @@ static void SetSysClockTo56(void)
/* PCLK2 = HCLK */
RCC->CFGR |= (uint32_t)RCC_CFGR_PPRE2_DIV1;
/* PCLK1 = HCLK */
/* PCLK1 = HCLK/2 */
RCC->CFGR |= (uint32_t)RCC_CFGR_PPRE1_DIV2;
#ifdef STM32F10X_CL
@ -855,7 +855,7 @@ static void SetSysClockTo72(void)
/* PCLK2 = HCLK */
RCC->CFGR |= (uint32_t)RCC_CFGR_PPRE2_DIV1;
/* PCLK1 = HCLK */
/* PCLK1 = HCLK/2 */
RCC->CFGR |= (uint32_t)RCC_CFGR_PPRE1_DIV2;
#ifdef STM32F10X_CL

View File

@ -2,8 +2,8 @@
******************************************************************************
* @file system_stm32f10x.h
* @author MCD Application Team
* @version V3.1.0
* @date 06/19/2009
* @version V3.1.2
* @date 09/28/2009
* @brief CMSIS Cortex-M3 Device Peripheral Access Layer System Header File.
******************************************************************************
*

View File

@ -2,8 +2,8 @@
******************************************************************************
* @file misc.h
* @author MCD Application Team
* @version V3.1.0
* @date 06/19/2009
* @version V3.1.2
* @date 09/28/2009
* @brief This file contains all the functions prototypes for the miscellaneous
* firmware library functions (add-on to CMSIS functions).
******************************************************************************

View File

@ -2,8 +2,8 @@
******************************************************************************
* @file stm32f10x_adc.h
* @author MCD Application Team
* @version V3.1.0
* @date 06/19/2009
* @version V3.1.2
* @date 09/28/2009
* @brief This file contains all the functions prototypes for the ADC firmware
* library.
******************************************************************************

View File

@ -2,8 +2,8 @@
******************************************************************************
* @file stm32f10x_bkp.h
* @author MCD Application Team
* @version V3.1.0
* @date 06/19/2009
* @version V3.1.2
* @date 09/28/2009
* @brief This file contains all the functions prototypes for the BKP firmware
* library.
******************************************************************************

View File

@ -2,8 +2,8 @@
******************************************************************************
* @file stm32f10x_can.h
* @author MCD Application Team
* @version V3.1.0
* @date 06/19/2009
* @version V3.1.2
* @date 09/28/2009
* @brief This file contains all the functions prototypes for the CAN firmware
* library.
******************************************************************************

View File

@ -2,8 +2,8 @@
******************************************************************************
* @file stm32f10x_crc.h
* @author MCD Application Team
* @version V3.1.0
* @date 06/19/2009
* @version V3.1.2
* @date 09/28/2009
* @brief This file contains all the functions prototypes for the CRC firmware
* library.
******************************************************************************

View File

@ -2,8 +2,8 @@
******************************************************************************
* @file stm32f10x_dac.h
* @author MCD Application Team
* @version V3.1.0
* @date 06/19/2009
* @version V3.1.2
* @date 09/28/2009
* @brief This file contains all the functions prototypes for the DAC firmware
* library.
******************************************************************************

View File

@ -2,8 +2,8 @@
******************************************************************************
* @file stm32f10x_dbgmcu.h
* @author MCD Application Team
* @version V3.1.0
* @date 06/19/2009
* @version V3.1.2
* @date 09/28/2009
* @brief This file contains all the functions prototypes for the DBGMCU
* firmware library.
******************************************************************************

View File

@ -2,8 +2,8 @@
******************************************************************************
* @file stm32f10x_dma.h
* @author MCD Application Team
* @version V3.1.0
* @date 06/19/2009
* @version V3.1.2
* @date 09/28/2009
* @brief This file contains all the functions prototypes for the DMA firmware
* library.
******************************************************************************

View File

@ -2,8 +2,8 @@
******************************************************************************
* @file stm32f10x_exti.h
* @author MCD Application Team
* @version V3.1.0
* @date 06/19/2009
* @version V3.1.2
* @date 09/28/2009
* @brief This file contains all the functions prototypes for the EXTI firmware
* library.
******************************************************************************

View File

@ -2,8 +2,8 @@
******************************************************************************
* @file stm32f10x_flash.h
* @author MCD Application Team
* @version V3.1.0
* @date 06/19/2009
* @version V3.1.2
* @date 09/28/2009
* @brief This file contains all the functions prototypes for the FLASH
* firmware library.
******************************************************************************

View File

@ -2,8 +2,8 @@
******************************************************************************
* @file stm32f10x_fsmc.h
* @author MCD Application Team
* @version V3.1.0
* @date 06/19/2009
* @version V3.1.2
* @date 09/28/2009
* @brief This file contains all the functions prototypes for the FSMC firmware
* library.
******************************************************************************

View File

@ -2,8 +2,8 @@
******************************************************************************
* @file stm32f10x_gpio.h
* @author MCD Application Team
* @version V3.1.0
* @date 06/19/2009
* @version V3.1.2
* @date 09/28/2009
* @brief This file contains all the functions prototypes for the GPIO
* firmware library.
******************************************************************************
@ -295,8 +295,8 @@ typedef enum
/** @defgroup Ethernet_Media_Interface
* @{
*/
#define GPIO_ETH_MediaInterface_MII ((u32)0x00000000)
#define GPIO_ETH_MediaInterface_RMII ((u32)0x00000001)
#define GPIO_ETH_MediaInterface_MII ((uint32_t)0x00000000)
#define GPIO_ETH_MediaInterface_RMII ((uint32_t)0x00000001)
#define IS_GPIO_ETH_MEDIA_INTERFACE(INTERFACE) (((INTERFACE) == GPIO_ETH_MediaInterface_MII) || \
((INTERFACE) == GPIO_ETH_MediaInterface_RMII))

View File

@ -2,8 +2,8 @@
******************************************************************************
* @file stm32f10x_i2c.h
* @author MCD Application Team
* @version V3.1.0
* @date 06/19/2009
* @version V3.1.2
* @date 09/28/2009
* @brief This file contains all the functions prototypes for the I2C firmware
* library.
******************************************************************************

View File

@ -2,8 +2,8 @@
******************************************************************************
* @file stm32f10x_iwdg.h
* @author MCD Application Team
* @version V3.1.0
* @date 06/19/2009
* @version V3.1.2
* @date 09/28/2009
* @brief This file contains all the functions prototypes for the IWDG
* firmware library.
******************************************************************************

View File

@ -2,8 +2,8 @@
******************************************************************************
* @file stm32f10x_pwr.h
* @author MCD Application Team
* @version V3.1.0
* @date 06/19/2009
* @version V3.1.2
* @date 09/28/2009
* @brief This file contains all the functions prototypes for the PWR firmware
* library.
******************************************************************************

View File

@ -2,8 +2,8 @@
******************************************************************************
* @file stm32f10x_rcc.h
* @author MCD Application Team
* @version V3.1.0
* @date 06/19/2009
* @version V3.1.2
* @date 09/28/2009
* @brief This file contains all the functions prototypes for the RCC firmware
* library.
******************************************************************************

View File

@ -2,8 +2,8 @@
******************************************************************************
* @file stm32f10x_rtc.h
* @author MCD Application Team
* @version V3.1.0
* @date 06/19/2009
* @version V3.1.2
* @date 09/28/2009
* @brief This file contains all the functions prototypes for the RTC firmware
* library.
******************************************************************************

View File

@ -2,8 +2,8 @@
******************************************************************************
* @file stm32f10x_sdio.h
* @author MCD Application Team
* @version V3.1.0
* @date 06/19/2009
* @version V3.1.2
* @date 09/28/2009
* @brief This file contains all the functions prototypes for the SDIO firmware
* library.
******************************************************************************

View File

@ -2,8 +2,8 @@
******************************************************************************
* @file stm32f10x_spi.h
* @author MCD Application Team
* @version V3.1.0
* @date 06/19/2009
* @version V3.1.2
* @date 09/28/2009
* @brief This file contains all the functions prototypes for the SPI firmware
* library.
******************************************************************************
@ -98,7 +98,7 @@ typedef struct
uint16_t I2S_MCLKOutput; /*!< Specifies whether the I2S MCLK output is enabled or not.
This parameter can be any combination of @ref I2S_MCLK_Output */
uint16_t I2S_AudioFreq; /*!< Specifies the frequency selected for the I2S communication.
uint32_t I2S_AudioFreq; /*!< Specifies the frequency selected for the I2S communication.
This parameter can be any combination of @ref I2S_Audio_Frequency */
uint16_t I2S_CPOL; /*!< Specifies the idle state of the I2S clock.
@ -298,15 +298,15 @@ typedef struct
* @{
*/
#define I2S_AudioFreq_96k ((uint16_t)96000)
#define I2S_AudioFreq_48k ((uint16_t)48000)
#define I2S_AudioFreq_44k ((uint16_t)44100)
#define I2S_AudioFreq_32k ((uint16_t)32000)
#define I2S_AudioFreq_22k ((uint16_t)22050)
#define I2S_AudioFreq_16k ((uint16_t)16000)
#define I2S_AudioFreq_11k ((uint16_t)11025)
#define I2S_AudioFreq_8k ((uint16_t)8000)
#define I2S_AudioFreq_Default ((uint16_t)2)
#define I2S_AudioFreq_96k ((uint32_t)96000)
#define I2S_AudioFreq_48k ((uint32_t)48000)
#define I2S_AudioFreq_44k ((uint32_t)44100)
#define I2S_AudioFreq_32k ((uint32_t)32000)
#define I2S_AudioFreq_22k ((uint32_t)22050)
#define I2S_AudioFreq_16k ((uint32_t)16000)
#define I2S_AudioFreq_11k ((uint32_t)11025)
#define I2S_AudioFreq_8k ((uint32_t)8000)
#define I2S_AudioFreq_Default ((uint32_t)2)
#define IS_I2S_AUDIO_FREQ(FREQ) (((FREQ) == I2S_AudioFreq_96k) || \
((FREQ) == I2S_AudioFreq_48k) || \
((FREQ) == I2S_AudioFreq_44k) || \

View File

@ -2,8 +2,8 @@
******************************************************************************
* @file stm32f10x_tim.h
* @author MCD Application Team
* @version V3.1.0
* @date 06/19/2009
* @version V3.1.2
* @date 09/28/2009
* @brief This file contains all the functions prototypes for the TIM firmware
* library.
******************************************************************************

View File

@ -2,8 +2,8 @@
******************************************************************************
* @file stm32f10x_usart.h
* @author MCD Application Team
* @version V3.1.0
* @date 06/19/2009
* @version V3.1.2
* @date 09/28/2009
* @brief This file contains all the functions prototypes for the USART
* firmware library.
******************************************************************************
@ -51,7 +51,7 @@ typedef struct
uint32_t USART_BaudRate; /*!< This member configures the USART communication baud rate.
The baud rate is computed using the following formula:
- IntegerDivider = ((PCLKx) / (16 * (USART_InitStruct->USART_BaudRate)))
- FractionalDivider = ((IntegerDivider - ((u32) IntegerDivider)) * 16) + 0.5 */
- FractionalDivider = ((IntegerDivider - ((uint32_t) IntegerDivider)) * 16) + 0.5 */
uint16_t USART_WordLength; /*!< Specifies the number of data bits transmitted or received in a frame.
This parameter can be a value of @ref USART_Word_Length */

View File

@ -2,8 +2,8 @@
******************************************************************************
* @file stm32f10x_wwdg.h
* @author MCD Application Team
* @version V3.1.0
* @date 06/19/2009
* @version V3.1.2
* @date 09/28/2009
* @brief This file contains all the functions prototypes for the WWDG firmware
* library.
******************************************************************************

View File

@ -2,8 +2,8 @@
******************************************************************************
* @file misc.c
* @author MCD Application Team
* @version V3.1.0
* @date 06/19/2009
* @version V3.1.2
* @date 09/28/2009
* @brief This file provides all the miscellaneous firmware functions (add-on
* to CMSIS functions).
******************************************************************************

View File

@ -2,8 +2,8 @@
******************************************************************************
* @file stm32f10x_adc.c
* @author MCD Application Team
* @version V3.1.0
* @date 06/19/2009
* @version V3.1.2
* @date 09/28/2009
* @brief This file provides all the ADC firmware functions.
******************************************************************************
* @copy

View File

@ -2,8 +2,8 @@
******************************************************************************
* @file stm32f10x_bkp.c
* @author MCD Application Team
* @version V3.1.0
* @date 06/19/2009
* @version V3.1.2
* @date 09/28/2009
* @brief This file provides all the BKP firmware functions.
******************************************************************************
* @copy

View File

@ -2,8 +2,8 @@
******************************************************************************
* @file stm32f10x_can.c
* @author MCD Application Team
* @version V3.1.0
* @date 06/19/2009
* @version V3.1.2
* @date 09/28/2009
* @brief This file provides all the CAN firmware functions.
******************************************************************************
* @copy

View File

@ -2,8 +2,8 @@
******************************************************************************
* @file stm32f10x_crc.c
* @author MCD Application Team
* @version V3.1.0
* @date 06/19/2009
* @version V3.1.2
* @date 09/28/2009
* @brief This file provides all the CRC firmware functions.
******************************************************************************
* @copy

View File

@ -2,8 +2,8 @@
******************************************************************************
* @file stm32f10x_dac.c
* @author MCD Application Team
* @version V3.1.0
* @date 06/19/2009
* @version V3.1.2
* @date 09/28/2009
* @brief This file provides all the DAC firmware functions.
******************************************************************************
* @copy

View File

@ -2,8 +2,8 @@
******************************************************************************
* @file stm32f10x_dbgmcu.c
* @author MCD Application Team
* @version V3.1.0
* @date 06/19/2009
* @version V3.1.2
* @date 09/28/2009
* @brief This file provides all the DBGMCU firmware functions.
******************************************************************************
* @copy

View File

@ -2,8 +2,8 @@
******************************************************************************
* @file stm32f10x_dma.c
* @author MCD Application Team
* @version V3.1.0
* @date 06/19/2009
* @version V3.1.2
* @date 09/28/2009
* @brief This file provides all the DMA firmware functions.
******************************************************************************
* @copy

View File

@ -2,8 +2,8 @@
******************************************************************************
* @file stm32f10x_exti.c
* @author MCD Application Team
* @version V3.1.0
* @date 06/19/2009
* @version V3.1.2
* @date 09/28/2009
* @brief This file provides all the EXTI firmware functions.
******************************************************************************
* @copy

View File

@ -2,8 +2,8 @@
******************************************************************************
* @file stm32f10x_flash.c
* @author MCD Application Team
* @version V3.1.0
* @date 06/19/2009
* @version V3.1.2
* @date 09/28/2009
* @brief This file provides all the FLASH firmware functions.
******************************************************************************
* @copy
@ -264,6 +264,10 @@ FLASH_Status FLASH_EraseAllPages(void)
/**
* @brief Erases the FLASH option bytes.
* @note This functions erases all option bytes and then deactivates the Read
* protection. If the user needs to keep the Read protection activated,
* he has to enable it after this function call (using
* FLASH_ReadOutProtection function)
* @param None
* @retval FLASH Status: The returned value can be: FLASH_ERROR_PG,
* FLASH_ERROR_WRP, FLASH_COMPLETE or FLASH_TIMEOUT.
@ -293,7 +297,7 @@ FLASH_Status FLASH_EraseOptionBytes(void)
/* Enable the Option Bytes Programming operation */
FLASH->CR |= CR_OPTPG_Set;
/* Enable the readout access */
/* Disable the Read protection */
OB->RDP= RDP_Key;
/* Wait for last operation to be completed */
status = FLASH_WaitForLastOperation(ProgramTimeout);

View File

@ -2,8 +2,8 @@
******************************************************************************
* @file stm32f10x_fsmc.c
* @author MCD Application Team
* @version V3.1.0
* @date 06/19/2009
* @version V3.1.2
* @date 09/28/2009
* @brief This file provides all the FSMC firmware functions.
******************************************************************************
* @copy

View File

@ -2,8 +2,8 @@
******************************************************************************
* @file stm32f10x_gpio.c
* @author MCD Application Team
* @version V3.1.0
* @date 06/19/2009
* @version V3.1.2
* @date 09/28/2009
* @brief This file provides all the GPIO firmware functions.
******************************************************************************
* @copy
@ -57,7 +57,7 @@
/* --- MAPR Register ---*/
/* Alias word address of MII_RMII_SEL bit */
#define MAPR_OFFSET (AFIO_OFFSET + 0x04)
#define MII_RMII_SEL_BitNumber ((u8)0x17)
#define MII_RMII_SEL_BitNumber ((uint8_t)0x17)
#define MAPR_MII_RMII_SEL_BB (PERIPH_BB_BASE + (MAPR_OFFSET * 32) + (MII_RMII_SEL_BitNumber * 4))

View File

@ -2,8 +2,8 @@
******************************************************************************
* @file stm32f10x_i2c.c
* @author MCD Application Team
* @version V3.1.0
* @date 06/19/2009
* @version V3.1.2
* @date 09/28/2009
* @brief This file provides all the I2C firmware functions.
******************************************************************************
* @copy

View File

@ -2,8 +2,8 @@
******************************************************************************
* @file stm32f10x_iwdg.c
* @author MCD Application Team
* @version V3.1.0
* @date 06/19/2009
* @version V3.1.2
* @date 09/28/2009
* @brief This file provides all the IWDG firmware functions.
******************************************************************************
* @copy

View File

@ -2,8 +2,8 @@
******************************************************************************
* @file stm32f10x_pwr.c
* @author MCD Application Team
* @version V3.1.0
* @date 06/19/2009
* @version V3.1.2
* @date 09/28/2009
* @brief This file provides all the PWR firmware functions.
******************************************************************************
* @copy

View File

@ -2,8 +2,8 @@
******************************************************************************
* @file stm32f10x_rcc.c
* @author MCD Application Team
* @version V3.1.0
* @date 06/19/2009
* @version V3.1.2
* @date 09/28/2009
* @brief This file provides all the RCC firmware functions.
******************************************************************************
* @copy

View File

@ -2,8 +2,8 @@
******************************************************************************
* @file stm32f10x_rtc.c
* @author MCD Application Team
* @version V3.1.0
* @date 06/19/2009
* @version V3.1.2
* @date 09/28/2009
* @brief This file provides all the RTC firmware functions.
******************************************************************************
* @copy

View File

@ -2,8 +2,8 @@
******************************************************************************
* @file stm32f10x_sdio.c
* @author MCD Application Team
* @version V3.1.0
* @date 06/19/2009
* @version V3.1.2
* @date 09/28/2009
* @brief This file provides all the SDIO firmware functions.
******************************************************************************
* @copy

View File

@ -2,8 +2,8 @@
******************************************************************************
* @file stm32f10x_spi.c
* @author MCD Application Team
* @version V3.1.0
* @date 06/19/2009
* @version V3.1.2
* @date 09/28/2009
* @brief This file provides all the SPI firmware functions.
******************************************************************************
* @copy
@ -72,10 +72,10 @@
#define I2S_Mode_Select ((uint16_t)0x0800)
/* I2S clock source selection masks */
#define I2S2_CLOCK_SRC ((u32)(0x00020000))
#define I2S3_CLOCK_SRC ((u32)(0x00040000))
#define I2S_MUL_MASK ((u32)(0x0000F000))
#define I2S_DIV_MASK ((u32)(0x000000F0))
#define I2S2_CLOCK_SRC ((uint32_t)(0x00020000))
#define I2S3_CLOCK_SRC ((uint32_t)(0x00040000))
#define I2S_MUL_MASK ((uint32_t)(0x0000F000))
#define I2S_DIV_MASK ((uint32_t)(0x000000F0))
/**
* @}
@ -332,7 +332,7 @@ void I2S_Init(SPI_TypeDef* SPIx, I2S_InitTypeDef* I2S_InitStruct)
tmp = tmp / 10;
/* Check the parity of the divider */
i2sodd = (uint16_t)(tmp & (u16)0x0001);
i2sodd = (uint16_t)(tmp & (uint16_t)0x0001);
/* Compute the i2sdiv prescaler */
i2sdiv = (uint16_t)((tmp - i2sodd) / 2);

View File

@ -2,8 +2,8 @@
******************************************************************************
* @file stm32f10x_tim.c
* @author MCD Application Team
* @version V3.1.0
* @date 06/19/2009
* @version V3.1.2
* @date 09/28/2009
* @brief This file provides all the TIM firmware functions.
******************************************************************************
* @copy
@ -297,8 +297,8 @@ void TIM_OC1Init(TIM_TypeDef* TIMx, TIM_OCInitTypeDef* TIM_OCInitStruct)
/* Get the TIMx CCMR1 register value */
tmpccmrx = TIMx->CCMR1;
/* Reset the Output Compare Mode Bits */
tmpccmrx &= CCMR_OC13M_Mask;
/* Reset the Output Compare mode and Capture/Compare selection Bits */
tmpccmrx &= CCMR_OC13M_Mask & CCMR_CC13S_Mask;
/* Select the Output Compare Mode */
tmpccmrx |= TIM_OCInitStruct->TIM_OCMode;
@ -311,9 +311,6 @@ void TIM_OC1Init(TIM_TypeDef* TIMx, TIM_OCInitTypeDef* TIM_OCInitStruct)
/* Set the Output State */
tmpccer |= TIM_OCInitStruct->TIM_OutputState;
/* Set the Capture Compare Register value */
TIMx->CCR1 = TIM_OCInitStruct->TIM_Pulse;
if(((uint32_t) TIMx == TIM1_BASE) || ((uint32_t) TIMx == TIM8_BASE))
{
assert_param(IS_TIM_OUTPUTN_STATE(TIM_OCInitStruct->TIM_OutputNState));
@ -344,6 +341,9 @@ void TIM_OC1Init(TIM_TypeDef* TIMx, TIM_OCInitTypeDef* TIM_OCInitStruct)
/* Write to TIMx CCMR1 */
TIMx->CCMR1 = tmpccmrx;
/* Set the Capture Compare Register value */
TIMx->CCR1 = TIM_OCInitStruct->TIM_Pulse;
/* Write to TIMx CCER */
TIMx->CCER = tmpccer;
}
@ -376,8 +376,8 @@ void TIM_OC2Init(TIM_TypeDef* TIMx, TIM_OCInitTypeDef* TIM_OCInitStruct)
/* Get the TIMx CCMR1 register value */
tmpccmrx = TIMx->CCMR1;
/* Reset the Output Compare Mode Bits */
tmpccmrx &= CCMR_OC24M_Mask;
/* Reset the Output Compare mode and Capture/Compare selection Bits */
tmpccmrx &= CCMR_OC24M_Mask & CCMR_CC24S_Mask;
/* Select the Output Compare Mode */
tmpccmrx |= (uint16_t)(TIM_OCInitStruct->TIM_OCMode << 8);
@ -390,9 +390,6 @@ void TIM_OC2Init(TIM_TypeDef* TIMx, TIM_OCInitTypeDef* TIM_OCInitStruct)
/* Set the Output State */
tmpccer |= (uint16_t)(TIM_OCInitStruct->TIM_OutputState << 4);
/* Set the Capture Compare Register value */
TIMx->CCR2 = TIM_OCInitStruct->TIM_Pulse;
if(((uint32_t) TIMx == TIM1_BASE) || ((uint32_t) TIMx == TIM8_BASE))
{
assert_param(IS_TIM_OUTPUTN_STATE(TIM_OCInitStruct->TIM_OutputNState));
@ -423,6 +420,9 @@ void TIM_OC2Init(TIM_TypeDef* TIMx, TIM_OCInitTypeDef* TIM_OCInitStruct)
/* Write to TIMx CCMR1 */
TIMx->CCMR1 = tmpccmrx;
/* Set the Capture Compare Register value */
TIMx->CCR2 = TIM_OCInitStruct->TIM_Pulse;
/* Write to TIMx CCER */
TIMx->CCER = tmpccer;
}
@ -455,8 +455,8 @@ void TIM_OC3Init(TIM_TypeDef* TIMx, TIM_OCInitTypeDef* TIM_OCInitStruct)
/* Get the TIMx CCMR2 register value */
tmpccmrx = TIMx->CCMR2;
/* Reset the Output Compare Mode Bits */
tmpccmrx &= CCMR_OC13M_Mask;
/* Reset the Output Compare mode and Capture/Compare selection Bits */
tmpccmrx &= CCMR_OC13M_Mask & CCMR_CC13S_Mask;
/* Select the Output Compare Mode */
tmpccmrx |= TIM_OCInitStruct->TIM_OCMode;
@ -469,9 +469,6 @@ void TIM_OC3Init(TIM_TypeDef* TIMx, TIM_OCInitTypeDef* TIM_OCInitStruct)
/* Set the Output State */
tmpccer |= (uint16_t)(TIM_OCInitStruct->TIM_OutputState << 8);
/* Set the Capture Compare Register value */
TIMx->CCR3 = TIM_OCInitStruct->TIM_Pulse;
if(((uint32_t) TIMx == TIM1_BASE) || ((uint32_t) TIMx == TIM8_BASE))
{
assert_param(IS_TIM_OUTPUTN_STATE(TIM_OCInitStruct->TIM_OutputNState));
@ -502,6 +499,9 @@ void TIM_OC3Init(TIM_TypeDef* TIMx, TIM_OCInitTypeDef* TIM_OCInitStruct)
/* Write to TIMx CCMR2 */
TIMx->CCMR2 = tmpccmrx;
/* Set the Capture Compare Register value */
TIMx->CCR3 = TIM_OCInitStruct->TIM_Pulse;
/* Write to TIMx CCER */
TIMx->CCER = tmpccer;
}
@ -534,8 +534,8 @@ void TIM_OC4Init(TIM_TypeDef* TIMx, TIM_OCInitTypeDef* TIM_OCInitStruct)
/* Get the TIMx CCMR2 register value */
tmpccmrx = TIMx->CCMR2;
/* Reset the Output Compare Mode Bits */
tmpccmrx &= CCMR_OC24M_Mask;
/* Reset the Output Compare mode and Capture/Compare selection Bits */
tmpccmrx &= CCMR_OC24M_Mask & CCMR_CC24S_Mask;
/* Select the Output Compare Mode */
tmpccmrx |= (uint16_t)(TIM_OCInitStruct->TIM_OCMode << 8);
@ -548,9 +548,6 @@ void TIM_OC4Init(TIM_TypeDef* TIMx, TIM_OCInitTypeDef* TIM_OCInitStruct)
/* Set the Output State */
tmpccer |= (uint16_t)(TIM_OCInitStruct->TIM_OutputState << 12);
/* Set the Capture Compare Register value */
TIMx->CCR4 = TIM_OCInitStruct->TIM_Pulse;
if(((uint32_t) TIMx == TIM1_BASE) || ((uint32_t) TIMx == TIM8_BASE))
{
assert_param(IS_TIM_OCIDLE_STATE(TIM_OCInitStruct->TIM_OCIdleState));
@ -565,6 +562,9 @@ void TIM_OC4Init(TIM_TypeDef* TIMx, TIM_OCInitTypeDef* TIM_OCInitStruct)
/* Write to TIMx CCMR2 */
TIMx->CCMR2 = tmpccmrx;
/* Set the Capture Compare Register value */
TIMx->CCR4 = TIM_OCInitStruct->TIM_Pulse;
/* Write to TIMx CCER */
TIMx->CCER = tmpccer;
}

View File

@ -2,8 +2,8 @@
******************************************************************************
* @file stm32f10x_usart.c
* @author MCD Application Team
* @version V3.1.0
* @date 06/19/2009
* @version V3.1.2
* @date 09/28/2009
* @brief This file provides all the USART firmware functions.
******************************************************************************
* @copy

View File

@ -2,8 +2,8 @@
******************************************************************************
* @file stm32f10x_wwdg.c
* @author MCD Application Team
* @version V3.1.0
* @date 06/19/2009
* @version V3.1.2
* @date 09/28/2009
* @brief This file provides all the WWDG firmware functions.
******************************************************************************
* @copy