Skip to main content
Steve Melnikoff
Senior
September 7, 2020
Question

stm32f3xx_ll_opamp.h (STM32F3xx_DFP v2.1.0) bug

  • September 7, 2020
  • 1 reply
  • 1160 views

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.

This topic has been closed for replies.

1 reply

Imen GH
ST Employee
September 9, 2020

Hi @Steve Melnikoff​ ​,  

Thank you for your feedbacks!

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

Imen

Steve Melnikoff
Senior
September 25, 2020

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.)