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.

MSP430FR5043: Problems configuring the clock system for MCLK and SMCLK with 8 MHz external crystal

Part Number: MSP430FR5043

Hello everyone,

I've run into a problem configuring the clock system for using an external 8MHz crystal. I'm using the 64VQFN variant of the chip (MSP430FR5043IRGCT).

The crystal oscillator seems to be working fine, when measuring with an oscilloscope I get a clean 8 MHz sine wave from the crystal at the HFXIN pin.

However, when I set the pin P3.3 to output MCLK, I get a square wave with a frequency of 4.75 MHz (same for P3.4 and output SMCLK).

I've configured the CS to use HFXT as source for MCLK and SMCLK with a divider of 1, maximum drive strength. The bypass capacitors I use are 14 pF each.

Even if I only configure the CS module, and don't use any other peripherals, the MCLK/SMCLK are at 4.75 MHz.
Below is the code I use for testing the CS module:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <msp430.h>
#include <stdint.h>
/**
* main.c
*/
int main(void)
{
uint16_t i = 0; // Variable for counting down in fault flag clearing loop...
WDTCTL = WDTPW | WDTHOLD; // stop watchdog timer
PM5CTL0 &= ~(uint16_t)LOCKLPM5; // unlock port pins
// initialize external 8 MHz crystal
PJSEL0 |= (1 << 6); // configure PJ.6 / PJ.7 to be used as HFXTIN/ HFXTOUT
PJSEL1 &= ~(1 << 6);
CSCTL0_H = 0xA5U; // Write key to key register, unlock CS module registers
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


Can anyone help?

**Attention** This is a public forum