Other Parts Discussed in Thread: MSP430G2553
Hello,
I'm new to the MSP430 and I've never programmed TI micros before. At first I'm trying to configure the DCO so I can use it as the master clock as well and it's a bit confusing. I've searched online and used the launchpad resourses wiki, all great info, but don't clearly understand how the DCO is configured.
I gave the MSP430G2553 which is the one that comes with the $4.30 launch pad.
So in short for configuring the DCO to 8MHz using the calibration values all I need to do is use the bellow two lines??
void clock_init(void)
{
DCOCTL = CALDCO_8MHZ;
BCSCTL1 = CALBC1_8MHZ;
BCSCTL2 = 0x00; //This is reset during PUC
BCSCTL3 = 0x05; //This is default after PUC
}
So what does DCOCTL = CALDCO_8MHZ; do? it automatically sets the values for MODx and DOCx?? How can I find out what the calibrated values are?
Does BCSCTL1 = CALBC1_8MHZ; do the same thing? puts in the saved calibration values into RSELx, DIVAx, XTS, XT2OFF??
BCSCTL2 I think I can understand for setting the other clocks and dividers.
BCSCTL3 I'm not really sure about this one.
Any help trying to help me understand or pointing me in the right direction will be appreciated. Thanks.