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.

EK-TM4C123GXL: The system cannot work when changing a system clock setting

Part Number: EK-TM4C123GXL

 Hi Team,

The system cannot work when changing a system clock setting

SysCtlClockSet(SYSCTL_SYSDIV_2_5| SYSCTL_XTAL_5MHZ|SYSCTL_USE_PLL|SYSCTL_OSC_MAIN);
is right or NOT;
The following parameter setting is absolutely ok :
SysCtlClockSet(SYSCTL_SYSDIV_2_5| SYSCTL_XTAL_25MHZ|SYSCTL_USE_PLL|SYSCTL_OSC_MAIN);

Best Regards

James Man

  • Hello Depeng,

    The images you tried to post did not load correctly.

    Also if this is specifically about the EK-TM4C123GXL - neither of those should work because the board is populated with a 16MHz crystal so you need to make sure the SYSCTL_XTAL parameter reflects that:

        //
        // Set the system clock to run from the PLL at 80MHz.
        //
        SysCtlClockSet(SYSCTL_SYSDIV_2_5 | SYSCTL_USE_PLL | SYSCTL_OSC_INT |
                           SYSCTL_XTAL_16MHZ);

    That runs from the PLL.

        //
        // Set the clocking to run directly from the crystal.
        //
        SysCtlClockSet(SYSCTL_SYSDIV_1 | SYSCTL_USE_OSC | SYSCTL_OSC_MAIN |
                           SYSCTL_XTAL_16MHZ);

    This alternatively runs from the crystal itself.

    Best Regards,

    Ralph Jacobi