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.

Clock setting

Other Parts Discussed in Thread: TM4C123AH6PM

Hi,

I'm working with a TM4C123AH6PM with a 16 Mhz crystal and I want use the microcontroller at max speed (400 Mhz from datasheet ?). I'm using this settings:

  SysCtlClockSet(SYSCTL_SYSDIV_2 | SYSCTL_USE_PLL | SYSCTL_OSC_MAIN | SYSCTL_XTAL_16MHZ);

This configuration it's correct?

Thank's

  • Hi,

    first of all, you will need to read the datasheet again, since the TM4C123 series are 80 MHz clock max, derived from a internal 400 MHz PLL.

    Normally when I start a project I use these two functions:

    void Set_PowerFull(void)  // Full power at 80 MHz with 8 MHz ext. osc.
    {
    SysCtlClockSet(SYSCTL_SYSDIV_2_5 | SYSCTL_USE_PLL | SYSCTL_OSC_MAIN | SYSCTL_XTAL_8MHZ | SYSCTL_INT_OSC_DIS);
     }

    void Set_PowerLow(void)   // Low power at 16 MHz with int. 16 MHz osc.
    {
    SysCtlClockSet(SYSCTL_SYSDIV_1 | SYSCTL_USE_OSC | SYSCTL_OSC_INT |SYSCTL_MAIN_OSC_DIS); 
    }

    If the project needs other options, I will build from these two functions.

    If you really want to go for 400 MHz MCU clock, you should raise the 3.3V supply to just below abs. max, and likewise with the core voltage at 1.2V. Playing with the main oscillator, PLL and clock dividers, may increase the MCU clock to above 80 MHz by applying an external clock to OSC0. But, remember to keep the temperature down!

    I doubt it is possible to reach 400 MHz but my guess is that it will go faster than 120.