Skip to content

Commit ee2f917

Browse files
authored
Merge pull request #2097 from jamike/STM32F3
Target STM32F3
2 parents 829289b + 3046e5b commit ee2f917

File tree

106 files changed

+971
-1226
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+971
-1226
lines changed

hal/targets/cmsis/TARGET_STM/TARGET_STM32F3/stm32_hal_legacy.h

+13-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
******************************************************************************
33
* @file stm32_hal_legacy.h
44
* @author MCD Application Team
5-
* @version V1.2.1
6-
* @date 29-April-2015
5+
* @version V1.3.0
6+
* @date 01-July-2016
77
* @brief This file contains aliases definition for the STM32Cube HAL constants
88
* macros and functions maintained for legacy purpose.
99
******************************************************************************
@@ -150,6 +150,9 @@
150150
#define COMP_NONINVERTINGINPUT_IO1 COMP_INPUT_PLUS_IO1
151151
#define COMP_NONINVERTINGINPUT_IO2 COMP_INPUT_PLUS_IO2
152152
#define COMP_NONINVERTINGINPUT_IO3 COMP_INPUT_PLUS_IO3
153+
#define COMP_NONINVERTINGINPUT_IO4 COMP_INPUT_PLUS_IO4
154+
#define COMP_NONINVERTINGINPUT_IO5 COMP_INPUT_PLUS_IO5
155+
#define COMP_NONINVERTINGINPUT_IO6 COMP_INPUT_PLUS_IO6
153156

154157
#define COMP_INVERTINGINPUT_1_4VREFINT COMP_INPUT_MINUS_1_4VREFINT
155158
#define COMP_INVERTINGINPUT_1_2VREFINT COMP_INPUT_MINUS_1_2VREFINT
@@ -160,8 +163,16 @@
160163
#define COMP_INVERTINGINPUT_DAC1 COMP_INPUT_MINUS_DAC1_CH1
161164
#define COMP_INVERTINGINPUT_DAC2 COMP_INPUT_MINUS_DAC1_CH2
162165
#define COMP_INVERTINGINPUT_IO1 COMP_INPUT_MINUS_IO1
166+
#if defined(STM32L0)
167+
/* Issue fixed on STM32L0 COMP driver: only 2 dedicated IO (IO1 and IO2), */
168+
/* IO2 was wrongly assigned to IO shared with DAC and IO3 was corresponding */
169+
/* to the second dedicated IO (only for COMP2). */
170+
#define COMP_INVERTINGINPUT_IO2 COMP_INPUT_MINUS_DAC1_CH2
171+
#define COMP_INVERTINGINPUT_IO3 COMP_INPUT_MINUS_IO2
172+
#else
163173
#define COMP_INVERTINGINPUT_IO2 COMP_INPUT_MINUS_IO2
164174
#define COMP_INVERTINGINPUT_IO3 COMP_INPUT_MINUS_IO3
175+
#endif
165176
#define COMP_INVERTINGINPUT_IO4 COMP_INPUT_MINUS_IO4
166177
#define COMP_INVERTINGINPUT_IO5 COMP_INPUT_MINUS_IO5
167178

