Skip to content

analogRead returns 0 if serial is disabled on variant F030F4 HSE 8MHz #2766

Open
@r-pv

Description

@r-pv

Hi all.

Using the stock variant for the F030F4 HSE 8MHz, when using analogRead always returns 0 if the usart is disabled, if the option "enabled (generic serial)" is selected the analogread returns the expected values, even if serial is not used.

Tested this behavior on pins PA0, PA1 and PA2.

I'm using an hal_conf.extra.h with disabled stuff:

//#define HAL_ADC_MODULE_DISABLED
//#define HAL_I2C_MODULE_DISABLED
#define HAL_RTC_MODULE_DISABLED
#define HAL_SPI_MODULE_DISABLED
//#define HAL_TIM_MODULE_DISABLED
#define HAL_DAC_MODULE_DISABLED
#define HAL_EXTI_MODULE_DISABLED
#define HAL_ETH_MODULE_DISABLED
#define HAL_SD_MODULE_DISABLED
#define HAL_QSPI_MODULE_DISABLED

I'm using Arduino IDE 2.3.5 and the stcore 2.10.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions