mirror of https://github.com/ARMmbed/mbed-os.git
[NUCLEO_F072RB] Update CubeF0 HAL driver
parent
97199bb372
commit
02873be1f7
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f072xb.h
|
||||
* @author MCD Application Team
|
||||
* @version V2.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief CMSIS STM32F072x8/STM32F072xB devices Peripheral Access Layer Header File.
|
||||
*
|
||||
* This file contains:
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx.h
|
||||
* @author MCD Application Team
|
||||
* @version V2.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief CMSIS STM32F0xx Device Peripheral Access Layer Header File.
|
||||
*
|
||||
* The file is the unique include file that the application programmer
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief HAL module driver.
|
||||
* This is the common part of the HAL initialization
|
||||
*
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief This file contains all the functions prototypes for the HAL
|
||||
* module driver.
|
||||
******************************************************************************
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_adc.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief This file provides firmware functions to manage the following
|
||||
* functionalities of the Analog to Digital Convertor (ADC)
|
||||
* peripheral:
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_adc.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief Header file containing functions prototypes of ADC HAL library.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_adc_ex.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief This file provides firmware functions to manage the following
|
||||
* functionalities of the Analog to Digital Convertor (ADC)
|
||||
* peripheral:
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_adc_ex.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief Header file of ADC HAL Extension module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_can.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief CAN HAL module driver.
|
||||
*
|
||||
* This file provides firmware functions to manage the following
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_can.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief Header file of CAN HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_cec.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief CEC HAL module driver.
|
||||
*
|
||||
* This file provides firmware functions to manage the following
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_cec.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief Header file of CEC HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_comp.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief COMP HAL module driver.
|
||||
*
|
||||
* This file provides firmware functions to manage the following
|
||||
|
@ -19,7 +19,7 @@
|
|||
================================================================================
|
||||
|
||||
[..]
|
||||
The STM32F0xx device family integrates 2 analog comparators COMP1 and COMP2:
|
||||
The STM32F0xx device family integrates up to 2 analog comparators COMP1 and COMP2:
|
||||
(#) The non inverting input and inverting input can be set to GPIO pins
|
||||
as shown in table1. COMP Inputs below.
|
||||
|
||||
|
@ -93,7 +93,6 @@
|
|||
To use the comparator, perform the following steps:
|
||||
|
||||
(#) Fill in the HAL_COMP_MspInit() to
|
||||
(++) Enable the SYSCFG APB clock to get write access to comparator register using __SYSCFG_CLK_ENABLE()
|
||||
(++) Configure the comparator input in analog mode using HAL_GPIO_Init()
|
||||
(++) Configure the comparator output in alternate function mode using HAL_GPIO_Init() to map the comparator
|
||||
output to the GPIO pin
|
||||
|
@ -107,8 +106,11 @@
|
|||
(++) Select the output redirection
|
||||
(++) Select the hysteresis level
|
||||
(++) Select the power mode
|
||||
(++) Select the event/interrupt mode
|
||||
|
||||
(#) Enable the comparator using HAL_COMP_Start() function
|
||||
(#) Enable the comparator using HAL_COMP_Start() function or HAL_COMP_Start_IT() function for interrupt mode
|
||||
|
||||
(#) Read the comparator output level with HAL_COMP_GetOutputLevel()
|
||||
|
||||
@endverbatim
|
||||
******************************************************************************
|
||||
|
@ -227,7 +229,7 @@ HAL_StatusTypeDef HAL_COMP_Init(COMP_HandleTypeDef *hcomp)
|
|||
{
|
||||
/* Init SYSCFG and the low level hardware to access comparators */
|
||||
__SYSCFG_CLK_ENABLE();
|
||||
|
||||
|
||||
HAL_COMP_MspInit(hcomp);
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_comp.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief Header file of COMP HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_conf.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief HAL configuration file.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_cortex.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief CORTEX HAL module driver.
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities of the CORTEX:
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_cortex.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief Header file of CORTEX HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_crc.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief CRC HAL module driver.
|
||||
*
|
||||
* This file provides firmware functions to manage the following
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_crc.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief Header file of CRC HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_crc_ex.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief Extended CRC HAL module driver.
|
||||
*
|
||||
* This file provides firmware functions to manage the following
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_crc_ex.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief Header file of CRC HAL extension module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_dac.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief DAC HAL module driver.
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities of the Digital to Analog Converter (DAC) peripheral:
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_dac.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief Header file of DAC HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_dac_ex.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief DAC HAL module driver.
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities of DAC extension peripheral:
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_dac.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief Header file of DAC HAL Extension module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_def.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief This file contains HAL common defines, enumeration, macros and
|
||||
* structures definitions.
|
||||
******************************************************************************
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_dma.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief DMA HAL module driver.
|
||||
*
|
||||
* This file provides firmware functions to manage the following
|
||||
|
@ -219,6 +219,9 @@ HAL_StatusTypeDef HAL_DMA_DeInit(DMA_HandleTypeDef *hdma)
|
|||
return HAL_ERROR;
|
||||
}
|
||||
|
||||
/* Check the parameters */
|
||||
assert_param(IS_DMA_ALL_INSTANCE(hdma->Instance));
|
||||
|
||||
/* Check the DMA peripheral state */
|
||||
if(hdma->State == HAL_DMA_STATE_BUSY)
|
||||
{
|
||||
|
@ -384,21 +387,21 @@ HAL_StatusTypeDef HAL_DMA_Abort(DMA_HandleTypeDef *hdma)
|
|||
/* Update error code */
|
||||
hdma->ErrorCode |= HAL_DMA_ERROR_TIMEOUT;
|
||||
|
||||
/* Process Unlocked */
|
||||
__HAL_UNLOCK(hdma);
|
||||
|
||||
/* Change the DMA state */
|
||||
hdma->State = HAL_DMA_STATE_TIMEOUT;
|
||||
|
||||
/* Process Unlocked */
|
||||
__HAL_UNLOCK(hdma);
|
||||
|
||||
return HAL_TIMEOUT;
|
||||
}
|
||||
}
|
||||
/* Process Unlocked */
|
||||
__HAL_UNLOCK(hdma);
|
||||
|
||||
/* Change the DMA state*/
|
||||
hdma->State = HAL_DMA_STATE_READY;
|
||||
|
||||
/* Process Unlocked */
|
||||
__HAL_UNLOCK(hdma);
|
||||
|
||||
return HAL_OK;
|
||||
}
|
||||
|
||||
|
@ -453,12 +456,12 @@ HAL_StatusTypeDef HAL_DMA_PollForTransfer(DMA_HandleTypeDef *hdma, uint32_t Comp
|
|||
/* Update error code */
|
||||
hdma->ErrorCode |= HAL_DMA_ERROR_TIMEOUT;
|
||||
|
||||
/* Process Unlocked */
|
||||
__HAL_UNLOCK(hdma);
|
||||
|
||||
/* Change the DMA state */
|
||||
hdma->State = HAL_DMA_STATE_TIMEOUT;
|
||||
|
||||
/* Process Unlocked */
|
||||
__HAL_UNLOCK(hdma);
|
||||
|
||||
return HAL_TIMEOUT;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_dma.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief Header file of DMA HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_dma_ex.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief Header file of DMA HAL Extension module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_flash.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief FLASH HAL module driver.
|
||||
*
|
||||
* This file provides firmware functions to manage the following
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_flash.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief Header file of Flash HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_flash_ex.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief Extended FLASH HAL module driver.
|
||||
*
|
||||
* This file provides firmware functions to manage the following
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_flash_ex.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief Header file of FLASH HAL Extension module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_gpio.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief GPIO HAL module driver.
|
||||
*
|
||||
* This file provides firmware functions to manage the following
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_gpio.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief Header file of GPIO HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_gpio_ex.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief Header file of GPIO HAL Extension module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -512,8 +512,8 @@
|
|||
|
||||
#endif /* STM32F072xB || STM32F078xx */
|
||||
|
||||
#if defined (STM32F042x6)
|
||||
/*--------------------------- STM32F042x6 ---------------------------*/
|
||||
#if defined (STM32F042x6) || defined (STM32F048xx)
|
||||
/*--------------------------- STM32F042x6/STM32F048xx ---------------------------*/
|
||||
/**
|
||||
* @brief AF 0 selection on PA, PB, PF
|
||||
*/
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_i2c.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief I2C HAL module driver.
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities of the Inter Integrated Circuit (I2C) peripheral:
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_i2c.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief Header file of I2C HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_i2c_ex.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief I2C Extension HAL module driver.
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities of I2C extension peripheral:
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_i2c_ex.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief Header file of I2C HAL Extension module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_i2s.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief I2S HAL module driver.
|
||||
*
|
||||
* This file provides firmware functions to manage the following
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_i2s.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief Header file of I2S HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -186,13 +186,13 @@ typedef struct
|
|||
/** @defgroup I2S_Standard
|
||||
* @{
|
||||
*/
|
||||
#define I2S_STANDARD_PHILLIPS ((uint32_t)0x00000000)
|
||||
#define I2S_STANDARD_PHILIPS ((uint32_t)0x00000000)
|
||||
#define I2S_STANDARD_MSB ((uint32_t)0x00000010)
|
||||
#define I2S_STANDARD_LSB ((uint32_t)0x00000020)
|
||||
#define I2S_STANDARD_PCM_SHORT ((uint32_t)0x00000030)
|
||||
#define I2S_STANDARD_PCM_LONG ((uint32_t)0x000000B0)
|
||||
|
||||
#define IS_I2S_STANDARD(STANDARD) (((STANDARD) == I2S_STANDARD_PHILLIPS) || \
|
||||
#define IS_I2S_STANDARD(STANDARD) (((STANDARD) == I2S_STANDARD_PHILIPS) || \
|
||||
((STANDARD) == I2S_STANDARD_MSB) || \
|
||||
((STANDARD) == I2S_STANDARD_LSB) || \
|
||||
((STANDARD) == I2S_STANDARD_PCM_SHORT) || \
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_irda.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief IRDA HAL module driver.
|
||||
*
|
||||
* This file provides firmware functions to manage the following
|
||||
|
@ -1000,9 +1000,6 @@ static HAL_StatusTypeDef IRDA_Receive_IT(IRDA_HandleTypeDef *hirda)
|
|||
|
||||
if(--hirda->RxXferCount == 0)
|
||||
{
|
||||
while(HAL_IS_BIT_SET(hirda->Instance->ISR, IRDA_FLAG_RXNE))
|
||||
{
|
||||
}
|
||||
__HAL_IRDA_DISABLE_IT(hirda, IRDA_IT_RXNE);
|
||||
|
||||
if(hirda->State == HAL_IRDA_STATE_BUSY_TX_RX)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_irda.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief Header file of IRDA HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_irda_ex.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief Header file of IRDA HAL Extension module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_iwdg.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief IWDG HAL module driver.
|
||||
*
|
||||
* This file provides firmware functions to manage the following
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_iwdg.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief Header file of IWDG HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_pcd.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief PCD HAL module driver.
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities of the USB Peripheral Controller:
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_pcd.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief Header file of PCD HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_pcd_ex.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief Extended PCD HAL module driver.
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities of the USB Peripheral Controller:
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_pcd_ex.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief Header file of PCD HAL Extension module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_pwr.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief PWR HAL module driver.
|
||||
*
|
||||
* This file provides firmware functions to manage the following
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_pwr.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief Header file of PWR HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_pwr_ex.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief Extended PWR HAL module driver.
|
||||
*
|
||||
* This file provides firmware functions to manage the following
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_pwr_ex.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief Header file of PWR HAL Extension module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_rcc.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief RCC HAL module driver.
|
||||
*
|
||||
* This file provides firmware functions to manage the following
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_rcc.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief Header file of RCC HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_rcc_ex.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief Extended RCC HAL module driver
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities RCC extension peripheral:
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_rcc_ex.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief Header file of RCC HAL Extension module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_rtc.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief RTC HAL module driver.
|
||||
*
|
||||
* This file provides firmware functions to manage the following
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_rtc.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief Header file of RTC HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_rtc_ex.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief Extended RTC HAL module driver.
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities of the Real Time Clock (RTC) Extension peripheral:
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_rtc_ex.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief Header file of RTC HAL Extension module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_smartcard.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief SMARTCARD HAL module driver.
|
||||
*
|
||||
* This file provides firmware functions to manage the following
|
||||
|
@ -1049,9 +1049,6 @@ static HAL_StatusTypeDef SMARTCARD_Receive_IT(SMARTCARD_HandleTypeDef *hsmartcar
|
|||
|
||||
if(--hsmartcard->RxXferCount == 0)
|
||||
{
|
||||
while(HAL_IS_BIT_SET(hsmartcard->Instance->ISR, SMARTCARD_FLAG_RXNE))
|
||||
{
|
||||
}
|
||||
__HAL_SMARTCARD_DISABLE_IT(hsmartcard, SMARTCARD_IT_RXNE);
|
||||
|
||||
/* Check if a transmit Process is ongoing or not */
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_smartcard.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief Header file of SMARTCARD HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_smartcard_ex.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief SMARTCARD HAL module driver.
|
||||
*
|
||||
* This file provides extended firmware functions to manage the following
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_smartcard_ex.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief Header file of SMARTCARD HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_smbus.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief SMBUS HAL module driver.
|
||||
*
|
||||
* This file provides firmware functions to manage the following
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_smbus.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief Header file of SMBUS HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_spi.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief SPI HAL module driver.
|
||||
*
|
||||
* This file provides firmware functions to manage the following
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_spi.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief Header file of SPI HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_tim.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief TIM HAL module driver.
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities of the Timer (TIM) peripheral:
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_tim.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief Header file of TIM HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_tim_ex.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief TIM HAL module driver.
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities of the Timer extension peripheral:
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_tim_ex.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief Header file of TIM HAL Extension module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_tsc.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief This file provides firmware functions to manage the following
|
||||
* functionalities of the Touch Sensing Controller (TSC) peripheral:
|
||||
* + Initialization and DeInitialization
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_tsc.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief This file contains all the functions prototypes for the TSC firmware
|
||||
* library.
|
||||
******************************************************************************
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_uart.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief UART HAL module driver.
|
||||
*
|
||||
* This file provides firmware functions to manage the following
|
||||
|
@ -1316,9 +1316,6 @@ HAL_StatusTypeDef UART_Receive_IT(UART_HandleTypeDef *huart)
|
|||
|
||||
if(--huart->RxXferCount == 0)
|
||||
{
|
||||
while(HAL_IS_BIT_SET(huart->Instance->ISR, UART_FLAG_RXNE))
|
||||
{
|
||||
}
|
||||
__HAL_UART_DISABLE_IT(huart, UART_IT_RXNE);
|
||||
|
||||
/* Check if a transmit Process is ongoing or not */
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_uart.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief Header file of UART HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_uart_ex.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief Extended UART HAL module driver.
|
||||
*
|
||||
* This file provides firmware functions to manage the following extended
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_uart_ex.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief Header file of UART HAL Extension module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_usart.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief USART HAL module driver.
|
||||
*
|
||||
* This file provides firmware functions to manage the following
|
||||
|
@ -1450,8 +1450,6 @@ static HAL_StatusTypeDef USART_Receive_IT(USART_HandleTypeDef *husart)
|
|||
|
||||
if(--husart->RxXferCount == 0)
|
||||
{
|
||||
while(HAL_IS_BIT_SET(husart->Instance->ISR, USART_FLAG_RXNE));
|
||||
|
||||
__HAL_USART_DISABLE_IT(husart, USART_IT_RXNE);
|
||||
|
||||
/* Disable the USART Parity Error Interrupt */
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_usart.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief Header file of USART HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_usart_ex.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief Header file of USART HAL Extension module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_wwdg.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief WWDG HAL module driver.
|
||||
*
|
||||
* This file provides firmware functions to manage the following
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file stm32f0xx_hal_wwdg.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief Header file of WWDG HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
******************************************************************************
|
||||
* @file system_stm32f0xx.c
|
||||
* @author MCD Application Team
|
||||
* @version $VERSION$
|
||||
* @date $DATE$
|
||||
* @version V2.0.0
|
||||
* @date 28-May-2014
|
||||
* @brief CMSIS Cortex-M0 Device Peripheral Access Layer System Source File.
|
||||
*
|
||||
* 1. This file provides two functions and one global variable to be called from
|
||||
|
@ -272,17 +272,30 @@ void SystemCoreClockUpdate (void)
|
|||
pllmull = RCC->CFGR & RCC_CFGR_PLLMUL;
|
||||
pllsource = RCC->CFGR & RCC_CFGR_PLLSRC;
|
||||
pllmull = ( pllmull >> 18) + 2;
|
||||
predivfactor = (RCC->CFGR2 & RCC_CFGR2_PREDIV) + 1;
|
||||
|
||||
if (pllsource == RCC_CFGR_PLLSRC_HSI_DIV2)
|
||||
if (pllsource == RCC_CFGR_PLLSRC_HSE_PREDIV)
|
||||
{
|
||||
/* HSI oscillator clock divided by 2 selected as PLL clock entry */
|
||||
SystemCoreClock = (HSI_VALUE >> 1) * pllmull;
|
||||
/* HSE used as PLL clock source : SystemCoreClock = HSE/PREDIV * PLLMUL */
|
||||
SystemCoreClock = (HSE_VALUE/predivfactor) * pllmull;
|
||||
}
|
||||
#if defined(STM32F042x6) || defined(STM32F048xx) || defined(STM32F072xB) || defined(STM32F078xx)
|
||||
else if (pllsource == RCC_CFGR_PLLSRC_HSI48_PREDIV)
|
||||
{
|
||||
/* HSI48 used as PLL clock source : SystemCoreClock = HSI48/PREDIV * PLLMUL */
|
||||
SystemCoreClock = (HSI48_VALUE/predivfactor) * pllmull;
|
||||
}
|
||||
#endif /* STM32F042x6 || STM32F048xx || STM32F072xB || STM32F078xx */
|
||||
else
|
||||
{
|
||||
predivfactor = (RCC->CFGR2 & RCC_CFGR2_PREDIV) + 1;
|
||||
/* HSE oscillator clock selected as PREDIV1 clock entry */
|
||||
SystemCoreClock = (HSE_VALUE / predivfactor) * pllmull;
|
||||
#if defined(STM32F042x6) || defined(STM32F048xx) || \
|
||||
defined(STM32F071xB) || defined(STM32F072xB) || defined(STM32F078xx)
|
||||
/* HSI used as PLL clock source : SystemCoreClock = HSI/PREDIV * PLLMUL */
|
||||
SystemCoreClock = (HSI_VALUE/predivfactor) * pllmull;
|
||||
#else
|
||||
/* HSI used as PLL clock source : SystemCoreClock = HSI/2 * PLLMUL */
|
||||
SystemCoreClock = (HSI_VALUE >> 1) * pllmull;
|
||||
#endif /* STM32F042x6 || STM32F048xx || STM32F071xB || STM32F072xB || STM32F078xx */
|
||||
}
|
||||
break;
|
||||
default: /* HSI used as system clock */
|
||||
|
@ -367,9 +380,9 @@ uint8_t SetSysClock_PLL_HSE(uint8_t bypass)
|
|||
|
||||
// Output clock on MCO pin(PA8) for debugging purpose
|
||||
//if (bypass == 0)
|
||||
// HAL_RCC_MCOConfig(RCC_MCO, RCC_MCOSOURCE_HSE, RCC_MCO_DIV2); // 4 MHz
|
||||
// HAL_RCC_MCOConfig(RCC_MCO, RCC_MCOSOURCE_HSE, RCC_MCO_DIV2); // 4 MHz with xtal
|
||||
//else
|
||||
// HAL_RCC_MCOConfig(RCC_MCO, RCC_MCOSOURCE_HSE, RCC_MCO_DIV4); // 2 MHz
|
||||
// HAL_RCC_MCOConfig(RCC_MCO, RCC_MCOSOURCE_HSE, RCC_MCO_DIV4); // 2 MHz with ST-Link MCO
|
||||
|
||||
return 1; // OK
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @file system_stm32f0xx.h
|
||||
* @author MCD Application Team
|
||||
* @version V2.0.0
|
||||
* @date 20-May-2014
|
||||
* @date 28-May-2014
|
||||
* @brief CMSIS Cortex-M0 Device System Source File for STM32F0xx devices.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
|
Loading…
Reference in New Issue