cancel
Showing results for 
Search instead for 
Did you mean: 

stm32f3xx_ll_opamp.h (STM32F3xx_DFP v2.1.0) bug

Steve Melnikoff
Associate III

File: Arm/Packs/Keil/STM32F3xx_DFP/2.1.0/Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_ll_opamp.h

In this file, function LL_OPAMP_GetCalibrationSelection(), at lines 710-711:

  return (CalibrationSelection |
          ((OPAMP_CSR_TRIMOFFSETN) << (POSITION_VAL(OPAMP_CSR_TRIMOFFSETP) * (CalibrationSelection && OPAMP_CSR_CALSEL))));

The logical "&&" should be a bitwise "&".

ARM compiler v6 generates a warning for this, whereas v5 does not.

2 REPLIES 2
Imen GH
ST Employee

Hi @Steve Melnikoff​ ​,  

Thank you for your feedbacks!

I will raise your reported case internally to take into consideration.

Imen

Note this version of the code is from the latest Keil ST pack. The version of the code in the GitHub repo has been rewritten to avoid this problem.

(My other recent bug report asks that the Keil pack be updated - but we've now switched to the GitHub version to avoid these issues.)