VADC Mesaurement affected by ISR?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
User9906
Level 2
Level 2
I observed some strange behaviour of an XMC4800 that I cannot understand:

My situation:

PWM-ISR (16kHz):
- Read ADC results
- Trigger new ADC Conversions

Init-Function():
- enable 'ADC-Conversion finished ISRs' (very short, contain only 1 statement to capture a Timer Value)
- Loop (active for several 100ms): wait for next PWM-ISR, process ADC result provided by PWM-ISR
- disable 'ADC-Conversion finished ISRs'

PWM-ISR continues.

So far everything is ok.
Except for this:
During the Loop of Init-Function() the ADC results are increased by some ADC-Increments.
They drop after Init-Function() is finished.

If I do not activate the 'ADC-Conversion finished ISRs' during the Init-Loop, the ADC values are more or less the same afterwards...

Any ideas ?
0 Likes
0 Replies