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.

LAUNCHXL-F28379D: How to change clock frequency.

Part Number: LAUNCHXL-F28379D

I'm trying to configure LAUNCHXL-F28379D's CPU1 frequency.

I tried

InitSysPll(INT_OSC2,IMULT_20,FMULT_1,PLLCLK_BY_2);

and

InitSysPll(INT_OSC1,IMULT_20,FMULT_1,PLLCLK_BY_2);

Then I tried printing in the loop,

while (1) {

printf("%d\n", i);

i++;

}

But I see that its printing slower than 16Mhz Arduino. Is above code supposed to bring CPU speed up by itself or do I need something else?

  • Hi Jihoon,

    I don't think printf in a loop is a good measure of how fast the CPU is running.

    Instead, try enabling XCLKOUT on a pin and measure the SYSCLK directly. Note that by default XCLKOUT has a divider from SYSCLK (you'll want to find and set this divider so you know what you are measuring).

    Note that there is a 10MHz crystal on the launchpad, so you might as well use that (higher accuracy source) instead of INTOSC1 or INTOSC2.

    Devin
  • Thanks for the answer. Just to be clear, higher CPU frequency does mean faster operations, right? Sorry for newbie question.
  • I mean Arithmatic / Store / Load
  • Hi Jihoon,

    Yes, the faster you set the SYSCLK frequency the shorter the time for each instruction to execute.

    The C28x core running at 200MHz will be much much faster than an Arduino running at 16MHz. You also have 4 cores (2 x C28x + 2x CLAs). The C28x cores have VCU and TMU accelerators, so for certain types of code common to real-time control applications you will also see the C28x being much much more efficient than the Arduino even on a per-cycle basis.