Is it possible to create Watchdog and 64bit mode dynamic timers for C6748? Any examples? I couldn't find any functions for these, only Timer_mode structure and TimerSettings, but registers are not changed after Timer_create is called.
I'm not sure what you mean with "dynamic"?
SYS/BIOS uses a timer64 Timer module that allows for a 32-bit chained mode (giving you a 64-bit resolution) and doesn't supply a module that uses the watchdog timer.
To use the timer specific features you would want to bring in the timer64 module instead of the generic Timer module add this to your .cfg file:
var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');
I'm not sure what you want to do here?
As I've seen on the page 12 of the SYS?BIOS user guide, "All SYS/BIOS objects can be configured statically or dynamically", the timers created with var Timer in the SYS/BIOS configuration file is called "static", while the timers created in the .c file within the application with Timer_create were called "dynamic" (should have used "runtime" instead), but looking at the structure fields usable in C code from the documentation, they were not explained very well, for instance you cannot select what type of timer you just created (chained, unchained, 64bit, watchdog). There are no C functions either if I need to kick the watchdog if I created my timer statically as a watchdog. Unfortunately when creating something static in the configuration file, weird errors at compile time show up, like Hwi 7 for a timer is already being used(when EventCombiner was added with default values), but there's no way to change it to another Hwi. If I try to click the error problem it takes me into the condition check script, doesn't show me which is the offending module.
I guess my question is if there is better documentation for the modules within SYS/BIOS and better explained API, hopefully with C examples. I've been using the User guides from docs folder within BIOS_6_33 or BIOSPSP at the moment.
I just looked at the datasheet and the timer64 module.
Short answer: Watchdog and 64-bit modes are not supported with the timer64 module.
The module is intended to drive basic SYS/BIOS's timing services (ti.sysbios.hal.Timer module) needed to operate its scheduler. For this reason, some of these advanced features were just not implemented because they weren't needed or they had some hardware restrictions (e.g. can't stop timer in watchdog mode).
What errors are you getting? Can you post your .cfg file?
I attached the app.cfg file to see the error regarding static timer and exception combiner using the same Hwi. I assume at runtime if I use Timer_create and there's a conflict with a Hwi already being used, I should see in Error_Block eb that operation failed, is that correct?
Several items could be a factor here.
What device and version of BIOS 6.33 are you using? The C6748 core is available on several different devices.
The Clock module uses one (in your case Timer 3 based of your .cfg script) of the timers from the Timer module. It needs to create a Hwi object to drive the system tick (doTick()) function. In your case, that Timer's interrupt vector happens to collide with an interrupt vector you want the Event Combiner to use.
Here are your options:
You can either change the timer that drives the Clock module:
Clock.timerId = 3; (something other than 3)
Or you can change the interrupt vector for the Event Combiner.
EventCombiner.eventGroupHwiNum = 7; (something other than 7)
David LucaI assume at runtime if I use Timer_create and there's a conflict with a Hwi already being used, I should see in Error_Block eb that operation failed, is that correct?
Yes, or a quicker method is to simply check that the return value from Timer_create() is not NULL. We recommend to use an Error block, so you can gracefully handle an errors at runtime. If you don't use it, an error in the function call (for example in Timer_create) wouldn't return and raise an exception.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.