NOTE: I am intentionally mis-posting this! It belongs in the AVRFREAKS forum, not in ARM, but I can't log into the avrfreaks forum. So hopefully an admin will move it to the correct place. Thank you...
I have created an Atmel START project for the XMEGA16D4. In the Clocks page, I specified the external oscillator running at 12MHz.
(And I would post an image, except the forum software is giving me "You are not authorized to access this page." when I add the screen shot...)
But the generated code in osc.c reads:
OSC.CTRL = 0 << OSC_PLLEN_bp /* PLL Enable: disabled */ | 0 << OSC_XOSCEN_bp /* External Oscillator Enable: disabled */ | 0 << OSC_RC32KEN_bp /* Internal 32kHz RC Oscillator Enable: disabled */ | 1 << OSC_RC32MEN_bp /* Internal 32MHz RC Oscillator Enable: enabled */ | 0 << OSC_RC2MEN_bp; /* Internal 2MHz RC Oscillator Enable: disabled */
... which, unless I'm mis-reading this, uses the internal oscillator, not the external. But in clock_config.h, it knows that I've set the oscillator to 12MHz:
#ifndef F_CPU #define F_CPU 12000000 #endif
Is this a known bug, or is it a cockpit error?