Hi, I'm trying to use the analog comparators of the nucleo-g431kb board. As a reference I'm using the implementation and pin definition of the nucleo-f334r8 board. Looking at RM0364 Reference manual section *15.3.2 COMP pins and internal signals* there is the following
*"The I/Os used as comparators inputs must be configured in analog mode in the GPIOs registers."* But looking at file arch/arm/src/stm32/hardware/stm32f33xxx_pinmap.h the comparator inputs are defined as Alternate Functions /* Comparator Inputs non inverting */ #define GPIO_COMP2_INP (GPIO_ALT|GPIO_AF8|GPIO_PORTA|GPIO_PIN7) #define GPIO_COMP4_INP (GPIO_ALT|GPIO_AF8|GPIO_PORTB|GPIO_PIN0) #define GPIO_COMP6_INP (GPIO_ALT|GPIO_AF8|GPIO_PORTB|GPIO_PIN11) /* Comparator Inputs inverting */ #define GPIO_COMP2_INM_1 (GPIO_ALT|GPIO_AF8|GPIO_PORTA|GPIO_PIN2) #define GPIO_COMP2_INM_2 (GPIO_ALT|GPIO_AF8|GPIO_PORTA|GPIO_PIN4) #define GPIO_COMP4_INM_1 (GPIO_ALT|GPIO_AF8|GPIO_PORTB|GPIO_PIN2) #define GPIO_COMP4_INM_2 (GPIO_ALT|GPIO_AF8|GPIO_PORTA|GPIO_PIN4) #define GPIO_COMP6_INM_1 (GPIO_ALT|GPIO_AF8|GPIO_PORTA|GPIO_PIN4) #define GPIO_COMP6_INM_2 (GPIO_ALT|GPIO_AF8|GPIO_PORTB|GPIO_PIN15) >From the STM32F334x8 datasheet, Table 14 Alternate functions, there are no corresponding definitions to configure comparator inputs on AF8. These definitions correct? Or I am understanding something wrong. Thanks Daniel Pereira de Carvalho