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.

CCS/MSP430FR5994: Clock system (LFXT)

Part Number: MSP430FR5994

Tool/software: Code Composer Studio

Hi!
MSP430FR5994IPN
I need to start timer from external generator.
The generator is connected to pin PJ.4 (LFXIN, pin 77)
Whell, i initialize ACLK - from external generator (32768Hz), SMCLK and MCLK - internal 8MHz:

mov.w #WDTPW+WDTHOLD,&WDTCTL ; Stop WDT
mov.b #CSKEY_H, &CSCTL0_H
mov.w #DCORSEL + DCOFSEL_4, &CSCTL1
mov.w #SELA__LFXTCLK + SELS__DCOCLK + SELM__DCOCLK, &CSCTL2 ; ACLK = LF; MCLK = DCO
mov.w #DIVA__8+DIVS__8+DIVM__8,&CSCTL3
;delay_cycles(60);
mov.w #60, r15
$1
sub.w #1, r15
tst r15
jnz $1

;Set all dividers
;Lock CS registers
mov.w # DCOFSEL_6, &CSCTL1 ; Set DCO to 8MHz
mov.w #DIVA__1+DIVS__8+DIVM__8, &CSCTL3 ; set all dividers
mov.w #LFXTDRIVE_0 + LFXTBYPASS_0, &CSCTL4
mov.b #0, &CSCTL0_H
bic.b #LOCKLPM5,&PM5CTL0

Then, initialize PJ.2 as ACLK output:

mov.b #0x0f, &PJREN
mov.b #BIT4+BIT5, &PJOUT
mov.b #11101111b, &PJDIR
mov.b #00100000b, &PJSEL1
mov.b #00110100b, &PJSEL0

Connect oscilloscope to PJ.2 (pin 23) and run....

As a result, I get a shivering frequency of approximately 37kHz.
When setting the timer, I see that the frequency selected for ACLK is not my generator, but the frequency 37k
Can you tell me where the mistake is? Why is the clock system not configured correctly?
(PS: the generator 32768Hz works correctly)
Thanks!

  • Hi,

    in CCS, in the TI-Resource Explorer, or on the MSP430FR5994 homepage you can find code examples for the MSP430FR5994.

    Within those there is a code example msp430fr599x_cs_05.c which configures the device for using an external 32kHz digital clock source.

    Best regards

    Peter

**Attention** This is a public forum