Jump to content

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
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...