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 ?
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 ?