As previously posted, I am bringing up my first xmega project using an
ATxmega32A4. This is mainly an informative post, but I would welcome any
discussion.
One function of the project is analog waveform generation. My first pass at
this avoided the use of the DAC and DMA because I felt that figuring out how
this all works would take too long (as you will see in a previous post, I
was right). Instead, I set up a Timer / Counter in Dual-Slope PWM mode with
the four Capture / Compare Channels producing a series of nested pulses that
I added together with a resistor network. This worked beautifully and, of
course, has zero impact on run-time firmware.
A potential problem, which I was aware of when I took this direction, is
that the high values of the pulses don't come from some stable reference
voltage, but come from the microcontroller digital supply. However, there
is heavy filtering in my hardware to smooth out the waveform, which is of a
fixed and known frequency, so expecting only random switching noise on the
supply I was not too worried.
It turns out that the xmega generates strong, fixed frequency noise on the
supply, which if course amplitude modulates my signal and totally messes me
up. As far as I can tell, this is coming from the clock generation system.
I have a 32.768 kHz crystal connected and I am using the built-in DFLL to
fix-up the internal 32 MHz oscillator (RC or Ring, depending on which Atmel
document you're reading). This appears to work well enough, but at power
on, I can see this sawtooth waveform with a 12 us period kind-of swell up
over a second or two and then and stabilize at about 120 mV peak-to-peak.
I have the usual 0.1 uF capacitors on all VCC pins, 0402 size, as close as
you could wish with the other end through a via to the ground plane. The
3.3 V regulator sports a 2.2 uF output capacitor.
Also, athough as far as I know, there is nothing wrong with the quality of
my 32.768 kHz crystal, setting low power mode for the oscillator did not
work for the second board I made up, although it worked for the first. I
have a Citizen 6 by 2 mm cylinder crystal with 35 kohm maximum series
resistance and 6 pF load capacitance. I am not using external load
capacitors. This should be just fine. I suspect the xmega oscillator.
Comments?
Graham.
_______________________________________________
AVR-chat mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/avr-chat