scutimer
Vitis Drivers API Documentation
xscutimer_intr_example.c File Reference

Overview

This file contains a design example using the Cortex A9 Scu Private Timer and the driver (XScuTimer) using interrupts.

Note
None.
MODIFICATION HISTORY:
Ver   Who  Date     Changes


1.00a nm 03/10/10 First release 2.5 dp 07/11/23 Add Support for system device tree flow 2.5 dp 09/08/23 Update example to stop timer at the end of the test

Functions

int ScuTimerIntrExample (XScuGic *IntcInstancePtr, XScuTimer *TimerInstancePtr, u16 TimerDeviceId, u16 TimerIntrId)
 This function tests the functioning of the Cortex A9 Scu Private Timer driver and hardware using interrupts. More...
 
int main (void)
 Main function to call the Cortex A9 Scu Private Timer interrupt example. More...
 

Function Documentation

int main ( void  )

Main function to call the Cortex A9 Scu Private Timer interrupt example.

Parameters
None.
Returns
XST_SUCCESS if successful, otherwise XST_FAILURE.
Note
None.

References ScuTimerIntrExample().

int ScuTimerIntrExample ( XScuGic *  IntcInstancePtr,
XScuTimer TimerInstancePtr,
u16  TimerDeviceId,
u16  TimerIntrId 
)

This function tests the functioning of the Cortex A9 Scu Private Timer driver and hardware using interrupts.

Parameters
IntcInstancePtris a pointer to the instance of XScuGic driver.
TimerInstancePtris a pointer to the instance of XScuTimer driver.
TimerDeviceIdis the Device ID of the XScuTimer device.
TimerIntrIdis the Interrupt Id of the XScuTimer device.
Returns
XST_SUCCESS if successful, otherwise XST_FAILURE.
Note
None.

References XScuTimer_Config::BaseAddr, XScuTimer::Config, XScuTimer_CfgInitialize(), XScuTimer_EnableAutoReload, XScuTimer_EnableInterrupt, XScuTimer_LoadTimer, XScuTimer_LookupConfig(), XScuTimer_SelfTest(), XScuTimer_Start(), and XScuTimer_Stop().

Referenced by main().