From 589cbb2020bd3482d2fdc0bf4d1dc7240d4aff03 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sat, 22 Oct 2022 07:52:45 +0000 Subject: [PATCH] Fixed bug #1240. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@15825 27425a3e-05d8-49a3-a47f-9c15f0e5edd8 --- os/hal/ports/STM32/LLD/ADCv5/hal_adc_lld.c | 2 +- readme.txt | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/os/hal/ports/STM32/LLD/ADCv5/hal_adc_lld.c b/os/hal/ports/STM32/LLD/ADCv5/hal_adc_lld.c index 1a6257e9e..78fdeafd4 100644 --- a/os/hal/ports/STM32/LLD/ADCv5/hal_adc_lld.c +++ b/os/hal/ports/STM32/LLD/ADCv5/hal_adc_lld.c @@ -61,7 +61,7 @@ NOINLINE static void adc_lld_vreg_on(ADC_TypeDef *adc) { #if defined(ADC_CR_ADVREGEN) adc->CR = ADC_CR_ADVREGEN; - volatile uint32_t loop = (STM32_HCLK >> 20) << 4; + volatile uint32_t loop = STM32_HCLK >> 16; do { loop--; } while (loop > 0); diff --git a/readme.txt b/readme.txt index bbd398dcc..c7c24bf06 100644 --- a/readme.txt +++ b/readme.txt @@ -129,6 +129,8 @@ - NEW: Increased stacks size in RT test suite from 128 to 192. added an option to override the stack size by defining THREADS_STACK_SIZE in the makefile. +- FIX: Fixed invalid delay loop in STM32G0/WL ADCv5 driver (bug #1240) + (backported to 20.3.5)(***********TODO*********** backported to 21.11.3). - FIX: Fixed STM32_MCOSEL setting problem (bug #1239)(***********TODO*********** backported to 21.11.3). - FIX: Fixed problems with cache in STM32 SDMMC drivers (bug #1238)(***********TODO*********** backported to 21.11.3). - FIX: Fixed missing clock enables for some GPIOS on some STM32L4s (bug #1237)