mipicsiss
Vitis Drivers API Documentation
 All Data Structures Files Functions Variables Typedefs Enumerations Macros Groups Pages
Overview

Data Structures

struct  CsiRxSsSubCore
 Sub-Core Configuration Table. More...
 
struct  XCsiSs_Config
 MIPI CSI Rx Subsystem configuration structure. More...
 
struct  XCsiSs
 The XCsiSs driver instance data. More...
 

Macros

#define XCSISS_H_
 Prevent circular inclusions by using protection macros. More...
 
#define XCSISS_HW_H_
 Prevent circular inclusions by using protection macros. More...
 

Typedefs

typedef void(* XCsiSs_Callback )(void *CallbackRef, u32 Mask)
 Callback type which acts as a wrapper on top of CSI Callback. More...
 

Functions

u32 XCsiSs_CfgInitialize (XCsiSs *InstancePtr, XCsiSs_Config *CfgPtr, UINTPTR EffectiveAddr)
 This function initializes the MIPI CSI subsystem and included sub-cores. More...
 
u32 XCsiSs_Configure (XCsiSs *InstancePtr, u8 ActiveLanes, u32 IntrMask)
 This function is used to configure the CSI lanes and interrupts that are to be handled by the application. More...
 
u32 XCsiSs_Activate (XCsiSs *InstancePtr, u8 Flag)
 This function is used to activate the CSI Subsystem. More...
 
u32 XCsiSs_Reset (XCsiSs *InstancePtr)
 This function is used to reset the CSI Subsystem. More...
 
void XCsiSs_ReportCoreInfo (XCsiSs *InstancePtr)
 This function reports list of cores included. More...
 
void XCsiSs_SetVCSelection (XCsiSs *InstancePtr, u16 Value)
 This function will control the virtual channels selection dynamically. More...
 
u32 XCsiSs_GetVCSelection (XCsiSs *InstancePtr)
 This function will return the virtual channels selected. More...
 
void XCsiSs_GetShortPacket (XCsiSs *InstancePtr)
 This function gets the short packets. More...
 
void XCsiSs_GetLaneInfo (XCsiSs *InstancePtr)
 This function gets the clk and data lane info. More...
 
void XCsiSs_GetVCInfo (XCsiSs *InstancePtr)
 This function gets the virtual channel information. More...
 
XCsiSs_ConfigXCsiSs_LookupConfig (UINTPTR BaseAddress)
 Lookup the device configuration based on the base address. More...
 
u32 XCsiSs_GetDrvIndex (UINTPTR BaseAddress)
 Get the driver index based on the base address. More...
 
u32 XCsiSs_SelfTest (XCsiSs *InstancePtr)
 Run a self-test on the MIPI CSI Rx Subsystem. More...
 
void XCsiSs_IntrHandler (void *InstancePtr)
 Interrupt handler for the MIPI CSI Rx Subsystem. More...
 
void XCsiSs_IntrDisable (XCsiSs *InstancePtr, u32 IntrMask)
 Disable interrupts in the MIPI CSI Rx Subsystem. More...
 
u32 XCsiSs_SetCallBack (XCsiSs *InstancePtr, u32 HandlerType, void *CallbackFunc, void *CallbackRef)
 Set callback function for interrupt handling. More...
 

Variables

XCsiSs_SubCores CsiSsSubCores [XPAR_XMIPICSISS_NUM_INSTANCES]
 Driver instance array of all sub-cores included in the design. More...
 
XCsiSs_Config XCsiSs_ConfigTable []
 MIPI CSI Rx Subsystem configuration table (SDT) More...
 
XCsiSs_Config XCsiSs_ConfigTable []
 MIPI CSI Rx Subsystem configuration table (SDT) More...
 

Interrupt Types for setting Callbacks

These handlers are used to determine the type of the interrupt handler being registered with the MIPI CSI Rx Subsystem.

Since the subsystem is tightly coupled with the CSI Rx Controller driver, the handlers from the sub core are promoted to the subsystem level so that the application can use them.

#define XCSISS_HANDLER_DPHY   XCSI_HANDLER_DPHY
 D-PHY handler. More...
 
