Timer System Service Library

One PIC32 timer in each Harmony application can be set aside as the System Timer using the Harmony Timer System Service. A System Timer allows the application to do the following:

  1. Schedule multiple interrupt service routines (ISRs) at separate time intervals based on the single System Timer
  2. Initiate ISRs as either one-shot or continuous events
  3. Disable or Enable timer ISRs at run-time
  4. Establish a system clock allowing:
    • Non-blocking delays in the application code
    • The measurement of timer intervals by the program

The clock created by the Timer System Service has a 1 ms time resolution with the interrupt latency of a Timer with a Dynamic Driver. The default Interrupt Priority for the system timer is level 1. Application tasks needing a more precise time resolution and/or minimum interrupt latency should use a dedicated PIC32 timer with a Static Driver
The "Example Code and Projects" link found at the bottom of this page shows examples of Static, Dynamic, and Timer System Service projects.

Initiating Multiple Interrupt Service Routines from a Single Timer


Timer System Services can trigger separate ISRs at different intervals using only 1 timer

Timer System Service Simulation Spreadsheet

For your convenience, we have provided this Microsoft Excel file which simulates the Timer System Service. It shows the relationships between MPLAB Harmony Configurator (MHC) inputs, PIC32 hardware timer, System Service timer, and System Service delay countdown timers.

Timer System Service "Under the Covers"
Learn more >

 Learn More

Harmony Timer Tutorial
Learn more >
Example Code and Projects
Learn more >
Entire Timer System Services Interface
Learn more >
Timer Hardware Description
Learn more >

20th Annual
Microchip MASTERs Conference 2016
Register now - Deadline: July 29

JW Marriott Desert Ridge Resort-Phoenix, AZ

© 2016 Microchip Technology, Inc.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.