Jump to content
43oh

Access to all MSP430 timers.


Recommended Posts

Some of the timers are already in use under the covers - executing the loop on a specific interval, tracking time (millis/micros), etc. so losing some is a trade-off of using Energia vs Code Composer or mspgcc.  

You'll find that some libraries use timers as well, so you'll need to watch out for that as well.

 

I believe you can technically use interrupts within Energia like you would with MSPGCC, there just isn't a nice wrapper for everything.  Keep in mind that it's intended to be hardware agnostic to an extent as well - so that your code could work on an MSP430, but also an MSP432 or Tiva if you need more horsepower.  

 

Depending on what you're looking to do - it may be a case of finding a different way of approaching the problem, maybe taking the time to write a library for a special function, or possibly making the jump to Code Composer (there's even a nice import function in Code Composer for Energia sketches).  

 

FYI - I'm a C# dev as well.  With enough digging through examples - the MSP430 is not too difficult to master although it seems daunting at first (the code samples they provide for the 2553 are fantastic though and Grace is very valuable for configuring tricky timers and peripherals).  Now a CC3200 or MSP432 - that's a whole different beast - I tend to use Energia for larger chips since I haven't invested enough time on learning the driverlibs and architecture yet.

Link to post
Share on other sites

what's a "Basic Timer"?  I don't think the G2553 has it anyhow...

 

It has Timer_A and WDT.  MSP430 Wolverine series chips (FR5969) has WDT, RTC, Timer_A and Timer_B... F5529 has similar...

 

Basically Energia does give you what you need, although the Timer_A PWM output stuff is done via analogWrite or you can use the timers directly via their SFR registers (TA0CTL, TA0CCTLx, etc) so long as you don't try to use analogWrite at the same time.  WDT is (ab-)used for the millis()/micros() "tick" along with the sleep, sleepSeconds timer.

Link to post
Share on other sites

There are multiple types of timers, of which one, more or no peripherals may be present in any specific msp430.

For example, the msp430g2553 has the WDT+ module, in addition to two Timer_A modules. Each of those timers has three capture/compare registers.

The msp430fr2532 on the other hand has four Timer_A modules, of which two have two CC registers, and two have three CC registers.

As you can see, the existence of a certain module does not mean it is present in your specific type.

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