STM32H743II:why can't AWD2 and AWD3 monitor ADC3 but AWD1 can?
Post edited by ST moderator to be inline with the community rules for the code sharing. In next time please use </> button to paste your code. Please read this post: How to insert source code.
HI ALL:
In my project, I use AWD1 to monitor ADC3_CHN1, then set the high and low threshold, it works very well.
However, when I switch to AWD2 and AWD3, there is no interrupt triggered, the setting codes are below:
The configuration for AWD1:
AnalogWDGConfig.WatchdogNumber = ADC_ANALOGWATCHDOG_1;
AnalogWDGConfig.WatchdogMode = ADC_ANALOGWATCHDOG_SINGLE_REG;
AnalogWDGConfig.Channel = ADC_CHANNEL_1; // output1 current
AnalogWDGConfig.HighThreshold = 800;
AnalogWDGConfig.LowThreshold = 500; /
AnalogWDGConfig.ITMode = DISABLE;
HAL_ADC_Stop(&hadc3);
if (HAL_ADC_AnalogWDGConfig(&hadc3, &AnalogWDGConfig) != HAL_OK) {
Error_Handler();
}
HAL_ADC_Start(&hadc3);
LL_ADC_ClearFlag_AWD1(hadc3.Instance);
LL_ADC_EnableIT_AWD1(hadc3.Instance);
The configuration of AWD2 and 3:
AnalogWDGConfig.WatchdogNumber = ADC_ANALOGWATCHDOG_2;
AnalogWDGConfig.WatchdogMode = ADC_ANALOGWATCHDOG_SINGLE_REG;
AnalogWDGConfig.Channel = ADC_CHANNEL_1; // output1 current
AnalogWDGConfig.HighThreshold = 800;
AnalogWDGConfig.LowThreshold = 500; /
AnalogWDGConfig.ITMode = DISABLE;
HAL_ADC_Stop(&hadc3);
if (HAL_ADC_AnalogWDGConfig(&hadc3, &AnalogWDGConfig) != HAL_OK) {
Error_Handler();
}
HAL_ADC_Start(&hadc3);
LL_ADC_ClearFlag_AWD2(hadc3.Instance);
LL_ADC_EnableIT_AWD2(hadc3.Instance);
The configurations are almost same, I wonder that whether the AWD2 and AWD3 support ADC3? If support adc3, Where is the problem with my code?
