Jump to content
clay_shooter

Using SysTicks to get interrupt callbacks?

Recommended Posts

I'd like to run interrupt handlers on timer functions. With the MSP430 I had to write a library for it. It looks like I should be able to use SystTicks functions like registerSysTickCb().  

 

How often would I get called?  80Mhz/???

Share this post


Link to post
Share on other sites

Thanks for the reply. I wasn't sure if it was 1ms or 1us. There are other posts floating around about delaymillis() vs delaymicros() and how they are implemented. I'm still not sure how micros are calculated if they aren't using SystTick, some other timer (5?) perhaps.

 

So in theory, I should be able to register a handler with registerSysTickCb() and get a callback every 1ms?

Share this post


Link to post
Share on other sites

It uses SysTick. It actually used to use another timer before but we recently converted it over to a pure-SysTick implementation. See wiring.c in hardware/lm4f/cores/lm4f for details.

 

Sent from my Galaxy Note II with Tapatalk 4

Share this post


Link to post
Share on other sites

I was a little curious about the purpose behind that registerSysTickCb() function, since it seems to be "internal" to Energia and not exposed much or talked about; the only thing that uses it is the Tiva-C Ethernet library for TM4C129 where it provides a "tick" for the lwip stack.  So it's definitely there for others to abuse, although keeping the execution time low is important to avoid overrunning it ... and missing the next SysTick event due to being stuck in IRQ context.  But those Tiva's run pretty fast anyway.

Share this post


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.

Guest
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...