curtis63 5 Posted April 18, 2016 Share Posted April 18, 2016 I was looking at the following tutorial for MSP430 Timers: http://web.eng.fiu.edu/watsonh/eel4730/slap113.pdf According to the tutorial, there are FIVE types of MSP430 timer modules: Basic Timer Quote Link to post Share on other sites
cubeberg 540 Posted April 18, 2016 Share Posted April 18, 2016 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. curtis63 and tripwire 2 Quote Link to post Share on other sites
spirilis 1,265 Posted April 18, 2016 Share Posted April 18, 2016 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. tripwire 1 Quote Link to post Share on other sites
curtis63 5 Posted April 18, 2016 Author Share Posted April 18, 2016 I'm just going off the PDF file from the Tutorial: http://web.eng.fiu.edu/watsonh/eel4730/slap113.pdf Follow the link above, and all will be revealed :-) It says that it is found only on '4xx... Quote Link to post Share on other sites
spirilis 1,265 Posted April 18, 2016 Share Posted April 18, 2016 ah k an older peripheral like USART I guess. Most of what you'll encounter of modern MSP430's will include G2xxx, F5xxx and FR2xxx/FR4xxx/FR5xxx/FR6xxx series Quote Link to post Share on other sites
roadrunner84 466 Posted April 19, 2016 Share Posted April 19, 2016 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. curtis63 1 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.