#define XCSISS_HANDLER_PKTLVL   XCSI_HANDLER_PKTLVL
 Packet level handler. More...
 
#define XCSISS_HANDLER_PROTLVL   XCSI_HANDLER_PROTLVL
 Protocol level handler. More...
 
#define XCSISS_HANDLER_SHORTPACKET   XCSI_HANDLER_SHORTPACKET
 Short packet handler. More...
 
#define XCSISS_HANDLER_FRAMERECVD   XCSI_HANDLER_FRAMERECVD
 Frame received handler. More...
 
#define XCSISS_HANDLER_OTHERERROR   XCSI_HANDLER_OTHERERROR
 Other error handler. More...
 
#define XCSISS_HANDLER_VCX   XCSI_HANDLER_VCXFRAMEERROR
 VCX frame error handler. More...
 

Bitmasks for interrupt callbacks

Please refer to CSI driver for details of the bitmasks.

The application should use the XCSISS_ISR* masks in the call back functions to decode the exact cause of interrupt and handle it accordingly.

#define XCSISS_ISR_FR_MASK   XCSI_ISR_FR_MASK
 Frame received. More...
 
#define XCSISS_ISR_VCXFE_MASK   XCSI_ISR_VCXFE_MASK
 VCX frame error. More...
 
#define XCSISS_ISR_SKEWCALCHS_MASK   XCSI_ISR_SKEWCALCHS_MASK
 Skew calc HS. More...
 
#define XCSISS_ISR_YUV420_MASK   XCSI_ISR_YUV420_MASK
 YUV420 error. More...
 
#define XCSISS_ISR_WC_MASK   XCSI_ISR_WC_MASK
 Word count error. More...
 
#define XCSISS_ISR_ILC_MASK   XCSI_ISR_ILC_MASK
 Incorrect lanes. More...
 
#define XCSISS_ISR_SPFIFOF_MASK   XCSI_ISR_SPFIFOF_MASK
 SP FIFO full. More...
 
#define XCSISS_ISR_SPFIFONE_MASK   XCSI_ISR_SPFIFONE_MASK
 SP FIFO not empty. More...
 
#define XCSISS_ISR_SLBF_MASK   XCSI_ISR_SLBF_MASK
 Stream line buf full. More...
 
#define XCSISS_ISR_STOP_MASK   XCSI_ISR_STOP_MASK
 Stop state detected. More...
 
#define XCSISS_ISR_SOTERR_MASK   XCSI_ISR_SOTERR_MASK
 SoT error. More...
 
#define XCSISS_ISR_SOTSYNCERR_MASK   XCSI_ISR_SOTSYNCERR_MASK
 SoT sync error. More...
 
#define XCSISS_ISR_ECC2BERR_MASK   XCSI_ISR_ECC2BERR_MASK
 ECC 2-bit error. More...
 
#define XCSISS_ISR_ECC1BERR_MASK   XCSI_ISR_ECC1BERR_MASK
 ECC 1-bit error. More...
 
#define XCSISS_ISR_CRCERR_MASK   XCSI_ISR_CRCERR_MASK
 CRC error. More...
 
#define XCSISS_ISR_DATAIDERR_MASK   XCSI_ISR_DATAIDERR_MASK
 Data ID error. More...
 
#define XCSISS_ISR_VC3FSYNCERR_MASK   XCSI_ISR_VC3FSYNCERR_MASK
 VC3 frame sync error. More...
 
#define XCSISS_ISR_VC3FLVLERR_MASK   XCSI_ISR_VC3FLVLERR_MASK
 VC3 frame level error. More...
 
#define XCSISS_ISR_VC2FSYNCERR_MASK   XCSI_ISR_VC2FSYNCERR_MASK
 VC2 frame sync error. More...
 
#define XCSISS_ISR_VC2FLVLERR_MASK   XCSI_ISR_VC2FLVLERR_MASK
 VC2 frame level error. More...
 
#define XCSISS_ISR_VC1FSYNCERR_MASK   XCSI_ISR_VC1FSYNCERR_MASK
 VC1 frame sync error. More...
 
#define XCSISS_ISR_VC1FLVLERR_MASK   XCSI_ISR_VC1FLVLERR_MASK
 VC1 frame level error. More...
 
#define XCSISS_ISR_VC0FSYNCERR_MASK   XCSI_ISR_VC0FSYNCERR_MASK
 VC0 frame sync error. More...
 
#define XCSISS_ISR_VC0FLVLERR_MASK   XCSI_ISR_VC0FLVLERR_MASK
 VC0 frame level error. More...
 
#define XCSISS_ISR_ALLINTR_MASK   XCSI_ISR_ALLINTR_MASK
 All interrupts mask. More...
 

BitMasks for grouped interrupts

All interrupts are grouped into DPHY Level Errors, Protocol Decoding Errors, Packet Level Errors, Normal Errors, Frame Received interrupt and Short Packet related.

These are used by application to determine the exact event causing the interrupt

#define XCSISS_INTR_PROT_MASK   XCSI_INTR_PROT_MASK
 Protocol error mask. More...
 
#define XCSISS_INTR_PKTLVL_MASK   XCSI_INTR_PKTLVL_MASK
 Packet level error mask. More...
 
#define XCSISS_INTR_DPHY_MASK   XCSI_INTR_DPHY_MASK
 D-PHY error mask. More...
 
#define XCSISS_INTR_SPKT_MASK   XCSI_INTR_SPKT_MASK
 Short packet mask. More...
 
#define XCSISS_INTR_FRAMERCVD_MASK   XCSI_INTR_FRAMERCVD_MASK
 Frame received mask. More...
 
#define XCSISS_INTR_ERR_MASK   XCSI_INTR_ERR_MASK
 Other error mask. More...
 

Macro Definition Documentation

#define XCSISS_H_

Prevent circular inclusions by using protection macros.

#define XCSISS_HANDLER_DPHY   XCSI_HANDLER_DPHY

D-PHY handler.

Referenced by CsiSs_IntrExample().

#define XCSISS_HANDLER_FRAMERECVD   XCSI_HANDLER_FRAMERECVD

Frame received handler.

Referenced by CsiSs_IntrExample().

#define XCSISS_HANDLER_OTHERERROR   XCSI_HANDLER_OTHERERROR

Other error handler.

Referenced by CsiSs_IntrExample().

#define XCSISS_HANDLER_PKTLVL   XCSI_HANDLER_PKTLVL

Packet level handler.

Referenced by CsiSs_IntrExample().

#define XCSISS_HANDLER_PROTLVL   XCSI_HANDLER_PROTLVL

Protocol level handler.

Referenced by CsiSs_IntrExample().

#define XCSISS_HANDLER_SHORTPACKET   XCSI_HANDLER_SHORTPACKET

Short packet handler.

Referenced by CsiSs_IntrExample().

#define XCSISS_HANDLER_VCX   XCSI_HANDLER_VCXFRAMEERROR

VCX frame error handler.

#define XCSISS_HW_H_

Prevent circular inclusions by using protection macros.

#define XCSISS_INTR_DPHY_MASK   XCSI_INTR_DPHY_MASK

D-PHY error mask.

#define XCSISS_INTR_ERR_MASK   XCSI_INTR_ERR_MASK

Other error mask.

#define XCSISS_INTR_FRAMERCVD_MASK   XCSI_INTR_FRAMERCVD_MASK

Frame received mask.

#define XCSISS_INTR_PKTLVL_MASK   XCSI_INTR_PKTLVL_MASK

Packet level error mask.

#define XCSISS_INTR_PROT_MASK   XCSI_INTR_PROT_MASK

Protocol error mask.

#define XCSISS_INTR_SPKT_MASK   XCSI_INTR_SPKT_MASK

Short packet mask.

#define XCSISS_ISR_ALLINTR_MASK   XCSI_ISR_ALLINTR_MASK

All interrupts mask.

Referenced by CsiSs_IntrExample(), and XCsiSs_IntrDisable().

#define XCSISS_ISR_CRCERR_MASK   XCSI_ISR_CRCERR_MASK

CRC error.

Referenced by CsiSs_PktLvlEventHandler().

#define XCSISS_ISR_DATAIDERR_MASK   XCSI_ISR_DATAIDERR_MASK

Data ID error.

Referenced by CsiSs_PktLvlEventHandler().

#define XCSISS_ISR_ECC1BERR_MASK   XCSI_ISR_ECC1BERR_MASK

ECC 1-bit error.

Referenced by CsiSs_PktLvlEventHandler().

#define XCSISS_ISR_ECC2BERR_MASK   XCSI_ISR_ECC2BERR_MASK

ECC 2-bit error.

Referenced by CsiSs_PktLvlEventHandler().

#define XCSISS_ISR_FR_MASK   XCSI_ISR_FR_MASK

Frame received.

#define XCSISS_ISR_ILC_MASK   XCSI_ISR_ILC_MASK

Incorrect lanes.

Referenced by CsiSs_ErrEventHandler().

#define XCSISS_ISR_SKEWCALCHS_MASK   XCSI_ISR_SKEWCALCHS_MASK

Skew calc HS.

#define XCSISS_ISR_SLBF_MASK   XCSI_ISR_SLBF_MASK

Stream line buf full.

Referenced by CsiSs_ErrEventHandler().

#define XCSISS_ISR_SOTERR_MASK   XCSI_ISR_SOTERR_MASK

SoT error.

Referenced by CsiSs_DphyEventHandler().

#define XCSISS_ISR_SOTSYNCERR_MASK   XCSI_ISR_SOTSYNCERR_MASK

SoT sync error.

Referenced by CsiSs_DphyEventHandler().

#define XCSISS_ISR_SPFIFOF_MASK   XCSI_ISR_SPFIFOF_MASK

SP FIFO full.

Referenced by CsiSs_SPktEventHandler().

#define XCSISS_ISR_SPFIFONE_MASK   XCSI_ISR_SPFIFONE_MASK

SP FIFO not empty.

Referenced by CsiSs_SPktEventHandler().

#define XCSISS_ISR_STOP_MASK   XCSI_ISR_STOP_MASK

Stop state detected.

#define XCSISS_ISR_VC0FLVLERR_MASK   XCSI_ISR_VC0FLVLERR_MASK

VC0 frame level error.

Referenced by CsiSs_ProtLvlEventHandler().

#define XCSISS_ISR_VC0FSYNCERR_MASK   XCSI_ISR_VC0FSYNCERR_MASK

VC0 frame sync error.

Referenced by CsiSs_ProtLvlEventHandler().

#define XCSISS_ISR_VC1FLVLERR_MASK   XCSI_ISR_VC1FLVLERR_MASK

VC1 frame level error.

Referenced by CsiSs_ProtLvlEventHandler().

#define XCSISS_ISR_VC1FSYNCERR_MASK   XCSI_ISR_VC1FSYNCERR_MASK

VC1 frame sync error.

Referenced by CsiSs_ProtLvlEventHandler().

#define XCSISS_ISR_VC2FLVLERR_MASK   XCSI_ISR_VC2FLVLERR_MASK

VC2 frame level error.

Referenced by CsiSs_ProtLvlEventHandler().

#define XCSISS_ISR_VC2FSYNCERR_MASK   XCSI_ISR_VC2FSYNCERR_MASK

VC2 frame sync error.

Referenced by CsiSs_ProtLvlEventHandler().

#define XCSISS_ISR_VC3FLVLERR_MASK   XCSI_ISR_VC3FLVLERR_MASK

VC3 frame level error.

Referenced by CsiSs_ProtLvlEventHandler().

#define XCSISS_ISR_VC3FSYNCERR_MASK   XCSI_ISR_VC3FSYNCERR_MASK

VC3 frame sync error.

Referenced by CsiSs_ProtLvlEventHandler().

#define XCSISS_ISR_VCXFE_MASK   XCSI_ISR_VCXFE_MASK

VCX frame error.

#define XCSISS_ISR_WC_MASK   XCSI_ISR_WC_MASK

Word count error.

Referenced by CsiSs_ErrEventHandler().

#define XCSISS_ISR_YUV420_MASK   XCSI_ISR_YUV420_MASK

YUV420 error.

Referenced by CsiSs_ErrEventHandler().

Typedef Documentation

typedef void(* XCsiSs_Callback)(void *CallbackRef, u32 Mask)

Callback type which acts as a wrapper on top of CSI Callback.

Parameters
CallbackRefis a callback reference passed in by the upper layer when setting the callback functions, and passed back to the upper layer when the callback is invoked.
Maskis a bit mask indicating the cause of the event. For current core version, this parameter is "OR" of 0 or more XCSISS_ISR_*_MASK constants defined in xcsiss_hw.h.
Returns
None.
Note
None.

Function Documentation

u32 XCsiSs_Activate ( XCsiSs InstancePtr,
u8  Flag 
)

This function is used to activate the CSI Subsystem.

Activate or deactivate the MIPI CSI Rx Subsystem.

Internally it activates the DPHY and CSI.

Parameters
InstancePtris a pointer to the Subsystem instance to be worked on.
Flagis used to denote whether to enable or disable the subsystem.
Returns
  • XST_SUCCESS on successful operation.
  • XST_FAILURE on failed operation.
Note
None.

This function activates or deactivates the MIPI CSI Rx Subsystem based on the Flag parameter.

Parameters
InstancePtris a pointer to the XCsiSs instance.
Flagis the enable/disable flag. TRUE to enable, FALSE to disable.
Returns
  • XST_SUCCESS if operation was successful.
  • XST_FAILURE if operation failed.
Note
None.

References XCsiSs::Config, XCsiSs::CsiPtr, and XCsiSs_Config::IsDphyRegIntfcPresent.

Referenced by CsiSs_IntrExample(), and EnableCSI().

u32 XCsiSs_CfgInitialize ( XCsiSs InstancePtr,
XCsiSs_Config CfgPtr,
UINTPTR  EffectiveAddr 
)

This function initializes the MIPI CSI subsystem and included sub-cores.

Initialize the MIPI CSI Rx Subsystem driver.

This function must be called prior to using the subsystem. Initialization includes setting up the instance data for top level as well as all included sub-core therein, and ensuring the hardware is in a known stable state.

Parameters
InstancePtris a pointer to the Subsystem instance to be worked on.
CfgPtrpoints to the configuration structure associated with the subsystem instance.
EffectiveAddris the base address of the device. If address translation is being used, then this parameter must reflect the virtual base address. Otherwise, the physical address should be used.
Returns
  • XST_SUCCESS if initialization is successful.
  • XST_FAILURE otherwise.
Note
None.

This function initializes the MIPI CSI Rx Subsystem driver. This function must be called prior to using the driver. Initialization includes setting up the instance data and ensuring the hardware is in a quiescent state.

Parameters
InstancePtris a pointer to the XCsiSs instance.
CfgPtris a reference to a structure containing information about a specific XCsiSs instance.
EffectiveAddris the base address of the device. If address translation is being used, then this parameter must reflect the virtual base address. Otherwise, the physical address should be used.
Returns
  • XST_SUCCESS if initialization was successful.
  • XST_FAILURE if initialization failed.
Note
None.

References XCsiSs_Config::BaseAddr, XCsiSs::Config, XCsiSs::CsiPtr, XCsiSs_Config::IsDphyRegIntfcPresent, and XCsiSs::IsReady.

Referenced by CsiSs_IntrExample(), CsiSs_SelfTestExample(), and InitializeCsiRxSs().

u32 XCsiSs_Configure ( XCsiSs InstancePtr,
u8  ActiveLanes,
u32  IntrMask 
)

This function is used to configure the CSI lanes and interrupts that are to be handled by the application.

Configure the MIPI CSI Rx Subsystem.

Refer to XCsi.h for interrupt masks.

Parameters
InstancePtris a pointer to the Subsystem instance to be worked on.
ActiveLanesis no of active lanes to be configure. This value ranges between 1 and 4. In case Dynamic Active Lane config is enabled, this value can't exceed maximum lanes present. When Dynamic Active Lane config is disabled, it should be equal to maximum lanes.
IntrMaskIndicates Mask for enable interrupts.
Returns
  • XST_SUCCESS on successful configuration of parameters.
  • XST_FAILURE otherwise.
Note
When EnableActiveLanes is 0, then the ActiveLanes parameter passed should be equal to Max Lanes of design.

This function configures the MIPI CSI Rx Subsystem with the specified active lanes and interrupt mask.

Parameters
InstancePtris a pointer to the XCsiSs instance.
ActiveLanesis the number of active lanes to be used.
IntrMaskis the interrupt mask to enable specific interrupts.
Returns
  • XST_SUCCESS if configuration was successful.
  • XST_FAILURE if configuration failed.
Note
None.

References XCsiSs::CsiPtr.

Referenced by CsiSs_IntrExample(), and EnableCSI().

u32 XCsiSs_GetDrvIndex ( UINTPTR  BaseAddress)

Get the driver index based on the base address.

This function returns the Index number of config table using BaseAddress.

This function returns the driver index based on the base address.

Parameters
BaseAddressis the base address of the device.
Returns
Driver index.
Note
None.
Parameters
BaseAddressis base address of the instance
Returns
Index number of the config table
void XCsiSs_GetLaneInfo ( XCsiSs InstancePtr)

This function gets the clk and data lane info.

Get lane information.

Parameters
InstancePtris a pointer to the Subsystem instance to be worked on.
Returns
None.
Note
None.

This function retrieves the lane information from the MIPI CSI Rx Subsystem.

Parameters
InstancePtris a pointer to the XCsiSs instance.
Returns
None.
Note
None.

References XCsiSs::ClkInfo, XCsiSs::Config, XCsiSs::CsiPtr, XCsiSs::DLInfo, and XCsiSs_Config::LanesPresent.

void XCsiSs_GetShortPacket ( XCsiSs InstancePtr)

This function gets the short packets.

Get short packet information.

Parameters
InstancePtris a pointer to the Subsystem instance to be worked on.
Returns
None.
Note
None.

This function retrieves the short packet information from the MIPI CSI Rx Subsystem.

Parameters
InstancePtris a pointer to the XCsiSs instance.
Returns
None.
Note
None.

References XCsiSs::CsiPtr, and XCsiSs::SpktData.

Referenced by CsiSs_SPktEventHandler().

void XCsiSs_GetVCInfo ( XCsiSs InstancePtr)

This function gets the virtual channel information.

Get virtual channel information.

Parameters
InstancePtris a pointer to the Subsystem instance to be worked on.
Returns
None.
Note
None.

This function retrieves the virtual channel information from the MIPI CSI Rx Subsystem.

Parameters
InstancePtris a pointer to the XCsiSs instance.
Returns
None.
Note
None.

References XCsiSs::Config, XCsiSs::CsiPtr, XCsiSs_Config::EnableVCx, and XCsiSs::VCInfo.

u32 XCsiSs_GetVCSelection ( XCsiSs InstancePtr)

This function will return the virtual channels selected.

Get the virtual channel selection.

Parameters
InstancePtris a pointer to the Subsystem instance to be worked on.
Returns
Value of selected VCs.
Note
In order to use dynamic VC selection, 'Allowed VC to all' must be selected in IP Configuration.

This function returns the current virtual channel selection.

Parameters
InstancePtris a pointer to the XCsiSs instance.
Returns
Virtual channel selection value.
Note
None.

References XCsiSs::Config, XCsiSs::CsiPtr, XCsiSs_Config::EnableVCx, and XCsiSs_Config::VcNo.

void XCsiSs_IntrDisable ( XCsiSs InstancePtr,
u32  IntrMask 
)

Disable interrupts in the MIPI CSI Rx Subsystem.

This function is used to disable the interrupts in the CSI core.

This function disables the specified interrupts in the MIPI CSI Rx Subsystem.

Parameters
InstancePtris a pointer to the XCsiSs instance.
IntrMaskis the bit-mask of the interrupts to be disabled.
Returns
None.
Note
None.
Parameters
InstancePtris a pointer to the Subsystem instance to be worked on.
IntrMaskIndicates Mask for enable interrupts.
Returns
None
Note
None

References XCsiSs::CsiPtr, and XCSISS_ISR_ALLINTR_MASK.

void XCsiSs_IntrHandler ( void *  InstancePtr)

Interrupt handler for the MIPI CSI Rx Subsystem.

This function is the interrupt handler for the MIPI CSI Rx Subsystem.

This function is the interrupt handler for the MIPI CSI Rx Subsystem driver. It processes all pending interrupts and routes them to the appropriate callback handlers.

Parameters
InstancePtris a pointer to the XCsiSs instance (passed as void *).
Returns
None.
Note
This function should be connected to the interrupt system.

The application is responsible for connecting this function to the interrupt system. Application beyond this driver is also responsible for providing callbacks to handle interrupts and installing the callbacks using XCsiSs_SetCallBack() during initialization phase.

Parameters
InstancePtris a pointer to the XCsiSs core instance that just interrupted.
Returns
None.
Note
None.

References XCsiSs::CsiPtr.

Referenced by CsiSs_IntrExample(), and main().

XCsiSs_Config * XCsiSs_LookupConfig ( UINTPTR  BaseAddress)

Lookup the device configuration based on the base address.

This function looks for the device configuration based on the unique device ID.

This function returns a reference to an XCsiSs_Config structure based on the base address. This function will return a NULL pointer if the base address is not found.

Parameters
BaseAddressis the base address of the device to lookup for.
Returns
XCsiSs_Config reference if BaseAddress is found, NULL otherwise.
Note
None.

The table XCsiSs_ConfigTable[] contains the configuration information for each instance of the device in the system.

Parameters
DeviceIdis the unique device ID of the device being looked up
Returns
A pointer to the configuration table entry corresponding to the given device ID, or NULL if no match is found
Note
None.

Referenced by CsiSs_IntrExample(), CsiSs_SelfTestExample(), and InitializeCsiRxSs().

void XCsiSs_ReportCoreInfo ( XCsiSs InstancePtr)

This function reports list of cores included.

Report the core information.

Parameters
InstancePtris a pointer to the Subsystem instance to be worked on.
Returns
None.
Note
None.

This function reports the core information of the MIPI CSI Rx Subsystem.

Parameters
InstancePtris a pointer to the XCsiSs instance.
Returns
None.
Note
None.

References XCsiSs::Config, XCsiSs::CsiPtr, and XCsiSs_Config::IsDphyRegIntfcPresent.

Referenced by CsiSs_IntrExample().

u32 XCsiSs_Reset ( XCsiSs InstancePtr)

This function is used to reset the CSI Subsystem.

Reset the MIPI CSI Rx Subsystem.

Internally it resets the DPHY and CSI only as the IIC instance is separately handled by the application.

Parameters
InstancePtris a pointer to the Subsystem instance to be worked on.
Returns
  • XST_SUCCESS if all the sub core IP resets occur correctly.
  • XST_FAILURE if reset fails for any sub core IP.
Note
None.

This function resets the MIPI CSI Rx Subsystem.

Parameters
InstancePtris a pointer to the XCsiSs instance.
Returns
  • XST_SUCCESS if reset was successful.
  • XST_FAILURE if reset failed.
Note
None.

References XCsiSs::CsiPtr.

Referenced by CsiSs_IntrExample(), DisableCSI(), and EnableCSI().

u32 XCsiSs_SelfTest ( XCsiSs InstancePtr)

Run a self-test on the MIPI CSI Rx Subsystem.

This function performs self test on MIPI CSI Rx Subsystem sub-cores.

This function runs a self-test on the MIPI CSI Rx Subsystem driver/device. The self-test checks for proper functionality of the subsystem.

Parameters
InstancePtris a pointer to the XCsiSs instance.
Returns
  • XST_SUCCESS if self-test was successful.
  • XST_FAILURE if self-test failed.
Note
None.
Parameters
InstancePtris a pointer to the XCsiSs core instance.
Returns
  • XST_SUCCESS if self test passed.
  • XST_FAILURE if self test failed.
Note
None.

References XCsiSs::CsiPtr.

Referenced by CsiSs_SelfTestExample().

u32 XCsiSs_SetCallBack ( XCsiSs InstancePtr,
u32  HandlerType,
void *  CallbackFunc,
void *  CallbackRef 
)

Set callback function for interrupt handling.

This routine installs an asynchronous callback function for the given HandlerType:

This function sets a callback function for a specific interrupt handler type. The registered callback function will be called when the corresponding interrupt occurs.

Parameters
InstancePtris a pointer to the XCsiSs instance.
HandlerTypeis the type of handler to register. It can be one of:
  • XCSISS_HANDLER_DPHY
  • XCSISS_HANDLER_PKTLVL
  • XCSISS_HANDLER_PROTLVL
  • XCSISS_HANDLER_SHORTPACKET
  • XCSISS_HANDLER_FRAMERECVD
  • XCSISS_HANDLER_OTHERERROR
  • XCSISS_HANDLER_VCX
CallbackFuncis the address of the callback function.
CallbackRefis a user data item that will be passed to the callback function when it is invoked.
Returns
  • XST_SUCCESS if callback was successfully registered.
  • XST_FAILURE if callback registration failed.
Note
None.
HandlerType                Invoked by this driver when:
-------------------------  --------------------------------------------------
XCSISS_HANDLER_DPHY        A DPHY Level Error has been detected.
XCSISS_HANDLER_PROTLVL     A Protocol Level Error has been detected.
XCSISS_HANDLER_PKTLVL      A Packet Level Error has been detected.
XCSISS_HANDLER_SHORTPACKET A Short packet has been received or the
                           Short Packet FIFO is full.
XCSISS_HANDLER_FRAMERECVD  A Frame has been received
XCSISS_HANDLER_OTHERERROR  Any other type of interrupt has occurred like
                           Stream Line Buffer Full, Incorrect Lanes, etc
Parameters
InstancePtris the XCsi instance to operate on
HandlerTypeis the type of call back to be registered.
CallbackFuncis the pointer to a call back function which is called when a particular event occurs.
CallbackRefis a void pointer to data to be referenced to by the CallBackFunc
Returns
  • XST_SUCCESS when handler is installed.
  • XST_INVALID_PARAM when HandlerType is invalid.
Note
Invoking this function for a handler that already has been installed replaces it with the new handler.

References XCsiSs::CsiPtr, and XCsiSs::IsReady.

Referenced by CsiSs_IntrExample().

void XCsiSs_SetVCSelection ( XCsiSs InstancePtr,
u16  Value 
)

This function will control the virtual channels selection dynamically.

Set the virtual channel selection.

Parameters
InstancePtris a pointer to the Subsystem instance to be worked on.
Valuewill set the virtual channels corresponding to each bit value.
Returns
None.
Note
In order to use dynamic VC selection, 'Allowed VC to all' must be selected in IP Configuration.

This function sets the virtual channel selection.

Parameters
InstancePtris a pointer to the XCsiSs instance.
Valueis the virtual channel selection value to be set.
Returns
None.
Note
None.

References XCsiSs::Config, XCsiSs::CsiPtr, XCsiSs_Config::EnableVCx, and XCsiSs_Config::VcNo.

Variable Documentation

XCsiSs_SubCores CsiSsSubCores[XPAR_XMIPICSISS_NUM_INSTANCES]

Driver instance array of all sub-cores included in the design.

This array holds the driver instances for all MIPI CSI Rx Subsystem instances in the system.

XCsiSs_Config XCsiSs_ConfigTable[]

MIPI CSI Rx Subsystem configuration table (SDT)

This table contains configuration information for each MIPI CSI Rx Subsystem instance in the system when using System Device Tree (SDT). Each entry describes the hardware configuration for a specific instance including sub-core presence and parameters.

XCsiSs_Config XCsiSs_ConfigTable[]

MIPI CSI Rx Subsystem configuration table (SDT)

This table contains configuration information for each MIPI CSI Rx Subsystem instance in the system when using System Device Tree (SDT). Each entry describes the hardware configuration for a specific instance including sub-core presence and parameters.