dsPIC33A Oscillator Module Deep Dive
Overview
Last modified by Microchip on 2026/10/19 09:16
| Clock Monitor | Clock Selection Example |
The following video provides a short overview of the dsPIC33A Oscillator Module Clock Monitor operation:
The Clock Monitor Module continuously compares two selected clock sources:
- A reference clock, selected using WINSEL
- A monitored clock, selected using CNTSEL
The reference clock defines the measurement window using the WINPR[31:0] register. During this time window, the monitored clock drives an internal counter that accumulates clock cycles.
At the end of each measurement window:
- The accumulated count is captured into the BUF[31:0] register
- The counter is cleared and the next measurement cycle begins automatically
- A ClkxReady interrupt is generated to indicate that new measurement data is available
The captured count value is then compared against four programmable threshold limits. These thresholds allow the application to detect warning or failure conditions based on clock behavior.
The Clock Monitor Module can be used for:
- Frequency measurement
- Frequency drift detection
- Pulse-width and duty-cycle measurement