In Atmel Microcontrollers, there are simple delay functions such as __delay_ms() and __delay_us() found in utils\delay.h.

I am using a Tiva™ C Series TM4C1294 development board, with a TM4C1294NCPDT microcontroller. However, I can't find any libraries to do similar delay functions.

Will I have to write my own delay function? I know it's not that hard, but I'd rather use an existing library if there is is one.


Try this:

/* Delay cycles for 1 second */ SysCtlDelay(16000000u / 3u);

  • \$\begingroup\$ What header file is this function located in? \$\endgroup\$ – tgun926 Sep 18 '14 at 21:28
  • \$\begingroup\$ If you're using CCS, CTRL + SHIFT + O should add the necessary header. \$\endgroup\$ – tim Sep 18 '14 at 22:38
  • 1
    \$\begingroup\$ SysCtlDelay located in sysctl.h tivaware library. \$\endgroup\$ – Angelos Mouzakitis Oct 4 '14 at 19:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.