Bug in STM32CubeMX with COMP
For COMP1 on STM32G0 here are the pin assignments from the reference manual

I want PA1 and so I've chosen that in the STM32CubeMX

However, the generated code sets

and the value of InputPlus is
/** @defgroup COMP_InputPlus COMP input plus (non-inverting input)
* @{
*/
#define COMP_INPUT_PLUS_IO1 (0x00000000UL) /*!< Comparator input plus connected to IO1 (pin PC5 for COMP1, pin PB4 for COMP2, pin PB0 for COMP3 (for devices featuring COMP3 instance)) */
#define COMP_INPUT_PLUS_IO2 (COMP_CSR_INPSEL_0) /*!< Comparator input plus connected to IO2 (pin PB2 for COMP1, pin PB6 for COMP2, pin PC1 for COMP3 (for devices featuring COMP3 instance)) */
#define COMP_INPUT_PLUS_IO3 (COMP_CSR_INPSEL_1) /*!< Comparator input plus connected to IO3 (pin PA1 for COMP1, pin PA3 for COMP2, pin PE7 for COMP3 (for devices featuring COMP3 instance)) */
Which apparently maps to PB2 which is wrong!
On the other hand, COMP2 I have chosen PB6 and its getting

COMP2 seems to be right but COMP1 is not.
I have reconfirmed this after forgetting about it and spending hours debugging why my COMP was triggering instantly. Definitely a bug.
Version 6.14.0
STM32G071CBU
