Associate III
August 18, 2018
Question
Bug in STM32H7 HAL for ADC Injected Channel 18
- August 18, 2018
- 6 replies
- 1438 views
When for ADC2 Channel 18 is selected as Injected Channel and initialized via “HAL_ADCEx_InjectedConfigChannel�? it will return HAL_ERROR.
When no other ADC it will fail in line 2288 2286*. When another ADC is enabled it will fail in line 2277 2275*.
HAL File: stm32h7xx_hal_adc_ex.c
HAL Version: V1.2.0 V1.3.0
I think the block from line 2229 2227* to 2290 2288* should be included in the else in line 2223 2221*.
Btw the comment in line 2245 2243* is wrong the Temp. sensor it is channel 18
It can easily reproduce by code generation of STM32CubeMX.
1. Enable ADC2 -> In18
2. Config ADC2 In18 as Injected Channel
Or use the attached CubeMX project.
*edit for Version V1.3.0
Thanks