i3cpsx
Vitis Drivers API Documentation
i3cpsx Documentation

This is an implementation of I3C driver in the PS block. The device can be either a master or a slave on the I3C bus. This implementation supports both interrupt mode transfer and polled mode transfer.

The higher level software must implement a higher layer protocol to inform the slave what to send to the master.

Initialization & Configuration

The XI3cPsx_Config structure is used by the driver to configure itself. This configuration structure is typically created by the tool-chain based on HW build properties.

To support multiple runtime loading and initialization strategies employed by various operating systems, the driver instance can be initialized in the following way:

  • XI3cPsx_LookupConfig(DeviceId) - Use the device identifier to find the static configuration structure defined in XI3cPsx_g.c. This is setup by the tools. For some operating systems the config structure will be initialized by the software and this call is not needed.
  • XI3cPsx_CfgInitialize(InstancePtr, CfgPtr, EffectiveAddr) - Uses a configuration structure provided by the caller. If running in a system with address translation, the provided virtual memory base address replaces the physical address in the configuration structure.

Multiple Masters

Multiple Slaves

Multiple slaves are supported by selecting them with unique addresses.

Polled Mode Operation

This driver supports polled mode transfers.

Interrupts

The user must connect the interrupt handler of the driver, XI3cPsx_InterruptHandler to an interrupt system such that it will be called when an interrupt occurs. This function does not save and restore the processor context such that the user must provide this processing.

The driver handles the following interrupts:

  • Transfer complete
  • More Data
  • Error
 MODIFICATION HISTORY:
Ver   Who     Date     Changes


1.00 sd 06/10/22 First release 1.3 sd 11/17/23 Added support for system device-tree flow 1.4 gm 10/07/24 Added functions for Enable, Resume, read response and set threshold for Tx, Rx and command. Update data type of Send and Recv byte counts.