Jump to content
Sign in to follow this  

Stellaris / Tiva msec callback timer

Recommended Posts

I worked (hacked) on the MSP430 TwoMSecTimer library until it became the AnyMSecTimer library that can be used on MSP430 or on the Stellaris / Tiva.  It uses one of the  timers when running on an MSP430 and a Systick handler on the bigger boards.


  1. Register your function from your ino file with the timer along with an interval in msec.  
  2. The registered function will be invoked at that interval.

A sample app is on github. https://github.com/freemansoft/build-monitor-devices/tree/master/ti_launchpad_rgb_2



-- setup --

AnyMsTimer::set(STATE_STEP_INTERVAL, my_function);


-- function signature --

void my_function(){
  // remember to do as little as possible here because interrupts are masked off

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this