Hello E2E Experts,
Good day.
I am trying to get the HFXT to work on the MSP430FR5994 launchpad board.
This is very urgent and for an important demo where I need higher accuracy than the low-power clock sources can provide!
The crystal oscillator that I am trying to use is:
ECS-120-S-4
The capacitor values that I am trying to use are:
C8 = 15pF
And
C9 = 3.3pF
Also, trying to use
C8 = 3.3pF
And
C9 = 15pF
The code that I am using is as follows:
// Using HFXT
CS_setExternalClockSource(32768, 12000000);
CS_turnOnHFXT(CS_HFXT_DRIVE_16MHZ_24MHZ);
//CS_turnOnHFXTWithTimeout(CS_HFXT_DRIVE_8MHZ_16MHZ,0x100);
CS_initClockSignal(CS_MCLK, CS_DCOCLK_SELECT, CS_CLOCK_DIVIDER_1);
CS_initClockSignal(CS_ACLK, CS_LFXTCLK_SELECT, CS_CLOCK_DIVIDER_1);
CS_initClockSignal(CS_SMCLK,CS_HFXTCLK_SELECT, CS_CLOCK_DIVIDER_1);
However, the code keeps stopping in CS_turnOnHFXT()
In the while loop, because of what I suppose is an oscillator fault (and it can’t get out because of the flag being set):
while(HWREG8(CS_BASE + OFS_CSCTL5) & HFXTOFFG)
{
//Clear OSC flaut Flags
HWREG8(CS_BASE + OFS_CSCTL5) &= ~(HFXTOFFG);
//Clear OFIFG fault flag
HWREG8(SFR_BASE + OFS_SFRIFG1) &= ~OFIFG;
}
My question is:
- What is causing this?
- What can we do to stop it from happening and get the clock source operational?
Is there something wrong with trying to use this Q2 on the launchpad?
Is there something wrong with our hardware choices (please see above)?
Is there something wrong with the software we are using?
Any help you can provide would be much appreciated.
Regards,
CSC