Timer System Service Library for Harmony v2

One PIC32 Timer in each MPLAB® 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 ISR Timers 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 a single timer

Timer System Service Simulation Spreadsheet

For your convenience, we have provided this 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 >
© 2024 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
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.