From 8ea6be21093d567e8ee202dda1a9158df29e5a0f Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sun, 23 Sep 2018 05:30:50 +0000 Subject: [PATCH] Fixed bug #979. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12283 110e8d01-0319-4d1e-a829-52ad28d1bb01 --- os/hal/ports/STM32/LLD/ADCv3/hal_adc_lld.h | 2 +- os/hal/ports/STM32/STM32L4xx+/hal_lld.h | 28 ---------------------- os/hal/ports/STM32/STM32L4xx/hal_lld.h | 28 ---------------------- readme.txt | 2 ++ 4 files changed, 3 insertions(+), 57 deletions(-) diff --git a/os/hal/ports/STM32/LLD/ADCv3/hal_adc_lld.h b/os/hal/ports/STM32/LLD/ADCv3/hal_adc_lld.h index 99a8f5244..149ef22cf 100644 --- a/os/hal/ports/STM32/LLD/ADCv3/hal_adc_lld.h +++ b/os/hal/ports/STM32/LLD/ADCv3/hal_adc_lld.h @@ -608,7 +608,7 @@ #if defined(STM32L4XX) || defined(STM32L4XXP) #if STM32_ADC_ADC123_CLOCK_MODE == ADC_CCR_CKMODE_ADCCK -#define STM32_ADC123_CLOCK STM32_ADC12CLK +#define STM32_ADC123_CLOCK STM32_ADCCLK #elif STM32_ADC_ADC123_CLOCK_MODE == ADC_CCR_CKMODE_AHB_DIV1 #define STM32_ADC123_CLOCK (STM32_HCLK / 1) #elif STM32_ADC_ADC123_CLOCK_MODE == ADC_CCR_CKMODE_AHB_DIV2 diff --git a/os/hal/ports/STM32/STM32L4xx+/hal_lld.h b/os/hal/ports/STM32/STM32L4xx+/hal_lld.h index afc4f5692..df8515aa8 100644 --- a/os/hal/ports/STM32/STM32L4xx+/hal_lld.h +++ b/os/hal/ports/STM32/STM32L4xx+/hal_lld.h @@ -430,34 +430,6 @@ #define STM32_MSIPLL_ENABLED FALSE #endif -/** - * @brief ADC clock setting. - */ -#if !defined(STM32_ADC_CLOCK_ENABLED) || defined(__DOXYGEN__) -#define STM32_ADC_CLOCK_ENABLED TRUE -#endif - -/** - * @brief USB clock setting. - */ -#if !defined(STM32_USB_CLOCK_ENABLED) || defined(__DOXYGEN__) -#define STM32_USB_CLOCK_ENABLED TRUE -#endif - -/** - * @brief SAI1 clock setting. - */ -#if !defined(STM32_SAI1_CLOCK_ENABLED) || defined(__DOXYGEN__) -#define STM32_SAI1_CLOCK_ENABLED TRUE -#endif - -/** - * @brief SAI2 clock setting. - */ -#if !defined(STM32_SAI2_CLOCK_ENABLED) || defined(__DOXYGEN__) -#define STM32_SAI2_CLOCK_ENABLED TRUE -#endif - /** * @brief MSI frequency setting. */ diff --git a/os/hal/ports/STM32/STM32L4xx/hal_lld.h b/os/hal/ports/STM32/STM32L4xx/hal_lld.h index 20be27d30..56042fbfd 100644 --- a/os/hal/ports/STM32/STM32L4xx/hal_lld.h +++ b/os/hal/ports/STM32/STM32L4xx/hal_lld.h @@ -403,34 +403,6 @@ #define STM32_MSIPLL_ENABLED FALSE #endif -/** - * @brief ADC clock setting. - */ -#if !defined(STM32_ADC_CLOCK_ENABLED) || defined(__DOXYGEN__) -#define STM32_ADC_CLOCK_ENABLED TRUE -#endif - -/** - * @brief USB clock setting. - */ -#if !defined(STM32_USB_CLOCK_ENABLED) || defined(__DOXYGEN__) -#define STM32_USB_CLOCK_ENABLED TRUE -#endif - -/** - * @brief SAI1 clock setting. - */ -#if !defined(STM32_SAI1_CLOCK_ENABLED) || defined(__DOXYGEN__) -#define STM32_SAI1_CLOCK_ENABLED TRUE -#endif - -/** - * @brief SAI2 clock setting. - */ -#if !defined(STM32_SAI2_CLOCK_ENABLED) || defined(__DOXYGEN__) -#define STM32_SAI2_CLOCK_ENABLED TRUE -#endif - /** * @brief MSI frequency setting. */ diff --git a/readme.txt b/readme.txt index fcf0869f3..a513d40e3 100644 --- a/readme.txt +++ b/readme.txt @@ -151,6 +151,8 @@ - EX: Updated LIS302DL to 1.1.0 (backported to 18.2.1). - EX: Updated LPS25H to 1.1.0 (backported to 18.2.1). - EX: Updated LSM303DLHC to 1.1.0 (backported to 18.2.1). +- HAL: Fixed invalid STM32 ADCv3 clock selection for L4 and L4+ (bug #979) + (backported to 18.2.2 and 17.6.5). - HAL: Fixed wrong number of endpoints fot STM32F412/413 (bug #978) (backported to 18.2.2 and 17.6.5). - RT: Fixed chEvtGetAndClearFlags(...) does not mask events (bug #977)