Hello,
I was trying to generate high-speed pulses using MSP432 through GPIO pins. I increased the DCO frequency to 48 MHz.
But I can only achieve 3 MHz toggling rate.
This is the code, I appreciate your help:
WDTCTL = WDTPW | WDTHOLD; // Stop WDT
/* Step 3: Configure DCO to 48MHz, ensure MCLK uses DCO as source*/
CSKEY = CSKEY_VAL; // Unlock CS module for register access
CSCTL0 = 0; // Reset tuning parameters
CSCTL0 = DCORSEL_5; // Set DCO to 48MHz
/* Select MCLK = DCO, no divider */
CSCTL1 = CSCTL1 & ~(SELM_M | DIVM_M) | SELM_3;
CSKEY = 0; // Lock CS module from unintended accesses
// The following code toggles P1.0 port
P1DIR |= BIT0; // Configure P1.0 as output
while(1)
{
P1OUT &= ~BIT0;
P1OUT |= BIT0;
}
Thanks,
