mipicsiss
Vitis Drivers API Documentation
|
This file contains a design example using the XCsiSs driver with interrupts.
On receiving a frame received interrupt, it will print frames received count. On receiving a short packet FIFO not empty interrupt, it will print the contents of the short packet received. On receiving DPHY, protocol or Packet level error, it will print the same On receiving any type of error interrupt the sub-system will reset
For this example to display output, the user need to implement initialization of the system (CsiSs_PlatformInit) and after MIPI CSI Rx subsystem start (XCsiSs_Start) is complete, implement configuration of the video stream source in order to provide the MIPI CSI Rx Subsystem HIP input. The functions CsiSs_PlatformInit and CsiSs_StreamSrc are declared and are left up to the user implement.
MODIFICATION HISTORY:
Ver Who Date Changes
1.0 vsa 07/21/15 Initial release 1.1 ms 01/23/17 Modified xil_printf statement in main function to ensure that "Successfully ran" and "Failed" strings are available in all examples. This is a fix for CR-965028. 1.2 vsa 03/02/17 Added Word Count corruption interrupt
Functions | |
u32 | CsiSs_IntrExample (u32 DeviceId) |
This function is the main entry point for the interrupt example using the XCsiSs driver. More... | |
u32 | CsiSs_PlatformInit (void) |
This function initialize required platform-specifc peripherals. More... | |
u32 | CsiSs_CciInit (void) |
This function initialize required IIC instance to configure and control the camera. More... | |
u32 | CsiSs_CciSetupIntrSystem (void) |
This function setup interrupts of the IIC instance if used for the MIPI CSI Rx Subsystem. More... | |
u32 | CsiSs_SetupIntrSystem (void) |
This function sets up the interrupt system so interrupts can occur for the MIPI CSI Rx Subsystem core. More... | |
void | CsiSs_DphyEventHandler (void *InstancePtr, u32 Mask) |
This function is called when a DPHY level error event is received by the MIPI CSI Rx Subsystem core. More... | |
void | CsiSs_PktLvlEventHandler (void *InstancePtr, u32 Mask) |
This function is called when a Packet level error event is received by the MIPI CSI Rx Subsystem core. More... | |
void | CsiSs_ProtLvlEventHandler (void *InstancePtr, u32 Mask) |
This function is called when a Protocol decoding level error event is received by the MIPI CSI Rx Subsystem core. More... | |
void | CsiSs_SPktEventHandler (void *InstancePtr, u32 Mask) |
This function is called when a Short Packet FIFO event is received by the MIPI CSI Rx Subsystem core. More... | |
void | CsiSs_ErrEventHandler (void *InstancePtr, u32 Mask) |
This function is called when a Other errors event is received by the MIPI CSI Rx Subsystem core. More... | |
void | CsiSs_FrameRcvdEventHandler (void *InstancePtr, u32 Mask) |
This function is called when a Frame is received by the MIPI CSI Rx Subsystem core. More... | |
void | Delay (u32 Seconds) |
For Microblaze we use an assembly loop that is roughly the same regardless of optimization level, although caches and memory access time can make the delay vary. More... | |
int | main () |
This is the main function for XCsiSs interrupt example. More... | |
u32 CsiSs_CciInit | ( | void | ) |
This function initialize required IIC instance to configure and control the camera.
None. |
Referenced by CsiSs_IntrExample().
u32 CsiSs_CciSetupIntrSystem | ( | void | ) |
This function setup interrupts of the IIC instance if used for the MIPI CSI Rx Subsystem.
None |
Referenced by CsiSs_SetupIntrSystem().
void CsiSs_DphyEventHandler | ( | void * | InstancePtr, |
u32 | Mask | ||
) |
This function is called when a DPHY level error event is received by the MIPI CSI Rx Subsystem core.
InstancePtr | is a pointer to the XCsiSs instance. |
Mask | of interrupt which caused this event |
Referenced by CsiSs_SetupIntrSystem().
void CsiSs_ErrEventHandler | ( | void * | InstancePtr, |
u32 | Mask | ||
) |
This function is called when a Other errors event is received by the MIPI CSI Rx Subsystem core.
InstancePtr | is a pointer to the XCsiSs instance. |
Mask | of interrupt which caused this event |
Referenced by CsiSs_SetupIntrSystem().
void CsiSs_FrameRcvdEventHandler | ( | void * | InstancePtr, |
u32 | Mask | ||
) |
This function is called when a Frame is received by the MIPI CSI Rx Subsystem core.
InstancePtr | is a pointer to the XCsiSs instance. |
Mask | of interrupt which caused this event |
Referenced by CsiSs_SetupIntrSystem().
u32 CsiSs_IntrExample | ( | u32 | DeviceId | ) |
This function is the main entry point for the interrupt example using the XCsiSs driver.
This function will set up the system with interrupts handlers.
DeviceId | is the unique device ID of the MIPI CSI Rx Subsystem core. |
References XCsiSs_Config::BaseAddr, CsiSs_CciInit(), CsiSs_PlatformInit(), CsiSs_SetupIntrSystem(), Delay(), XCsiSs_Activate(), XCsiSs_CfgInitialize(), XCsiSs_Configure(), XCsiSs_LookupConfig(), XCsiSs_ReportCoreInfo(), and XCsiSs_Reset().
Referenced by main().
void CsiSs_PktLvlEventHandler | ( | void * | InstancePtr, |
u32 | Mask | ||
) |
This function is called when a Packet level error event is received by the MIPI CSI Rx Subsystem core.
InstancePtr | is a pointer to the XCsiSs instance. |
Mask | of interrupt which caused this event |
Referenced by CsiSs_SetupIntrSystem().
u32 CsiSs_PlatformInit | ( | void | ) |
This function initialize required platform-specifc peripherals.
None. |
Referenced by CsiSs_IntrExample().
void CsiSs_ProtLvlEventHandler | ( | void * | InstancePtr, |
u32 | Mask | ||
) |
This function is called when a Protocol decoding level error event is received by the MIPI CSI Rx Subsystem core.
InstancePtr | is a pointer to the XCsiSs instance. |
Mask | of interrupt which caused this event |
Referenced by CsiSs_SetupIntrSystem().
u32 CsiSs_SetupIntrSystem | ( | void | ) |
This function sets up the interrupt system so interrupts can occur for the MIPI CSI Rx Subsystem core.
The function is application-specific since the actual system may or may not have an interrupt controller. The MIPI CSI Subsystem core could be directly connected to a processor without an interrupt controller. The user should modify this function to fit the application.
None |
References CsiSs_CciSetupIntrSystem(), CsiSs_DphyEventHandler(), CsiSs_ErrEventHandler(), CsiSs_FrameRcvdEventHandler(), CsiSs_PktLvlEventHandler(), CsiSs_ProtLvlEventHandler(), CsiSs_SPktEventHandler(), XCsiSs_IntrHandler(), and XCsiSs_SetCallBack().
Referenced by CsiSs_IntrExample().
void CsiSs_SPktEventHandler | ( | void * | InstancePtr, |
u32 | Mask | ||
) |
This function is called when a Short Packet FIFO event is received by the MIPI CSI Rx Subsystem core.
InstancePtr | is a pointer to the XCsiSs instance. |
Mask | of interrupt which caused this event |
References XCsiSs::SpktData, and XCsiSs_GetShortPacket().
Referenced by CsiSs_SetupIntrSystem().
void Delay | ( | u32 | Seconds | ) |
For Microblaze we use an assembly loop that is roughly the same regardless of optimization level, although caches and memory access time can make the delay vary.
Just keep in mind that after resetting or updating the PHY modes, the PHY typically needs time to recover.
Number | of seconds to sleep |
Referenced by CsiSs_IntrExample().
int main | ( | void | ) |
This is the main function for XCsiSs interrupt example.
If the CsiSs_IntrExample function which sets up the system succeeds, this function will wait for the interrupts. Once a connection event or pulse is detected, CsiSs will RX device capabilities and re-start the subsystem.
None. |
References CsiSs_IntrExample().