Skip to Navigation
Home
  • Company
    • Quick Facts
    • Board of Directors
    • Management Team
    • Press Releases
    • News Coverage
    • Newsletter
    • Careers
    • Articles
    • Ember Chronology
    • Contact Us
  • Products
    • ZigBee Chips
    • ZigBee Software
    • ZigBee Development Tools
    • Documentation
  • Buy
    • Digi-Key (Online)
    • Distributors
  • Applications
    • AMI & AMR
    • Integrated Home Automation
    • Building Automation
    • Others
  • ZigBee
    • About ZigBee
    • Ember & ZigBee
    • ZigBee FAQ
    • Download Specifications
    • ZigBee Events
  • Partners
  • Support
    • Training
  • Events
Home › FAQs

How often should I call emberTick()?

Categories:
  • Software : Embedded
  • Software : Networking
  • EM250

In lieu of app-specific, fully-qualified, field-tested recommendations, a recommendation for how often to call emberTick() is this:

-Call the function as much as possible to preserve stack timing and 802.15.4 MAC compliance. At minimum, this should be once per iteration of the application's main while{ } loop.

-When heavy traffic is expected, especially on the incoming side, emberTick() should be called more often than noted above. Ideally, you would want it to be called within 500ms of receiving a packet, such that you have plenty of time to turn around an ACK before the sender's Transport timer gets to 1.28s and times out the send attempt. At worst, you should be calling this often enough that your incoming message queue does not overflow, which is dictated by the packet buffer count. More packet buffers means more flexibility for calling emberTick() before an overflow. Failing to satisfy the ideal condition means more retries, and thus more traffic and higher potential for lost messages. Failing to satisfy the worst case condition means that you'll lose incoming messages and potentially lose all your stack buffers, prohibiting such activities as routing and serial processing (if using buffered serial).

-Keep in mind that calling emberTick() more than needed has very few repercussions because the function will return almost immediately if no stack work is pending. However, calling emberTick() too infrequently can lead to missed/lost messages, a lack of packet buffers, and increased latency in routing packets.

  • Login to post comments
  • Printer-friendly version

Search

FAQs

  • All (162)
  • Software : Embedded (62)
  • Software : Networking (70)
  • Hardware : Design (22)
  • Hardware : Manufacturing (10)
  • Tools : Dev Boards (2)
  • Tools : ISD, ISA (20)
  • Tools : xIDE (6)
  • Tools : Other (7)
  • ZigBee (1)
  • Change Notification (0)
Primary links
  • Developer Blog
  • Documentation
    • Release Notes
  • Contributed Software
  • FAQs
  • Change Notifications
  • Training
Portal
  • My Account
  • Search
User login
  • Request new password

Company | Products | Buy | Applications | ZigBee | Partners | Support | Events | Contact Us

©2007-2008 Ember Corporation | All rights reserved | Privacy