The Dual Clock Comparator (DCC) is used to determine the accuracy of a clock signal during the time executaion of an application. The DCC measure the frequency of a selectable clock sources using another input clock as a reference. The clock sources as well as the accuracy are programmed by the application.
The DCC can also be configured to operate in single-shot or continuous mode. In single-shot mode, DCC performs a one-time countdown where DCC stops operation when the counters reach 0. A completion interrupt is raised and the status can be checked. In continuous mode, DCC reloads both counts with the seed value upon completion without error. In case of an error, an ESM error event is raised.
The DCC module provides the following functionality:
Errors detected by the DCC module during operation are reported via ESM error (application will receive via ESM application callback).
The following shows an example of SDL DCC API usage by the application.
Include the below file to access the APIs
Initialize the ESM to report DCC errors
Configure MAIN DCC Instance 0 seed values and clocks
Or, configure the MCU DCC Instance 0 for single-shot mode.
If configuring single-shot mode, also register and enablei the done interrupt. In single-shot mode, the completion (Done) interrupt will happen at the end of the test if there are no errors. If error happens, then ESM interrupt will occur as well as the DCC error interrupt.
The done interrupt handler should clear the interrupt
Enable DCC Instance