The source code for the driver is included with the Vitis Unified Software Platform installation, as well as being available in the Xilinx Github repository.
Driver name | Path in Vitis | Path in Github |
---|---|---|
canps | <Vitis Install Directory>/data/embedded/XilinxProcessorIPLib/drivers/canps | https://github.com/Xilinx/embeddedsw/tree/master/XilinxProcessorIPLib/drivers/canps |
Note: To view the sources for a particular release, use the rel-version tag in github. For example, for the 2020.1 release, the proper version of the code is: https://github.com/Xilinx/embeddedsw/tree/master/XilinxProcessorIPLib/drivers/canps |
The driver source code is organized into different folders. The table below shows the canps driver source organization.
Directory | Description |
---|---|
src | Driver source files |
examples | Example applications that show how to use the driver features |
doc | Provides the API and data structure details |
data | Driver .tcl and .mdd file |
For a full list of features supported by this IP, please refer Chapter 20: Can Controller in Zynqmp Trm
Examples Path:
https://github.com/Xilinx/embeddedsw/tree/master/XilinxProcessorIPLib/drivers/canps/examples
Test Name | Source | Description |
---|---|---|
Polled | xcanps_polled_example.c | It configures the CAN controller in loop back mode with no interrupt enabled and verifies the data received with data sent |
interrupt | xcanps_intr_example.c | It configures the CAN controller in loop back mode with interrupts enabled and verifies the data received with data sent |
Watermark | xcanps_watermark_intr_example.c | It configures the CAN controller in loop back mode with rx and tx water mark interrupts enabled with some RX and TX threshold. |
Polled Mode test:: CAN Polled Mode Example Test Successfully ran CAN Polled Mode Example Test |
Interrupt Mode test: CAN Interrupt Example Test Successfully ran CAN Interrupt Example Test |
Water Mark Test: CAN Watermark Example Test Successfully ran CAN Watermark Example Test |