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.

TM4C129XNCZAD: TM4C129XNCZAD system control delay

Part Number: TM4C129XNCZAD

Dear Sir,

We are using TM4c129XCNZAD and need control delay of 1,5,10 second


uint32_t ui32ClockMS;

// Run from the PLL at 120 MHz.
ui32SysClock = SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ |
SYSCTL_OSC_MAIN |
SYSCTL_USE_PLL |
SYSCTL_CFG_VCO_480), 120000000);

SysCtlPWMClockSet(SYSCTL_PWMDIV_1);

//Configure the device pins.
PinoutSet();

//Initialize the display driver.
Kentec320x240x16_SSD2119Init(ui32SysClock);
GrContextInit(&sContext_Label, &g_sKentec320x240x16_SSD2119); //LCD Intialisation



ui32ClockMS /= 3;
SysCtlDelay(10*ui32ClockMS); // 10 Second delay

Is above thing correct for 10 second delay?

  • Hi,

      The SysCtlDelay() function takes 3 CPU cycles to execute. Therefore, to create a 10s delay you need to divide by 3 like below. 

    SysCtlDelay(10*ui32ClockMS / 3); // 10 Second delay