avr-chat
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-chat] Enabling external oscillator on XMEGA?


From: Rick Mann
Subject: [avr-chat] Enabling external oscillator on XMEGA?
Date: Sat, 25 May 2013 15:01:32 -0700

I'm trying to enable a 16 MHz crystal I have connected on an ATxmega256A3U. I 
can get it to run okay using the internal 2 MHz, 32 MHz, and 2 MHz * 15 PLL 
clocks.

But it doesn't work with the external oscillator using the following:

        CLKSYS_Enable(OSC_XOSCEN_bm);
        do {} while (CLKSYS_IsReady(OSC_XOSCRDY_bm) == 0);
        CLKSYS_Main_ClockSource_Select(CLK_SCLKSEL_XOSC_gc);
        CLKSYS_Disable(OSC_RC2MEN_bm | OSC_RC32MEN_bm | OSC_RC32KEN_bm);

The crystal isn't driven, and the loop to check to see if the oscillator is 
ready never exits.

It's possible I damaged the xtal during reflow (the oven ran 20°C hotter than 
it should). But I'm not sure I'm not missing some crucial step in software 
first.

Any suggestions? Thanks!

-- 
Rick






reply via email to

[Prev in Thread] Current Thread [Next in Thread]