ttcps
Vitis Drivers API Documentation
xttcps_intr_example.c File Reference

Overview

This file contains a example using two timer counters in the Triple Timer Counter (TTC) module in the Ps block in interrupt mode.

The example proceeds using interleaving interrupt handling from both timer counters. One timer counter, Ticker, counts how many interrupts has occurred to it, and updates a flag for another timer counter upon a given threshold. Another timer counter, PWM, waits for the flag set from the Ticker, and increases its duty cycle. When the duty cycle of PWM reaches 100, the example terminates.

Note
The example may take seconds to minutes to finish. A small setting of PWM_DELTA_DUTY gives a long running time, while a large setting makes the example finishes faster.
 MODIFICATION HISTORY:
 Ver  Who    Date     Changes


1.00 drg/jz 01/23/10 First release 3.01 pkp 01/30/16 Modified SetupTimer to remove XTtcps_Stop before TTC configuration as it is added in xttcps.c in XTtcPs_CfgInitialize 3.2 mus 10/28/16 Updated TmrCntrSetup as per prototype of XTtcPs_CalcIntervalFromFreq 3.10 mus 05/20/19 Update example to make it generic to run on any intended TTC device aru 05/30/19 Updated the exapmle to use XTtcPs_InterruptHandler(). 3.12 mus 07/13/20 Updated SettingsTable, to hold settings for PWM and tick timer device setting at correct indices. It fixes CR#1069191. 3.16 adk 04/19/22 Fix infinite loop in the example by adding polled timeout loop. 3.18 gm 07/25/23 Invoke XTtcPs_Release to release ttc node.

 

Functions

int main (void)
 This function calls the Ttc interrupt example. More...
 

Function Documentation

int main ( void  )

This function calls the Ttc interrupt example.

Parameters
None
Returns
  • XST_SUCCESS to indicate Success
  • XST_FAILURE to indicate Failure.
Note
None

References TmrInterruptExample().