Data filters in LL_ADC_REG_ReadConversionDataX prevent left alignment from working #3
Labels
bug
Something isn't working
hal
HAL-LL driver-related issue or pull-request.
internal bug tracker
Issue confirmed and logged into the internal bug tracking system
Describe the set-up
Any board.
Any IDE/compiler.
Noticed with MC Library with HAL/LL that uses ADC value left alignment.
Describe the bug
In recent version of HAL/LL for G0, functions LL_ADC_REG_ReadConversionData12, LL_ADC_REG_ReadConversionData10, LL_ADC_REG_ReadConversionData8 and LL_ADC_REG_ReadConversionData6 were modified with data filters, respectively 0x00000FFFUL, 0x000003FFUL, 0x000000FFUL, and 0x0000003FUL.
This prevent them from working when LL_ADC_DATA_ALIGN_LEFT is configured.
How To Reproduce
Any project using MC Library or LL_ADC_DATA_ALIGN_LEFT with G0/HAL_LL.
Additional context
Removing the filters mentioned above solves the issue.
For example, for 12 bit data value, the correct function is:
The text was updated successfully, but these errors were encountered: