Hello,
I'm attempting to set the source of the master clock and subsystem master clock of my MSP430FR5969 to an external 10MHz clock signal coming from a CDCV304PWR clock buffer. I am using driverlib for the clock configuration.
Here is the code in my main.c:
#include <msp430.h>
#include <stdint.h>
#include "driverlib.h"
uint32_t MCLK_freq;
uint32_t SMCLK_freq;
void main (void)
{
// Stop WDT
WDT_A_hold(WDT_A_BASE);
CS_setExternalClockSource(0, 10000000);
CS_bypassHFXT();
CS_initClockSignal(CS_MCLK, CS_HFXTCLK_SELECT, CS_CLOCK_DIVIDER_1);
CS_initClockSignal(CS_SMCLK, CS_HFXTCLK_SELECT, CS_CLOCK_DIVIDER_1);
MCLK_freq = CS_getMCLK(); //used for checking MCLK frequency during debugging using Expressions tab
SMCLK_freq = CS_getSMCLK(); //used for checking SMCLK frequency during debugging using Expressions tab
while(1);
}
The HFXT oscillator fault flag triggers during the CS_initClockSignal function when trying to assign the source select for MCLK or SMCLK (I have switched the order of the initClockSignal function for MCLK and SMCLK and have gotten the same result). I'll include a picture of my register values (I've double checked and they should all be correct for using an external 10MHz clock signal for HFXT).
I also probed the HFXIN pin (pin 42) directly on the MSP430FR5969 and the input clock signal is 10MHz at 3.3V. I will also include a picture of oscilloscope probing input clock signal.
Given that the clock signal input at HFXIN is at the correct frequency and voltage levels, I am not sure what would be causing the HFXT fault flag to trigger. It appears to be associated with trying to use the clock signal for the master or subsystem master clocks. Is there a reason that I cannot using a 10MHz clock signal from HFXT for MCLK and/or SMCLK? Any advice would be appreciated.
Luca