csi
Xilinx SDK Drivers API Documentation
csi Documentation

This file contains the implementation of the MIPI CSI2 RX Controller driver.User documentation for the driver functions is contained in this file in the form of comment blocks at the front of each function.

Core Features

The CSI2 Rx Controller currently supports the MIPI?Alliance Specification for Camera Serial Interface 2 (CSI-2) Version 1.1 ? 18 July 2012 with D-PHY v1.2.

There is a provision for multi-lane support for upto 4 lanes for receiving data upto 1.5 Gbps per lane. It supports both short and long packets. Most of the primary and secondary formats of images are supported along with interleaving of data at packet or frame level for upto 4 virtual channels in the stream. The IP has capability to detect Start of Transmission, CRC, ECC, etc type of errors and report them via interrupts.

The IP is programmable when the core is disabled or when the soft reset bit has been set and the reset-in-progress is reset.

The programmable parameters are the number of active lane counts, global interrupt enable and interrupt masks for variety of events to be detected.

Software Initialization & Configuration

The application needs to do following steps in order for preparing the MIPI CSI2 Rx core to be ready to receive stream

  • Call XCsi_LookupConfig using a device ID to find the core configuration.
  • Call XCsi_CfgInitialize to initialize the device and the driver instance associated with it.
  • Call XCsi_Configure to set the Active Lanes
  • Register callback functions for interrupts
  • Enable interrupts
  • Call XCsi_Activate to activate the core

Interrupts

There are certain events for which interrupts are received if unmasked like

  • Frame received
  • Incorrect Lane Configuration
  • Short Packet FIFO Full or Not Empty
  • Stream Line Buffer Full
  • Stop State
  • Start of Transmission (Sync) Errors
  • CRC and ECC errors
  • Invalid Data ID
  • Frame Sync and Level Errors for Virtual Channels

Virtual Memory

This driver supports Virtual Memory. The RTOS is responsible for calculating the correct device base address in Virtual Memory space.

Threads

This driver is not thread safe. Any needs for threads or thread mutual exclusion must be satisfied by the layer above this driver.

Asserts

Asserts are used within all Xilinx drivers to enforce constraints on argument values. Asserts can be turned off on a system-wide basis by defining, at compile time, the NDEBUG identifier. By default, asserts are turned on and it is recommended that application developers leave asserts on during development.

MODIFICATION HISTORY:
Ver Who Date     Changes

1.0 vsa 06/16/15 Initial release 1.1 sss 08/17/16 Added 64 bit support ms 01/23/17 Modified xil_printf statement in main function for all examples to ensure that "Successfully ran" and "Failed" strings are available in all examples. This is a fix for CR-965028. ms 03/17/17 Added readme.txt file in examples folder for doxygen generation. ms 04/05/17 Modified Comment lines in functions of csi examples to recognize it as documentation block for doxygen generation of examples.