This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Shutdown DCO, yes just that, I haven't been able, have you?

Other Parts Discussed in Thread: MSP430G2553, MSP430F249

Ok I have searched enough and I can't find the reason why this apparently simple task is not behaving as expected

I dont want to go to a LPM state but I want to save as much power as possible, so I would like to source MCLK and ACLK from LFXTCLK something like this:

But I can not get the DCO to shutdown. So far I have this test program

int main (void)
{
    WDTCTL = WDTPW + WDTHOLD + WDTSSEL; //Stop watchdog and even source it from ACLK
    BCSCTL1 = XT2OFF | 4;               // XT2Off, set the DCO RSELx
    BCSCTL2 = SELM_3 | SELS | DIVM_3;          // MCLK source is LFXTCLK and Divide MCLK
    __bis_SR_register(SCG0|SCG1);       // This should shutdown the DCO
    while(1);                           // Just wait
}

My guess would be that this code should shutdown the DCO. The Configurations are practically the same as in the picture. However if I change the value of RSEL (DCO frequency) and then measure the current it changes acordingly, that indicates that the DCO is still ON, I have checked the peripherals and no one should be using the the SMCLK, there is no XT2 in my circuit, so I don't know if that is a problem as SMCLK can only be sourced from DCO or XT2...


The DCO is only off when the CPUOFF bit is also set, am I doing something wrong here?

(Side note, in the user guide ( www.ti.com/.../slau144 ) page 278 what is XSELM1 shouldn't it be SELM1? Have I found a bug in the documentation while looking for an answer on this:P)

  • You did not say which MSP430 you are using. They can be different. I assume you are using MSP430G2553.
    You tried to not use DCO by sourcing MCLK and SMCLK from LFXTCLK. But LFXTCLK may not be available and the "fail-safe" mechanism will try to use DCO instead "automatically".
    LFXTCLK involves external components. It may not work at all or take a long time to start. You need to clear OFIFG, wait a while and check it again, repeat this until OFIFG does not come back. Only after this, you may try to use it. An alternative is to use VLO instead.
    Once all the above are done, you may set SCG0 in SR to totally disable DCO.
  • Thanks, I am targeting an MSP430F249, I'll try what you say an update the tread


    Edit:


    So it finally worked, the OFIFG was not allowing to select the MCLK source from the low frequncy oscilators but even using the VLO I had to clear the OFIFG flag, but now it works like a charm.


    Thanks again!

**Attention** This is a public forum