STMicroelectronics / STM32CubeL4

STM32Cube MCU Full Package for the STM32L4 series - (HAL + LL Drivers, CMSIS Core, CMSIS Device, MW libraries plus a set of Projects running on all boards provided by ST (Nucleo, Evaluation and Discovery Kits))
Other
262 stars 153 forks source link

LL ADC has duplicated arguments #31

Closed vpetrigo closed 1 year ago

vpetrigo commented 3 years ago

Hello,

This part in the ADC LL driver contains duplicated arguments in & chain:

https://github.com/STMicroelectronics/STM32CubeL4/blob/d023c0d560ace11509f9b761c8913a9e48fcf194/Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_adc.h#L5216

Since READ_BIT is expanded to that:

((*preg) & AWDy))

The second AWDy usage is redundant. So all that expression can be simplified to that:

uint32_t AnalogWDMonitChannels = (READ_BIT(*preg, AWDy) & ADC_AWD_CR_ALL_CHANNEL_MASK);
ASELSTM commented 3 years ago

Hi @vpetrigo,

The issue you pointed out has been confirmed. Indeed, The second AWDyusage is redundant. A fix will be implemented and made available in future release. Thank you once again for your contribution.

With regards,

ASELSTM commented 3 years ago

ST Internal Reference: 101705

ASELSTM commented 1 year ago

Hi @vpetrigo,

Thank you for your contribution. This issue has been fixed in the frame of version v1.17.1 of the STM32CubeL4. Please allow me then to close this thread.

With regards,