• 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 » Low Power RF & Wireless Connectivity » Low Power RF ZigBee® Software & IEEE 802.15.4 Forum » Problem with timer initialisation
Share
Low Power RF & Wireless Connectivity
  • Forums
  • Announcements
  • Files
  • E2E Wiki
Options
  • Subscribe via RSS

Problem with timer initialisation

Problem with timer initialisation

This question is answered
Salvatore Zagarella
Posted by Salvatore Zagarella
on May 10 2012 04:35 AM
Intellectual425 points
Problem with timer initialisation
Hello everybody,
I have a problem using the timers on my cc2530eb.
In my code I included "hal_timer.h", and in the project files there is also listed "HAL\Target\CC2530EB\Drivers\hal_timer.c", which has the following output files: hal_timer.lst, hal_timer.pbi, hal_timer.r51, hal_timer.s51

Still, when I call the function HalTimerInit() to init the timer support, I receive a linking problem, which is:

Error[e46]: Undefined external "HalTimerInit::?relay" referred in myCoordinator ( D:\Texas Instruments\ZStack-CC2530-2.4.0-1.4.0\GCDevelop\ProjectHotel_3.1.2dev\Projects\zstack\Samples\myApp\

Any hints to solve it? If it may help, the stack I'm using is 2.4.0-1.4.0.

Thanks a lot in advance
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Dirty Harry
    Posted by Dirty Harry
    on May 10 2012 14:25 PM
    Suggested Answer
    Mastermind19350 points

    The hal_timer.c module never worked for the CC2530 (the registers had not been ported from the CC2430) and so you will see that the module is empty in later Z-Stack installers. With a little work, you could get the module working for CC2530, but I would recommend you to just make you own module with your specific proprietary use of the one H/W timer that you need. If you try to revive hal_timer.c module, one thing I noticed missing from your configuration above is the HAL_TIMER=TRUE setting in hal_board_cfg.h

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Gianluca Coviello1
    Posted by Gianluca Coviello1
    on May 10 2012 17:19 PM
    Prodigy20 points

    Hi Harry,
    thanks a lot for your answer. BTW, it was posted by a colleague of mine because my internet connection was not working properly this morning.

    It's a bit weird. I think I've seen a sample application which makes use of timers to send the same message every 5 seconds. Am I missing something?

    Anyway, I don't get your suggestion. How is it possible to use the H/W timer if I cannot call the HalTimerInit() function which is supposed to be called before using any of the timers available on the CC2530? Might you please make me an example, if you have a bit of spare time?

    Thanks a lot in advance,
    Gianluca

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Dirty Harry
    Posted by Dirty Harry
    on May 10 2012 17:40 PM
    Verified Answer
    Verified by Dirty Harry
    Mastermind19350 points

    The application you are thinking of was probably using the OSAL S/W timer, +/- 1 msec at best with 4-12 msec jitter during heavy radio load. Thus the H/W timer would be used for a hard real-time deadline, and such needs are usually way too specific to be properly/easily abstracted with a HAL module. Thus, HalTimerInit() was just trying to abstract the H/W Timer registers a little. So you just need to review the data sheet for the CC2530, write to a few of the configuration registers for the H/W timer that you want, copy and paste an ISR handler, say from hal_led.c or hal_keys.c or even the old defunct hal_timer.c and setup your ISR handler, enable the ISR, and away you go!

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Gianluca Coviello1
    Posted by Gianluca Coviello1
    on May 11 2012 03:58 AM
    Prodigy20 points

    You are right, Harry.
    Thanks a lot for your answer. You were right, indeed; in that program the OSAL timer is used. Anyway, its specifications are good enough for the timing requirements of my projects, so I think I myself will use this timer.

    Thanks a lot,
    Gianluca

    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