Hi everybody,
I try to use the internal 12 kHz LF/LP oscillator for MCLK but it won't work. The DCO (1.1 MHz default) is always selected instead.
I use an MSP430F2013 on a LaunchPad. The test code is:
.global _main ; define entry point
_main
mov.w #__STACK_END,SP ; Initialize stackpointer
mov.w #WDTPW|WDTHOLD,&WDTCTL ; Stop watchdog timer
;12 kHz operation using VLOCLK
mov.b #LFXT1S_2,&BCSCTL3 ;12 kHz LF/LP oscillator for VLOCLK
mov.b #SELM_3,&BCSCTL2 ;VLOCLK -> MCLK (does not change anything)
bis.b #SCG0,SR ;Switch DCO off (not necessary for this test)
bis.b #BIT0,&P1DIR ;P1.0 test output
Loop12k
bis.b #BIT0,&P1OUT ;Test Should toggle with 1.2 kHz approx,
bic.b #BIT0,&P1OUT ;Test but toggles with 110 kHz approx.
jmp Loop12k ;10 cycles per loop
When stopped after initialisation the registers show as intended (yellow: changed from PUC)
I tried and experimented, googled and searched in this forum but did not find any hint.
Thanks in advance
Uwe