Sunday, 3 April 2016

arm - Simple delay functions for TI Launchpad?


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.



Answer



Try this:


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


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...