• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Embedded Software » BIOS » BIOS forum » Dynamic Timers in SYS/BIOS 6.33
Share
BIOS
  • Forum
  • Announcements
Options
  • Subscribe via RSS

Forums

Dynamic Timers in SYS/BIOS 6.33

This question is answered
David Luca
Posted by David Luca
on Jul 31 2012 11:06 AM
Expert1990 points

Hello,

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. 

Best regards,

David.

Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Tom Kopriva
    Posted by Tom Kopriva
    on Aug 01 2012 17:43 PM
    Expert6950 points

    Hi David,

    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?

    Thanks,

    Tom

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • David Luca
    Posted by David Luca
    on Aug 02 2012 02:59 AM
    Expert1990 points

    Hi Tom,

    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.

    Best regards,

    David.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Tom Kopriva
    Posted by Tom Kopriva
    on Aug 02 2012 18:50 PM
    Expert6950 points

    Hi David,

    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?

    Thanks,

    Tom

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • David Luca
    Posted by David Luca
    on Aug 03 2012 03:04 AM
    Expert1990 points

    Hi Tom,

    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?

    Best regards,

    David.1263.app.cfg

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Tom Kopriva
    Posted by Tom Kopriva
    on Aug 03 2012 13:09 PM
    Verified Answer
    Verified by David Luca
    Expert6950 points

    Hi David,

    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[0] = 7; (something other than 7)

    David Luca
    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?

    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.

    Thanks,

    Tom

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

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.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use