hal/targets/cmsis/TARGET_STM/TARGET_STM32F3/stm32f3xx_hal.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
******************************************************************************
33
* @file stm32f3xx_hal.c
44
* @author MCD Application Team
5-
* @version V1.2.1
6-
* @date 29-April-2015
5+
* @version V1.3.0
6+
* @date 01-July-2016
77
* @brief HAL module driver.
88
* This is the common part of the HAL initialization
99
*
@@ -70,11 +70,11 @@
7070
* @{
7171
*/
7272
/**
73-
* @brief STM32F3xx HAL Driver version number V1.2.1
73+
* @brief STM32F3xx HAL Driver version number V1.3.0
7474
*/
7575
#define __STM32F3xx_HAL_VERSION_MAIN (0x01) /*!< [31:24] main version */
76-
#define __STM32F3xx_HAL_VERSION_SUB1 (0x02) /*!< [23:16] sub1 version */
77-
#define __STM32F3xx_HAL_VERSION_SUB2 (0x01) /*!< [15:8] sub2 version */
76+
#define __STM32F3xx_HAL_VERSION_SUB1 (0x03) /*!< [23:16] sub1 version */
77+
#define __STM32F3xx_HAL_VERSION_SUB2 (0x00) /*!< [15:8] sub2 version */
7878
#define __STM32F3xx_HAL_VERSION_RC (0x00) /*!< [7:0] release candidate */
7979
#define __STM32F3xx_HAL_VERSION ((__STM32F3xx_HAL_VERSION_MAIN << 24)\
8080
|(__STM32F3xx_HAL_VERSION_SUB1 << 16)\

hal/targets/cmsis/TARGET_STM/TARGET_STM32F3/stm32f3xx_hal.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
******************************************************************************
33
* @file stm32f3xx_hal.h
44
* @author MCD Application Team
5-
* @version V1.2.1
6-
* @date 29-April-2015
5+
* @version V1.3.0
6+
* @date 01-July-2016
77
* @brief This file contains all the functions prototypes for the HAL
88
* module driver.
99
******************************************************************************

hal/targets/cmsis/TARGET_STM/TARGET_STM32F3/stm32f3xx_hal_adc.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
******************************************************************************
33
* @file stm32f3xx_hal_adc.c
44
* @author MCD Application Team
5-
* @version V1.2.1
6-
* @date 29-April-2015
5+
* @version V1.3.0
6+
* @date 01-July-2016
77
* @brief This file provides firmware functions to manage the following
88
* functionalities of the Analog to Digital Convertor (ADC)
99
* peripheral:

hal/targets/cmsis/TARGET_STM/TARGET_STM32F3/stm32f3xx_hal_adc.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
******************************************************************************
33
* @file stm32f3xx_hal_adc.h
44
* @author MCD Application Team
5-
* @version V1.2.1
6-
* @date 29-April-2015
5+
* @version V1.3.0
6+
* @date 01-July-2016
77
* @brief Header file containing functions prototypes of ADC HAL library.
88
******************************************************************************
99
* @attention

hal/targets/cmsis/TARGET_STM/TARGET_STM32F3/stm32f3xx_hal_adc_ex.c

+47-30
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
******************************************************************************
33
* @file stm32f3xx_hal_adc_ex.c
44
* @author MCD Application Team
5-
* @version V1.2.1
6-
* @date 29-April-2015
5+
* @version V1.3.0
6+
* @date 01-July-2016
77
* @brief This file provides firmware functions to manage the following
88
* functionalities of the Analog to Digital Convertor (ADC)
99
* peripheral:
@@ -6941,8 +6941,11 @@ HAL_StatusTypeDef HAL_ADCEx_MultiModeConfigChannel(ADC_HandleTypeDef* hadc, ADC_
69416941
/* Check the parameters */
69426942
assert_param(IS_ADC_MULTIMODE_MASTER_INSTANCE(hadc->Instance));
69436943
assert_param(IS_ADC_MODE(multimode->Mode));
6944-
assert_param(IS_ADC_DMA_ACCESS_MODE(multimode->DMAAccessMode));
6945-
assert_param(IS_ADC_SAMPLING_DELAY(multimode->TwoSamplingDelay));
6944+
if(multimode->Mode != ADC_MODE_INDEPENDENT)
6945+
{
6946+
assert_param(IS_ADC_DMA_ACCESS_MODE(multimode->DMAAccessMode));
6947+
assert_param(IS_ADC_SAMPLING_DELAY(multimode->TwoSamplingDelay));
6948+
}
69466949

69476950
/* Process locked */
69486951
__HAL_LOCK(hadc);
@@ -6964,31 +6967,22 @@ HAL_StatusTypeDef HAL_ADCEx_MultiModeConfigChannel(ADC_HandleTypeDef* hadc, ADC_
69646967
/* control registers) */
69656968
tmpADC_Common = ADC_COMMON_REGISTER(hadc);
69666969

6967-
/* Configuration of ADC common group ADC1&ADC2, ADC3&ADC4 if available */
6968-
/* (ADC2, ADC3, ADC4 availability depends on STM32 product) */
6969-
/* - DMA access mode */
6970-
MODIFY_REG(tmpADC_Common->CCR ,
6971-
ADC_CCR_MDMA |
6972-
ADC_CCR_DMACFG ,
6973-
multimode->DMAAccessMode |
6974-
ADC_CCR_MULTI_DMACONTREQ(hadc->Init.DMAContinuousRequests) );
6975-
6976-
/* Parameters that can be updated only when ADC is disabled: */
6977-
/* - Multimode mode selection */
6978-
/* - Multimode delay */
6979-
/* Note: If ADC is not in the appropriate state to modify these */
6980-
/* parameters, their setting is bypassed without error reporting */
6981-
/* (as it can be the expected behaviour in case of intended action */
6982-
/* to update parameter above (which fulfills the ADC state */
6983-
/* condition: no conversion on going on group regular) */
6984-
/* on the fly). */
6985-
if ((ADC_IS_ENABLE(hadc) == RESET) &&
6986-
(ADC_IS_ENABLE(&tmphadcSharingSameCommonRegister) == RESET) )
6970+
/* If multimode is selected, configure all multimode paramaters. */
6971+
/* Otherwise, reset multimode parameters (can be used in case of */
6972+
/* transition from multimode to independent mode). */
6973+
if(multimode->Mode != ADC_MODE_INDEPENDENT)
69876974
{
69886975
/* Configuration of ADC common group ADC1&ADC2, ADC3&ADC4 if available */
69896976
/* (ADC2, ADC3, ADC4 availability depends on STM32 product) */
6990-
/* - set the selected multimode */
69916977
/* - DMA access mode */
6978+
MODIFY_REG(tmpADC_Common->CCR ,
6979+
ADC_CCR_MDMA |
6980+
ADC_CCR_DMACFG ,
6981+
multimode->DMAAccessMode |
6982+
ADC_CCR_MULTI_DMACONTREQ(hadc->Init.DMAContinuousRequests) );
6983+
6984+
/* Parameters that can be updated only when ADC is disabled: */
6985+
/* - Multimode mode selection */
69926986
/* - Set delay between two sampling phases */
69936987
/* Note: Delay range depends on selected resolution: */
69946988
/* from 1 to 12 clock cycles for 12 bits */
@@ -6997,11 +6991,34 @@ HAL_StatusTypeDef HAL_ADCEx_MultiModeConfigChannel(ADC_HandleTypeDef* hadc, ADC_
69976991
/* from 1 to 6 clock cycles for 6 bits */
69986992
/* If a higher delay is selected, it will be clamped to maximum delay */
69996993
/* range */
7000-
MODIFY_REG(tmpADC_Common->CCR ,
7001-
ADC_CCR_MULTI |
7002-
ADC_CCR_DELAY ,
7003-
multimode->Mode |
7004-
multimode->TwoSamplingDelay );
6994+
/* Note: If ADC is not in the appropriate state to modify these */
6995+
/* parameters, their setting is bypassed without error reporting */
6996+
/* (as it can be the expected behaviour in case of intended action */
6997+
/* to update parameter above (which fulfills the ADC state */
6998+
/* condition: no conversion on going on group regular) */
6999+
/* on the fly). */
7000+
if ((ADC_IS_ENABLE(hadc) == RESET) &&
7001+
(ADC_IS_ENABLE(&tmphadcSharingSameCommonRegister) == RESET) )
7002+
{
7003+
MODIFY_REG(tmpADC_Common->CCR ,
7004+
ADC_CCR_MULTI |
7005+
ADC_CCR_DELAY ,
7006+
multimode->Mode |
7007+
multimode->TwoSamplingDelay );
7008+
}
7009+
}
7010+
else /* ADC_MODE_INDEPENDENT */
7011+
{
7012+
CLEAR_BIT(tmpADC_Common->CCR, ADC_CCR_MDMA | ADC_CCR_DMACFG);
7013+
7014+
/* Parameters that can be updated only when ADC is disabled: */
7015+
/* - Multimode mode selection */
7016+
/* - Multimode delay */
7017+
if ((ADC_IS_ENABLE(hadc) == RESET) &&
7018+
(ADC_IS_ENABLE(&tmphadcSharingSameCommonRegister) == RESET) )
7019+
{
7020+
CLEAR_BIT(tmpADC_Common->CCR, ADC_CCR_MULTI | ADC_CCR_DELAY);
7021+
}
70057022
}
70067023
}
70077024
/* If one of the ADC sharing the same common group is enabled, no update */

hal/targets/cmsis/TARGET_STM/TARGET_STM32F3/stm32f3xx_hal_adc_ex.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
******************************************************************************
33
* @file stm32f3xx_hal_adc_ex.h
44
* @author MCD Application Team
5-
* @version V1.2.1
6-
* @date 29-April-2015
5+
* @version V1.3.0
6+
* @date 01-July-2016
77
* @brief Header file containing functions prototypes of ADC HAL library.
88
******************************************************************************
99
* @attention

hal/targets/cmsis/TARGET_STM/TARGET_STM32F3/stm32f3xx_hal_can.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
******************************************************************************
33
* @file stm32f3xx_hal_can.c
44
* @author MCD Application Team
5-
* @version V1.2.1
6-
* @date 29-April-2015
5+
* @version V1.3.0
6+
* @date 01-July-2016
77
* @brief CAN HAL module driver.
88
* This file provides firmware functions to manage the following
99
* functionalities of the Controller Area Network (CAN) peripheral:

hal/targets/cmsis/TARGET_STM/TARGET_STM32F3/stm32f3xx_hal_can.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
******************************************************************************
33
* @file stm32f3xx_hal_can.h
44
* @author MCD Application Team
5-
* @version V1.2.1
6-
* @date 29-April-2015
5+
* @version V1.3.0
6+
* @date 01-July-2016
77
* @brief Header file of CAN HAL module.
88
******************************************************************************
99
* @attention
@@ -239,7 +239,7 @@ typedef struct
239239
__IO HAL_CAN_StateTypeDef State; /*!< CAN communication state */
240240

241241
__IO uint32_t ErrorCode; /*!< CAN Error code
242-
This parameter can be a value of @ref HAL_CAN_Error_Code */
242+
This parameter can be a value of @ref CAN_Error_Code */
243243

244244
}CAN_HandleTypeDef;
245245
/**
@@ -252,7 +252,7 @@ typedef struct
252252
* @{
253253
*/
254254

255-
/** @defgroup HAL_CAN_Error_Code CAN Error Code
255+
/** @defgroup CAN_Error_Code CAN Error Code
256256
* @{
257257
*/
258258
#define HAL_CAN_ERROR_NONE ((uint32_t)0x00000000) /*!< No error */

hal/targets/cmsis/TARGET_STM/TARGET_STM32F3/stm32f3xx_hal_cec.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
******************************************************************************
33
* @file stm32f3xx_hal_cec.c
44
* @author MCD Application Team
5-
* @version V1.2.1
6-
* @date 29-April-2015
5+
* @version V1.3.0
6+
* @date 01-July-2016
77
* @brief CEC HAL module driver.
88
* This file provides firmware functions to manage the following
99
* functionalities of the High Definition Multimedia Interface

hal/targets/cmsis/TARGET_STM/TARGET_STM32F3/stm32f3xx_hal_cec.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
******************************************************************************
33
* @file stm32f3xx_hal_cec.h
44
* @author MCD Application Team
5-
* @version V1.2.1
6-
* @date 29-April-2015
5+
* @version V1.3.0
6+
* @date 01-July-2016
77
* @brief Header file of CEC HAL module.
88
******************************************************************************
99
* @attention

hal/targets/cmsis/TARGET_STM/TARGET_STM32F3/stm32f3xx_hal_comp.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
******************************************************************************
33
* @file stm32f3xx_hal_comp.c
44
* @author MCD Application Team
5-
* @version V1.2.1
6-
* @date 29-April-2015
5+
* @version V1.3.0
6+
* @date 01-July-2016
77
* @brief COMP HAL module driver.
88
* This file provides firmware functions to manage the following
99
* functionalities of the COMP peripheral:

hal/targets/cmsis/TARGET_STM/TARGET_STM32F3/stm32f3xx_hal_comp.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
******************************************************************************
33
* @file stm32f3xx_hal_comp.h
44
* @author MCD Application Team
5-
* @version V1.2.1
6-
* @date 29-April-2015
5+
* @version V1.3.0
6+
* @date 01-July-2016
77
* @brief Header file of COMP HAL module.
88
******************************************************************************
99
* @attention

hal/targets/cmsis/TARGET_STM/TARGET_STM32F3/stm32f3xx_hal_comp_ex.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
******************************************************************************
33
* @file stm32f3xx_hal_comp_ex.h
44
* @author MCD Application Team
5-
* @version V1.2.1
6-
* @date 29-April-2015
5+
* @version V1.3.0
6+
* @date 01-July-2016
77
* @brief Header file of COMP HAL Extended module.
88
******************************************************************************
99
* @attention

hal/targets/cmsis/TARGET_STM/TARGET_STM32F3/stm32f3xx_hal_conf.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
******************************************************************************
33
* @file stm32f3xx_hal_conf.h
44
* @author MCD Application Team
5-
* @version V1.2.1
6-
* @date 29-April-2015
5+
* @version V1.3.0
6+
* @date 01-July-2016
77
* @brief HAL configuration file.
88
******************************************************************************
99
* @attention

0 commit comments

Comments
 (0)