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.

TM4C1290NCPDT: Main clock seems to be running 25% slow.

Part Number: TM4C1290NCPDT
Other Parts Discussed in Thread: TPS2052

Hi all,

TivaWare 2.1.4.178

I have a 20MHz crystal and want to run the main system clock at 20MHz but it seems to be running ~25% slower:  To get a 10ms SysTick I need to divide the clock frequency by 100 but I have to divide it by 125; to get a UART to run at 9600 baud I have to set it to run at 12,000 baud.  I set the clock with:

    ClockSpeed = SysCtlClockFreqSet(SYSCTL_USE_OSC | SYSCTL_OSC_MAIN | SYSCTL_XTAL_20MHZ, 20000000);   // 20MHz

    UARTConfigSetExpClk(UART0_BASE, GetClkSpeed(), 12000,
            ( UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE | UART_CONFIG_PAR_NONE ));

    SysTickPeriodSet(GetClkSpeed()/125);    // Interrupt every 10ms. (convert nS to mS), keep

The crystal is indeed a 20MHz unit,  I hope I'm doing something wrong in setting the clock speed.

Thanks