Hi fellows,
Previously used a ATxmega128A1 without any problems but the same code does not seem to work on a ATxmega256A3BU:
OSC.XOSCCTRL |= OSC_XOSCSEL1_bm; //Setup startup timer for 32 kHz. OSC.CTRL |= OSC_XOSCEN_bm; //External oscillator enabled. while ( (OSC.STATUS & OSC_XOSCRDY_bm) == 0); //Waiting for it to become stable
The AVR gets stuck on the last while statement, the xtal never seems to get stable.
Anything obvious I missed? Changed the fuse TOSCSEL to ALTERNATE.
Any ideas are welcome!
/Bjorn