From fcf3047bb3a11e1eac50af5ebd4d12ae91aaab8d Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Fri, 9 Dec 2022 10:12:15 +0000 Subject: [PATCH] Fixed bug #1247. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@15868 27425a3e-05d8-49a3-a47f-9c15f0e5edd8 --- os/hal/ports/STM32/STM32L1xx/hal_adc_lld.c | 2 +- readme.txt | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/os/hal/ports/STM32/STM32L1xx/hal_adc_lld.c b/os/hal/ports/STM32/STM32L1xx/hal_adc_lld.c index b61a73d20..78c000186 100644 --- a/os/hal/ports/STM32/STM32L1xx/hal_adc_lld.c +++ b/os/hal/ports/STM32/STM32L1xx/hal_adc_lld.c @@ -224,7 +224,7 @@ void adc_lld_start_conversion(ADCDriver *adcp) { /* ADC setup.*/ adcp->adc->SR = 0; - adcp->adc->SMPR1 = grpp->smpr1; + adcp->adc->SMPR1 = grpp->smpr1 | ADC_SQR1_NUM_CH(grpp->num_channels); adcp->adc->SMPR2 = grpp->smpr2; adcp->adc->SMPR3 = grpp->smpr3; adcp->adc->SQR1 = grpp->sqr1; diff --git a/readme.txt b/readme.txt index 3ab56c917..43653b51d 100644 --- a/readme.txt +++ b/readme.txt @@ -131,6 +131,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 wrong initialization in STM32L1xx ADC driver (bug #1247) + (backported to 20.3.5)(backported to 21.11.3). - FIX: Fixed wrong HSI48 support on STM32L0xx (bug #1246) (backported to 20.3.5)(backported to 21.11.3). - FIX: Fixed wrong DMA definitions for STM32L0xx I2C3 peripheral (bug #1245)