TTC Standalone Driver


This page gives an overview of ttcps driver which is available as part of the Xilinx Vivado and SDK distribution

Source path for the driver:

Driver source code is organized into different folders. Below diagram shows the ttcps driver source organization

-- Doc - Provides the API and data structure details
- Examples - Reference application to show how to use the driver APIs and calling sequence
- Source - Driver source files

Features Supported

Controller/Driver features supported

  • Three independent 32-bit timer/counters for ZynqMP/Versal and 16-bit timer/counter for Zynq
  • Clock can be selected from:
    • Internal PS bus clock (CPU_1x)
    • Internal clock (from PL)
    • External clock (from MIO)
  • 16-bit pre-scalar for clock
  • Three interrupts, one for each counter
  • Support both increment and decrement counting
  • Interrupt on overflow, at regular interval, or counter matching programmable values
  • Ability to generate waveform output (e.g. PWM) through the MIO
  • Support waveform output to the PL

Known issues and Limitations
  • None

Test cases

TTC interrupt example:
This example uses two timer counters in the Triple Timer Counter (TTC) module in the Ps block in interrupt mode.

TTC rtc example:
This example uses one timer/counter to make a real time clock. The number of seconds elapsed are displayed on
the console till 121 seconds are elapsed.

TTC low level example:
This example uses triple timer counter in polled mode to generate square wave output on waveform out pin.

TTC tapp example:
This example uses triple timer counter to generate interrupt and update a flag which is checked in the interrupt example to confirm whether the interrupt is generated or not.



  • Updated makefile for parallel make execution and incremental build support.


  • Fixed the warnings reported by ARMCC compiler


  • Added interrupt handler in driver. Updated examples to use driver's  interrupt handler.


  • Fixed bug in XTtcPs_ClearInterruptStatus function


  • Fixed bug in XTtcPs_CalcIntervalFromFreq API to use  correct maximum interval count (32 bit) for ZynqMP .


  • Updated ttcps.tcl to append 'U' to all constant definitions exported from the ttcps driver to the xparameters.h


  • No changes for 2017.2


  • Updated the ttcps.tcl script to generate the canonical names and constant defines in xparameters.h, based on the ttcps instance number.
  • Updated ttcps_tapp.tcl to check whether ttc device is interrupting current processor or not.If device is not interrupting the current processor then,do not include ttc driver instance and interrupt example source/header files to peripheral test application.
  • Updated gen_testfunc_call proc in ttcps_tapp.tcl script, to fix bug in the instance number calculation


  • Modified XTtcPs_GetCounterValue,XTtcPs_GetInterval and XTtcPs_CalcIntervalFromFreq functions to use 32 bit counter/interval values for Zynq Ultrascale+ MPSoC


  • No changes for 2016.3

Related Links