Other Parts Discussed in Thread: MSP430F5438
Hey, I'm using the TRxEB development board which features the MSP430f5438. I've connected a 20Mhz crystal to the XT2 pins (p5.2, p2.3). here is what I did to active it:
// set up the clock UCSCTL4 = ( UCSCTL4 & (~0x0700) ) | 0x0500; // ACLK <- XT2 UCSCTL6 = ( UCSCTL6 & (~0xFF00) ) | 0x8000; // XT ON & 20Mhz P5SEL |= BIT2 | BIT3; // select custom function (XTL) // I've set up a timer interupt and inverted a pin to check the frequency TA0CCR0 = 1000; TA0CCTL0 = CIEE; // run up to 1000 TA0CTL = TASSEL1 + MC_1; // USE ACLK & UP MODE
The interrupt occures once evey ~1ms which is probobly not becuuse of my 20Mhz clock, but becuse some other 1MHZ clock that's connected to the ACLK.
MOREOVER, even if I dont do my clock init stuff, I still get that ~1ms
What am I doing wrong? how do i connect the XT2 crystal clock to the ACLK?