ttcps
Vitis Drivers API Documentation
xttcps_tapp_example.c File Reference

Overview

This file contains an example uses ttc to generate interrupt and update a flag which is checked in interrupt example to confirm whether the interrupt is generated or not.

Note
 MODIFICATION HISTORY:
 Ver  Who    Date     Changes


3.00 pkp 01/12/15 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.01 pkp 03/04/16 Added status check after SetupTicker is called by TmrInterruptExample 3.2 mus 10/28/16 Updated TmrCntrSetup as per prototype of XTtcPs_CalcIntervalFromFreq ms 01/23/17 Modified xil_printf statement in main function to ensure that "Successfully ran" and "Failed" strings are available in all examples. This is a fix for CR-965028. 3.10 aru 05/30/19 Updated the example to use XTtcPs_InterruptHandler(). 3.16 adk 04/19/22 Replace infinite while loop with Xil_WaitForEventSet() API. adk 20/04/22 Update the Xil_WaitForEventSet() API arguments as per latest API. 3.18 gm 07/25/23 Invoke XTtcPs_Release to release ttc node.

Functions

int TmrInterruptExample (XTtcPs *TtcPsInst, u16 DeviceID, u16 TtcTickIntrID, XScuGic *InterruptController)
 This is the main function of the interrupt example. More...
 
int main (void)
 This is the main function that calls the TTC interrupt example. More...
 

Function Documentation

int main ( void  )

This is the main function that calls the TTC interrupt example.

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

References TmrInterruptExample().

int TmrInterruptExample ( XTtcPs TtcPsInst,
u16  DeviceID,
u16  TtcTickIntrID,
XScuGic *  InterruptController 
)

This is the main function of the interrupt example.

Parameters
TtcPsInstis a pointer to the ttc instance.
DeviceIDis the unique ID for the device.
TtcTickIntrIDis the unique interrupt ID for the timer.
InterruptControlleris a pointer to the interrupt controller instance..
Returns
XST_SUCCESS to indicate success, else XST_FAILURE to indicate a Failure.

References XTtcPs_Release(), and XTtcPs_Stop.

Referenced by main().