IntroductionThis page gives an overview of I2C-PS driver which is available as part of the Xilinx Vivado and SDK distribution.Source path for the driver:https://github.com/Xilinx/embeddedsw/tree/master/XilinxProcessorIPLib/drivers/iicpsDriver source code is organized into different folders. Below diagram shows the iicps driver source organizationiicps|-- 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
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.
The driver source code is organized into different folders. The table below shows the ospipsv driver source organization.
Provides the API and data structure details
Driver .tcl and .mdd file
Example applications that show how to use the driver features
Driver source files
For a full list of features supported by this IP, please refer Chapter 69: I2C Controller in Versal TRM
FeaturesI2C bus specification version 2Supports 16-byte FIFOProgrammable normal and fast bus data ratesMaster modeWrite transferRead transferExtended address supportSupport HOLD for slow processor serviceSupports TO interrupt flag to avoid stall conditionSlave monitor modeSlave modeSlave transmitterSlave receiverExtended address support (10-bit address)Fully programmable slave response addressSupports HOLD to prevent overflow conditionSupports TO interrupt flag to avoid stall conditionSoftware can poll for status or function as interrupt-driven deviceProgrammable interrupt generation
Known issues and Limitations
Multi-master configuration works only if all the participating masters are operating at the same frequency.
Refer to the driver examples directory for various example applications that exercise the different features of the driver. Each application is linked in the table below. The following sections describe the usage and expected output of the various applications. These example applications can be imported into the Vitis IDE from the Board Support Package settings tab.
Links to Examples
Example Application Usage
IICPS eeprom interrupt mode example
This example does eeprom read/writes using interrupts.
IIC EEPROM Interrupt Example Test
Page size 16
Successfully ran IIC EEPROM Interrupt Example Test
IICPS eeprom polled mode example
This example does eeprom read/writes using polling.
IIC EEPROM Polled Mode Example Test
Page size 16
Successfully ran IIC EEPROM Polled Mode Example Test
IICPS slave monitor mode example
This example does slave monitoring of an I2C slave device.
IIC Slave Monitor Example Test
Successfully ran IIC Slave Monitor Example Test
Example Design Architecture