cancel
Showing results for 
Search instead for 
Did you mean: 

Why is code generated for analog watchdogs 2 & 3 if ADC sequencer is set to not fully configurable?

mjenz
Visitor

Newcomer to CubeIDE. When I set the ADC parameters for fixed sequencing, i.e. not fully configurable, some initialization code is generated for watchdogs 2 & 3 (see below). I don't want to use analog watchdogs or have to edit the main.c file manually. Is this a bug, or is there some way to alter this behaviour? Only watchdog 1 seems to have an enable check box.

I'm using STM32CubeIDE Version: 1.18.0, Build: 24413_20250227_1633 (UTC) on Linux.

/** Configure the WatchDogs 2
*/
AnalogWDGConfig.WatchdogNumber = ADC_ANALOGWATCHDOG_2;
AnalogWDGConfig.WatchdogMode = ADC_ANALOGWATCHDOG_SINGLE_REG;
if (HAL_ADC_AnalogWDGConfig(&hadc1, &AnalogWDGConfig) != HAL_OK)
{
Error_Handler();
}

/** Configure the WatchDogs 3
*/
AnalogWDGConfig.WatchdogNumber = ADC_ANALOGWATCHDOG_3;
if (HAL_ADC_AnalogWDGConfig(&hadc1, &AnalogWDGConfig) != HAL_OK)
{
Error_Handler();
}
3 REPLIES 3
mjenz
Visitor

Sorry, the title end should have been "not fully configurable".

Hl_st
ST Employee

Hello,

what microcontroller are you using?

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Hi, I'm using the STM32U073CCT6.