madias 0 Posted April 16, 2014 Share Posted April 16, 2014 I dont know, what I'm doing wrong, but if I just paste the code above https://gist.github.com/robertinant/10398194 I'll get following compiler error: sketch_apr16a.ino: In function 'void initTimer()': sketch_apr16a.ino:24:55: error: 'ROM_TimerIntRegister' was not declared in this scope Quote Link to post Share on other sites
energia 485 Posted April 19, 2014 Share Posted April 19, 2014 I have updated the Sketch: https://gist.github.com/robertinant/10398194 I blindly prefixed all API calls with ROM_ and did not compile the Sketch to verify. It turns out there is not a ROM_TimerIntRegister. Sandman333 1 Quote Link to post Share on other sites
madias 0 Posted April 19, 2014 Share Posted April 19, 2014 Thank you! Now the sketch runs without problems, I even started 2 timers simultaneously (TIMER0 and TIMER1) with different HZ and it works like a charm! (tested with an oscilloscope). Is there an easy description for the tiva timers and the indifferences with energia (think of delay, PWM, tone and so on)? The Arduino community has something the good way, as an example: http://arduino-info.wikispaces.com/Timers-Arduino Quote Link to post Share on other sites
energia 485 Posted April 20, 2014 Share Posted April 20, 2014 I don't know of any TivaC Timer tutorials out there but the TivaC Peripheral Driver Library Users Guide (aka driverlib users guide) is a good source for the API's:http://www.ti.com/lit/ug/spmu298/spmu298.pdf The main forum might have some pointers to tutorials. Quote Link to post Share on other sites
madias 0 Posted April 21, 2014 Share Posted April 21, 2014 Thank you for your hint with the TI-API document (shame on me not reading this before). One thing is not clear to me: The "ROM_" prefix. As I read for example the part of the timer description I see: TimerConfigure(uint32_t ui32Base, uint32_t ui32Config) but in a energia example code (above) i see: ROM_TimerConfigure(TIMER0_BASE, TIMER_CFG_PERIODIC); So how is this "ROM_" prefix to understand? thank you Matthias Quote Link to post Share on other sites
madias 0 Posted April 22, 2014 Share Posted April 22, 2014 Ok, answer is in Chapter 29.2. Direct ROM calls. Quote Link to post Share on other sites
CorB 64 Posted September 1, 2014 Share Posted September 1, 2014 Currently this is chapter 35.2 in this document http://www.ti.com/lit/ug/spmu298a/spmu298a.pdf cheers CorB 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.