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.

SMCLK can't switch to DCO after initial switch to VLOCLK

Other Parts Discussed in Thread: MSP430G2452

Hello,

I am unable to re-set the SMCLK back to DCOCLK after initially setting it to run off the internal VLOCLK.
Simple code is running on MSP430G2452 chip, on a Launchpad 1.5 board, with no external crystal.

Basic sequence of steps is as follows:
(full code provided in this post: http://e2e.ti.com/support/microcontrollers/msp430/f/166/t/358447.aspx)

1) Disable watchdog timer.
1.1) Setup P1.4 to output SMCLK as per datasheet.
2) Set LFXT1 Source to VLOCLK (~12kHz).
3) Clear OFIFG in IFG1
4) Set MCLK source to LFXT1 (VLOCLK) 12kHz. (confirmed works, LED flash with correct intervals)
5) Check SMCLK frequency (default off the DCO) = ~1MHz (works, confirmed output on P1.4 is ~1MHz)
5) Set SMCLK source to LFXT1 (VLOCLK) 12kHz. (works, confirmed output on P1.4 is ~12kHz).
6) __delay_cycles(120000); // -- wait about 10 sec.
7) Set SMCLK source back to DCO ... doesn't work! SMCLK output on P1.4 shows 0Hz, stuck at High (3.56V) !!!.
8) Set SMCLK source back to LFXT1 (VLOCLK) 12kHz. (works again, confirmed 12kHz output on P1.4).

... for the life of me I can't figure out why SMCLK doesn't want to work with DCO anymore after running on VLOCLK.
The SR status register is not touched, when debugging in CCS6, it shows all bits in 0 state, meaning full power so I don't think it is caused by some power saving mode turned on unintentionally.

I can't find any clues in MS430 user guide and 430G2452 data sheet.

Has anyone seen this issue before? What is the trick to reliably switch clock sources?

Thanks in advance ...
PZ.

 

 

 

 

  • Please don’t start more than one thread for the same topic, and give some time to answer. Most of us are here in our spare time and aren’t online 24/7 (not to mention the different timezones).
    I’ve answered (well, sort of) your question in your first thread.

**Attention** This is a public forum