cancel
Showing results for 
Search instead for 
Did you mean: 

ADC Analog Watchdog (AWD) Interrupt-Disable and Enable again at Runtime

ETX
Associate II

I'm using the AWD (STM32G0B0CE) with the HAL_ADC_LevelOutOfWindowCallback(), which works fine.
For not blocking the MCU completely, I'm disabeling the AWD-IT inside the Callback when fired for about 500ms:
LL_ADC_DisableIT_AWD1 (ADC1);
After the 500ms elapsed the AWD-IT is enabled again:
LL_ADC_EnableIT_AWD1 (ADC1);

This only works fine for about 2 times:
Start -> Fire IT -> DisableIT
-> 500ms
-> EnableIT -> Fire IT -> DisableIT
-> 500ms
-> IT stays completely disabled, though enabled again.

Any idea what I'm missing?
Thanks.

0 REPLIES 0