Forgive my inexperience, but trying to use:
CLK_PSADIV2_bm. Ddn't work.
After reading the datasheet, I noticed that all the division _bm's are ODD numbers so I used CLK_PSCTRL = 0b00001100 and it worked.
Looking at the header file iox64a4u.h I see:
#define CLK_PSADIV2_bm (1<<4) /* Prescaler A Division Factor bit 2 mask. */
Surely it should be: #define CLK_PSADIV2_bm (3<<2)
Tore my hair out for a few hours...
Toolchain is Atmel studio 6.2, chip is XMEGA64A4U.
Doing a 'grep' I see ALL headers are 'wrong' - if I'm right...
Am I right?