SPRUIY4B February 2023 – May 2024 TMS320F2800152-Q1 , TMS320F2800153-Q1 , TMS320F2800154-Q1 , TMS320F2800155 , TMS320F2800155-Q1 , TMS320F2800156-Q1 , TMS320F2800157 , TMS320F2800157-Q1
FILE: dcc_ex2_single_shot_measurement.c
This program demonstrates Single Shot measurement of the INTOSC2 clock post trim using XTAL as the reference clock.
The Dual-Clock Comparator Module 0 is used for the clock measurement. The clocksource0 is the reference clock (Fclk0 = 20Mhz) and the clocksource1 is the clock that needs to be measured (Fclk1 = 10Mhz). Since the frequency of the clock1 needs to be measured an initial seed is set to the max value of the counter.
Please refer to the TRM for details on counter seed values to be set.
NOTE: In this device, by default, the XTAL is disabled and INTOSC2 is configured as the PLL source. To use XTAL (of frequency 20MHz) as the PLL source, update the device.h file with following changes :
To run this example, XTAL needs to be enabled. XTAL is enabled if you use it as the PLL source. You can also enable it by using the function SysCtl_turnOnOsc(SYSCTL_OSCSRC_XTAL)
External Connections
Watch Variables