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.
Hi,
I am trying to use MCLK at full frequency but my program does not respond well , i am using an external crystal oscillator of 12Mhz, if i set my MCLK prescalar to 1 it works perfectly which is (6 MHz) but for 12Mhz the program does not respond well
PJSEL0 |= BIT4 | BIT5 | BIT6 | BIT7; // For HFXT
/* clock configuration */
CSCTL0 = 0xA500;
CSCTL2 = 0x0255; /* Aclk is VLOclk, SMclk & Mclk is HFXT clock */
CSCTL3 = 0x0000; /* crystal frequency is not divided, Mclk not divided */
CSCTL4 = 0x0801;
do
{
CSCTL5 &= ~(LFXTOFFG | HFXTOFFG); /* Clear XT1 and XT2 fault flag */
SFRIFG1 &= ~OFIFG;
}
while (SFRIFG1&OFIFG); /* Test oscillator fault flag */
CSCTL0_H = 0;
Thanks and Regards,
Sasikumar E
Hello Sasikumar,
For FRAM devices operating higher than 8MHz, wait states must be enabled. See the code example below.
// Configure one FRAM waitstate as required by the device datasheet for MCLK // operation beyond 8MHz _before_ configuring the clock system. FRCTL0 = FRCTLPW | NWAITS_1;
You can also find more information about wait states in section 7.5 of the users guide below.
**Attention** This is a public forum