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.

SW-TM4C: Change the program to change the oscillation frequency of the crystal

Part Number: SW-TM4C
Other Parts Discussed in Thread: TM4C129ENCZAD, EK-TM4C1294XL

When you change the crystal of the TM4C129x device, you need to change the program that sets the crystal.

From which program do you want to change?
By the way, I am running the TM4C129ENCZAD with a 16 MHz crystal.

  • Hi,

      Have you downloaded TivaWare? If not, please download from here. Once you download TivaWare library, you can find many examples in the C:\ti\TivaWare_C_Series-\examples\boards\ek-tm4c1294xl folder as well as C:\ti\TivaWare_C_Series-\examples\peripherals. 

      I will suggest you start with project0 example in C:\ti\TivaWare_C_Series-\examples\boards\ek-tm4c1294xl\project0. This is a simple example to toggle some GPIO. You will find how it sets up the clock using the main oscillator. In this example, it uses a 25Mhz crystal as a input reference clock to the PLL and then multiply to the final SYSCLK equal to 120Mhz. If you have a 16Mhz, you just need to replace SYSCTL_XTAL_25MHZ with SYSCTL_XTAL_16MHZ.

    // Run from the PLL at 120 MHz.
    // Note: SYSCTL_CFG_VCO_240 is a new setting provided in TivaWare 2.2.x and
    // later to better reflect the actual VCO speed due to SYSCTL#22.
    ui32SysClock = SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ |
    SYSCTL_CFG_VCO_240), 120000000);