Hello Wolfgang,
Your name and the word "swinging" makes me believe you could be German. Anyway, you probably meant oscillation (swinging sounds nicer...). Can you post more information?
When comparators are run as zero crossers and there is no hysteresis their output will be pretty wild. It depends a bit on the offset of the particular chip or uC. Normally it should look like random noise on the scope. Do you see a real oscillation, like a certain more or less fixed frequency? If yes, then the input could somehow "see" the output or couple into it inductively. Traces too close etc. Remember that the gain of a comparator is huge. It's basically an opamp with no feedback so
80dB and more would not be be a surprise.
Is anything connected to its output or is that used inside the uC only?
Gruesse, Joerg
formatting link