4.6. CSIRX

4.6.1. Introduction

CSI (Camera Serial Interface) module allows device to stream video inputs from one or more cameras. CSIRX has four streams:

  • one capture stream

  • one loopback stream

  • two OTF streams

  • If capture stream is enabled, video input from camera modules are captured and stored in DRAM location provided by the application.

  • If loopback stream is enabled, video input from camera modules are redirected to CSITX.

  • If OTF streams are enabled, video input is redirected to video accelerator.

Note

CSIRX driver supports only capture and loopback streams. OTF is not yet enabled.

Note

CSIRX RTOS driver is not supported on AM68 and AM69 devices.

4.6.2. User Interface

For details about individual fields of this library structure, see the PDK doxygen documentation

4.6.2.1. APIs

CSIRX driver APIs are integrated with FVID2 interface. Hence application writer can directly use FVID2 APIs to create & delete the driver instance, Start and stop a particular stream etc.

For reference, here are the top-level driver APIs for CSIRX

#include <ti/drv/csirx/csirx.h>

4.6.3. Application

4.6.3.1. Examples

Name
Description
Expected Results
CSIRX capture application
Example demonstrating capture of RAW12 frames from camera sensors and store them in DRAM. Reference example for developers
Application shows FPS for each channel and total frames captured. Also shows how many number of error events has occurred
CSIRX Unit test application
Example verifies various configurat ion to CSIRX driver. such as different data types and no of DPHY lanes etc
Application shows FPS for each channel and total frames captured
CSIRX to CSITX loopback application
Example demonstrates CSIRX to CSITX loopback stream. RAW12 frames are captured and through loopback stream, CSITX transmits the received frames
Application shows number of frames transmitted by CSITX per one second on CCS console.

4.6.3.2. CSIRX examples

Description

CSIRX examples require a hardware setup (details discussed as part of Test setup) The example application captures frames from camera module in real-time and store those frames in a DRAM location mentioned in the application. It also shows the number of frames captured and error frames information on the console output.

Running the Capture examples

Test Setup:

For applications that use only single channel, pattern generator sequence is enabled. With this, the De-serializer in Fusion-1 board will generate color bar patterns for the desired data type. this eliminates the need of camera modules.

so, for applications that use Pattern generator:

  • Make sure to connect Fusion-1/Fusion-2 board to the EVM through CSI expansion connector(J52)

for applications that do not use Pattern generator:

  • Make sure to connect Fusion-1/Fusion-2 board to the EVM through CSI expansion connector(J52)

  • Connect camera modules (D3_IMX390_CM/D3_IMX390_RCM) to the Fusion-1/Fusion-2 board

Note

To use input from camera module for single-channel tests without pattern generator, disable the UB960_USE_PATTERN_GENERATOR flag in the application.

CCS connection:

  • Load the System firmware as specified in SCICLIENT documentation

  • Load the generated executable file in CCS

  • Run the application.