STM32L ADC Converter - Debugger reset ADC_ISR_EOC
Hi everyone !
I have a curiosity and I ask you all how to interpret ...
The behavior of the ADC_ISR_EOC bit during debugging is unclear, it is reset and I don't understand why.
Code :
// TimerSecurity is a security timer that runs every 1 msec
1) TimerSecurity = 10;
2) ADC1->CR |= ADC_CR_ADSTART;
3) while ((ADC1->ISR & ADC_ISR_EOC) == 0) {
4) if(TimerSecurity == 0)
5) breaks;
6) }
7)
8) ADC1->CR |= ADC_CR_ADDIS;
9) return ADC1->DR;
While debugging...
- Case 1
I put a breakpoint on lines 1 and 9
the debugger stops at line 2
I start the F5 debugger
the debugger stops at line 9
the ADC_ISR_EOC bit seen in a watch window is LL1
the TimerSecurity is still 10
- Case 2
I put a breakpoint on lines 1 and 9
the debugger stops at line 2
I step over the F10 debugger
the ADC_ISR_EOC bit seen in a watch window is LL1
I start the F5 debugger
the debugger stops at line 9
the ADC_ISR_EOC bit seen in a watch window is LL0
the TimerSecurity is 0
I hope I have been clear, I would like to understand who resets the bit
ADC_ISR_EOC.
Has this happened to any of you?
