![]() |
scugic
Vitis Drivers API Documentation
|
This file contains a self test example using the Interrupt Controller driver (XScuGic) and hardware device.
Please reference other device driver examples to see more examples of how the Intc and interrupts can be used by a software application.
The TestApp Gen utility uses this file to perform the self test and setup of Intc for interrupts.
MODIFICATION HISTORY:
Ver Who Date Changes
1.00a sdm 05/29/11 Created for Test App Integration 3.6 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. 5.7 bdk 12/08/25 Updated comments to support SDT flow for Doxygen documentation.
Macros | |
| #define | XSCUGIC_DIST_BASEADDR XPAR_XSCUGIC_0_BASEADDR |
| Base address of the GIC distributor. More... | |
Functions | |
| int | ScuGicSelfTestExample (u32 BaseAddr) |
| Runs a self-test on the driver/device. More... | |
| int | ScuGicInterruptSetup (XScuGic *IntcInstancePtr, u32 BaseAddr) |
| Sets up the interrupt system for the TestAppGen application. More... | |
| int | main (void) |
| This is the main function for the Interrupt Controller example. More... | |
| #define XSCUGIC_DIST_BASEADDR XPAR_XSCUGIC_0_BASEADDR |
Base address of the GIC distributor.
Referenced by main().
| int main | ( | void | ) |
This is the main function for the Interrupt Controller example.
This function is not included if the example is generated from the TestAppGen test tool.
References ScuGicSelfTestExample(), and XSCUGIC_DIST_BASEADDR.
| int ScuGicInterruptSetup | ( | XScuGic * | IntcInstancePtr, |
| u32 | BaseAddr | ||
| ) |
Sets up the interrupt system for the TestAppGen application.
| [in] | IntcInstancePtr | is the reference to the Interrupt Controller instance. |
| [in] | BaseAddr | is the base address of the device |
References XScuGic_Config::CpuBaseAddress, XScuGic_CfgInitialize(), XScuGic_InterruptHandler(), and XScuGic_LookupConfig().
| int ScuGicSelfTestExample | ( | u32 | BaseAddr | ) |
Runs a self-test on the driver/device.
This is a destructive test. This function is an example of how to use the interrupt controller driver component (XScuGic) and the hardware device. This function is designed to work without any hardware devices to cause interrupts. It may not return if the interrupt controller is not properly connected to the processor in either software or hardware. This function relies on the fact that the interrupt controller hardware has come out of the reset state such that it will allow interrupts to be simulated by the software.
| [in] | BaseAddr | is the base address of the device |
References XScuGic_Config::CpuBaseAddress, XScuGic_CfgInitialize(), and XScuGic_LookupConfig().
Referenced by main().