Hi All,
I have connected 4MHz crystal at controller's XT2 pin & 32.768KHz at XT1 and configured accordingly. If I configure SMCLK / MCLK with this 4MHz crystal the output comes with 1MHz.
void crystal_intialization(void)
{
P5SEL |= BIT4 + BIT5; //32.768KHz crystal ON
P5SEL |= BIT2 + BIT3; //4MHz crystal ON
}
void clock_source_selection(void)
{
UCSCTL4 = SELS_5; //XT2CLK source for SMCLK 4MHz
UCSCTL5 = DIVS_0;
P2DIR |= BIT2;
P2SEL |= BIT2;
UCSCTL4 |= SELA_0;//XT1CLK source for ACLK 32.768KHz
UCSCTL5 = DIVPA_0 + DIVA_0;
P1DIR |= BIT0;
P1SEL |= BIT0;
UCSCTL4 |= SELM_5; //XT2CLK source for SMCLK 4MHz
UCSCTL5 = DIVM_0;
P7DIR |= BIT7;
P7SEL |= BIT7;
}
If i see at P7.7 using oscilloscope, it shows pulse of 1MHz instead of 4MHz. I am unable to find the solution.
But if I configure all three clock source with 32.768KHz, then all these three pins (P7.7, P1.0 & P2.2) have perfect 32.768 KHz signal.
All test are done using MSP430F5529 development board.
Regards,
Rajesh M.
