Incorrect assertion in HAL_ADC_ConfigChannel() for STM32H7 #33
Labels
adc
Analog-to-Digital Converter
hal
HAL-LL driver-related issue or pull-request.
internal bug tracker
Issue confirmed and logged into the internal bug tracking system
Milestone
Description of the set-up
Description of the bug
The function
HAL_ADC_ConfigChannel()
contains the following check:I guess the assertion is (incorrectly) copied from the STM32L4 (or other device) HAL code, for which this check is correct. The STM32L4+ reference manual (RM0432 Rev 9) states the following, which matches the description in the code comment:
However, according to the reference manual (RM0433 Rev 7):
Since the offset correction is also supported in oversampling mode on the STM32H753, this assertion is incorrect and should be removed or modified (
OffsetRightShift
andOffsetSignedSaturation
are not supported in oversampling mode, so probably those should be checked instead).How To Reproduce
Call
HAL_ADC_ConfigChannel()
withsConfig->OffsetNumber
defined to another value thenADC_OFFSET_NONE
(e.g.ADC_OFFSET_1
) andhadc->Init.OversamplingMode
set toENABLE
andUSE_FULL_ASSERT
defined.The text was updated successfully, but these errors were encountered: