![]() |
mipicsiss
Vitis Drivers API Documentation
|
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_Config * | XCsiSs_LookupConfig (u32 DeviceId) |
| This function looks for the device configuration based on the unique device ID. More... | |
| u32 | XCsiSs_SelfTest (XCsiSs *InstancePtr) |
| This function performs self test on MIPI CSI Rx Subsystem sub-cores. More... | |
| void | XCsiSs_IntrHandler (void *InstancePtr) |
| This function is the interrupt handler for the MIPI CSI Rx Subsystem. More... | |
| void | XCsiSs_IntrDisable (XCsiSs *InstancePtr, u32 IntrMask) |
| This function is used to disable the interrupts in the CSI core. More... | |
| u32 | XCsiSs_SetCallBack (XCsiSs *InstancePtr, u32 HandlerType, void *CallbackFunc, void *CallbackRef) |
| This routine installs an asynchronous callback function for the given HandlerType: 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... | |
| #define XCSISS_H_ |
Prevent circular inclusions by using protection macros.
| #define XCSISS_HANDLER_DPHY XCSI_HANDLER_DPHY |
D-PHY handler.
Referenced by CsiSs_IntrExample(), and CsiSs_SetupIntrSystem().
| #define XCSISS_HANDLER_FRAMERECVD XCSI_HANDLER_FRAMERECVD |
Frame received handler.
Referenced by CsiSs_IntrExample(), and CsiSs_SetupIntrSystem().
| #define XCSISS_HANDLER_OTHERERROR XCSI_HANDLER_OTHERERROR |
Other error handler.
Referenced by CsiSs_IntrExample(), and CsiSs_SetupIntrSystem().
| #define XCSISS_HANDLER_PKTLVL XCSI_HANDLER_PKTLVL |
Packet level handler.
Referenced by CsiSs_IntrExample(), and CsiSs_SetupIntrSystem().
| #define XCSISS_HANDLER_PROTLVL XCSI_HANDLER_PROTLVL |
Protocol level handler.
Referenced by CsiSs_IntrExample(), and CsiSs_SetupIntrSystem().
| #define XCSISS_HANDLER_SHORTPACKET XCSI_HANDLER_SHORTPACKET |
Short packet handler.
Referenced by CsiSs_IntrExample(), and CsiSs_SetupIntrSystem().
| #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 void(* XCsiSs_Callback)(void *CallbackRef, u32 Mask) |
Callback type which acts as a wrapper on top of CSI Callback.
| CallbackRef | is 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. |
| Mask | is 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. |
| u32 XCsiSs_Activate | ( | XCsiSs * | InstancePtr, |
| u8 | Flag | ||
| ) |
This function is used to activate the CSI Subsystem.
Internally it activates the DPHY and CSI.
| InstancePtr | is a pointer to the Subsystem instance to be worked on. |
| Flag | is used to denote whether to enable or disable the subsystem |
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.
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.
| InstancePtr | is a pointer to the Subsystem instance to be worked on. |
| CfgPtr | points to the configuration structure associated with the subsystem instance. |
| EffectiveAddr | is 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. |
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.
Refer to XCsi.h for interrupt masks.
| InstancePtr | is a pointer to the Subsystem instance to be worked on. |
| ActiveLanes | is 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. |
| IntrMask | Indicates Mask for enable interrupts. |
References XCsiSs::CsiPtr.
Referenced by CsiSs_IntrExample(), and EnableCSI().
| void XCsiSs_GetLaneInfo | ( | XCsiSs * | InstancePtr | ) |
This function gets the clk and data lane info.
| InstancePtr | is a pointer to the Subsystem instance to be worked on. |
References XCsiSs::ClkInfo, XCsiSs::Config, XCsiSs::CsiPtr, XCsiSs::DLInfo, and XCsiSs_Config::LanesPresent.
| void XCsiSs_GetShortPacket | ( | XCsiSs * | InstancePtr | ) |
This function gets the short packets.
| InstancePtr | is a pointer to the Subsystem instance to be worked on. |
References XCsiSs::CsiPtr, and XCsiSs::SpktData.
Referenced by CsiSs_SPktEventHandler().
| void XCsiSs_GetVCInfo | ( | XCsiSs * | InstancePtr | ) |
This function gets the virtual channel information.
| InstancePtr | is a pointer to the Subsystem instance to be worked on. |
References XCsiSs::Config, XCsiSs::CsiPtr, and XCsiSs::VCInfo.
| u32 XCsiSs_GetVCSelection | ( | XCsiSs * | InstancePtr | ) |
This function will return the virtual channels selected.
| InstancePtr | is the XCsi instance to operate on |
References XCsiSs::Config, XCsiSs::CsiPtr, and XCsiSs_Config::VcNo.
| void XCsiSs_IntrDisable | ( | XCsiSs * | InstancePtr, |
| u32 | IntrMask | ||
| ) |
This function is used to disable the interrupts in the CSI core.
| InstancePtr | is a pointer to the Subsystem instance to be worked on. |
| IntrMask | Indicates Mask for enable interrupts. |
References XCsiSs::CsiPtr, and XCSISS_ISR_ALLINTR_MASK.
| void XCsiSs_IntrHandler | ( | void * | InstancePtr | ) |
This function is the interrupt handler for the MIPI CSI Rx Subsystem.
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.
| InstancePtr | is a pointer to the XCsiSs core instance that just interrupted. |
References XCsiSs::CsiPtr.
Referenced by CsiSs_IntrExample(), CsiSs_SetupIntrSystem(), and main().
| XCsiSs_Config * XCsiSs_LookupConfig | ( | u32 | DeviceId | ) |
This function looks for the device configuration based on the unique device ID.
The table XCsiSs_ConfigTable[] contains the configuration information for each instance of the device in the system.
| DeviceId | is the unique device ID of the device being looked up |
Referenced by CsiSs_IntrExample(), CsiSs_SelfTestExample(), and InitializeCsiRxSs().
| void XCsiSs_ReportCoreInfo | ( | XCsiSs * | InstancePtr | ) |
This function reports list of cores included.
| InstancePtr | is a pointer to the Subsystem instance to be worked on. |
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.
Internally it resets the DPHY and CSI only as the IIC instance is separately handled by the application.
| InstancePtr | is a pointer to the Subsystem instance to be worked on. |
References XCsiSs::CsiPtr.
Referenced by CsiSs_IntrExample(), DisableCSI(), and EnableCSI().
| u32 XCsiSs_SelfTest | ( | XCsiSs * | InstancePtr | ) |
This function performs self test on MIPI CSI Rx Subsystem sub-cores.
| InstancePtr | is a pointer to the XCsiSs core instance. |
References XCsiSs::CsiPtr.
Referenced by CsiSs_SelfTestExample().
| u32 XCsiSs_SetCallBack | ( | XCsiSs * | InstancePtr, |
| u32 | HandlerType, | ||
| void * | CallbackFunc, | ||
| void * | CallbackRef | ||
| ) |
This routine installs an asynchronous callback function for the given HandlerType:
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 occured like
Stream Line Buffer Full, Incorrect Lanes, etc
| InstancePtr | is the XCsi instance to operate on |
| HandlerType | is the type of call back to be registered. |
| CallbackFunc | is the pointer to a call back funtion which is called when a particular event occurs. |
| CallbackRef | is a void pointer to data to be referenced to by the CallBackFunc |
References XCsiSs::CsiPtr, and XCsiSs::IsReady.
Referenced by CsiSs_IntrExample(), and CsiSs_SetupIntrSystem().
| void XCsiSs_SetVCSelection | ( | XCsiSs * | InstancePtr, |
| u16 | Value | ||
| ) |
This function will control the virtual channels selection dynamically.
| InstancePtr | is the XCsi instance to operate on |
| Value | will set the virtual channels corresponding to each bit value. |
References XCsiSs::Config, XCsiSs::CsiPtr, and XCsiSs_Config::VcNo.