MCUXpresso SDK API Reference Manual  Rev. 0
NXP Semiconductors
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
CI_PI: Parallel Camera Interface

Overview

The MCUXpresso SDK provides a peripheral driver for the CI_PI module of MCUXpresso SDK devices.

The CI_PI module receives the camera input frame, so it should work together with ISI.

Enumerations

enum  _ci_pi_flags {
  kCI_PI_ChangeOfFieldFlag = CI_PI_CSR_CSI_STATUS_FIELD_TOGGLE_MASK,
  kCI_PI_EccErrorFlag = CI_PI_CSR_CSI_STATUS_ECC_ERROR_MASK
}
 CI_PI status flags. More...
 
enum  ci_pi_input_format_t {
  kCI_PI_InputUYVY8888_8BitBus = 0x0,
  kCI_PI_InputUYVY10101010_10BitBus = 0x1,
  kCI_PI_InputRGB888_8BitBus = 0x2,
  kCI_PI_InputBGR888_8BitBus = 0x3,
  kCI_PI_InputRGB888_24BitBus = 0x4,
  kCI_PI_InputYVYU8888_8BitBus = 0x5,
  kCI_PI_InputYUV888_8BitBus = 0x6,
  kCI_PI_InputYVYU8888_16BitBus = 0x7,
  kCI_PI_InputYUV888_24BitBus = 0x8,
  kCI_PI_InputBayer8_8BitBus = 0x9,
  kCI_PI_InputBayer10_10BitBus = 0xa,
  kCI_PI_InputBayer12_12BitBus = 0xb,
  kCI_PI_InputBayer16_16BitBus = 0xc
}
 Input data format. More...
 
enum  _ci_pi_polarity_flags {
  kCI_PI_HsyncActiveLow = 0U,
  kCI_PI_HsyncActiveHigh = CI_PI_CSR_CSI_CTRL_REG_HSYNC_POL_MASK,
  kCI_PI_DataLatchOnRisingEdge = 0,
  kCI_PI_DataLatchOnFallingEdge,
  kCI_PI_DataEnableActiveHigh = 0U,
  kCI_PI_DataEnableActiveLow = CI_PI_CSR_CSI_CTRL_REG_DE_POL_MASK,
  kCI_PI_VsyncActiveHigh = CI_PI_CSR_CSI_CTRL_REG_VSYNC_POL_MASK,
  kCI_PI_VsyncActiveLow = 0
}
 CI_PI signal polarity. More...
 
enum  ci_pi_work_mode_t {
  kCI_PI_GatedClockMode = CI_PI_CSR_CSI_CTRL_REG_GCLK_MODE_EN_MASK,
  kCI_PI_GatedClockDataEnableMode,
  kCI_PI_NonGatedClockMode = 0U,
  kCI_PI_CCIR656ProgressiveMode = CI_PI_CSR_CSI_CTRL_REG_CCIR_EN_MASK
}
 CI_PI work mode. More...
 

Functions

void CI_PI_Init (CI_PI_CSR_Type *base, const ci_pi_config_t *config)
 Enables and configures the CI_PI peripheral module. More...
 
void CI_PI_Deinit (CI_PI_CSR_Type *base)
 Disables the CI_PI peripheral module. More...
 
void CI_PI_GetDefaultConfig (ci_pi_config_t *config)
 Get the default configuration to initialize CI_PI. More...
 
static void CI_PI_Reset (CI_PI_CSR_Type *base)
 Resets the CI_PI peripheral module. More...
 
void CI_PI_Start (CI_PI_CSR_Type *base)
 Starts the CI_PI peripheral module to output captured frame. More...
 
void CI_PI_Stop (CI_PI_CSR_Type *base)
 Stops the CI_PI peripheral module. More...
 
static uint32_t CI_PI_GetStatus (CI_PI_CSR_Type *base)
 Gets the CI_PI peripheral module status. More...
 

Driver version

#define FSL_CI_PI_DRIVER_VERSION   (MAKE_VERSION(2, 0, 2))
 CI_PI driver version. More...
 

Macro Definition Documentation

#define FSL_CI_PI_DRIVER_VERSION   (MAKE_VERSION(2, 0, 2))

Enumeration Type Documentation

Enumerator
kCI_PI_ChangeOfFieldFlag 

Change of field.

kCI_PI_EccErrorFlag 

ECC error detected.

Enumerator
kCI_PI_InputUYVY8888_8BitBus 

UYVY, every component is 8bit, data bus is 8bit.

kCI_PI_InputUYVY10101010_10BitBus 

UYVY, every component is 10bit, data bus is 10bit.

kCI_PI_InputRGB888_8BitBus 

RGB, every component is 8bit, data bus is 8bit.

kCI_PI_InputBGR888_8BitBus 

BGR, every component is 8bit, data bus is 8bit.

kCI_PI_InputRGB888_24BitBus 

RGB, every component is 8bit, data bus is 24 bit.

kCI_PI_InputYVYU8888_8BitBus 

YVYU, every component is 8bit, data bus is 8bit.

kCI_PI_InputYUV888_8BitBus 

YUV, every component is 8bit, data bus is 8bit.

kCI_PI_InputYVYU8888_16BitBus 

YVYU, every component is 8bit, data bus 16bit.

kCI_PI_InputYUV888_24BitBus 

YUV, every component is 8bit, data bus is 24bit.

kCI_PI_InputBayer8_8BitBus 

Bayer 8bit.

kCI_PI_InputBayer10_10BitBus 

Bayer 10bit.

kCI_PI_InputBayer12_12BitBus 

Bayer 12bit.

kCI_PI_InputBayer16_16BitBus 

Bayer 16bit.

Enumerator
kCI_PI_HsyncActiveLow 

HSYNC is active low.

kCI_PI_HsyncActiveHigh 

HSYNC is active high.

kCI_PI_DataLatchOnRisingEdge 

Pixel data latched at rising edge of pixel clock.

kCI_PI_DataLatchOnFallingEdge 

Pixel data latched at falling edge of pixel clock.

kCI_PI_DataEnableActiveHigh 

Data enable signal (DE) is active high.

kCI_PI_DataEnableActiveLow 

Data enable signal (DE) is active low.

kCI_PI_VsyncActiveHigh 

VSYNC is active high.

kCI_PI_VsyncActiveLow 

VSYNC is active low.

The CCIR656 interlace mode is not supported currently.

Enumerator
kCI_PI_GatedClockMode 

HSYNC, VSYNC, and PIXCLK signals are used.

kCI_PI_GatedClockDataEnableMode 

DE, VSYNC, and PIXCLK signals are used.

kCI_PI_NonGatedClockMode 

VSYNC, and PIXCLK signals are used.

kCI_PI_CCIR656ProgressiveMode 

CCIR656 progressive mode.

Function Documentation

void CI_PI_Init ( CI_PI_CSR_Type *  base,
const ci_pi_config_t *  config 
)
Parameters
baseCI_PI peripheral address.
configCI_PI module configuration structure.
void CI_PI_Deinit ( CI_PI_CSR_Type *  base)
Parameters
baseCI_PI peripheral address.
void CI_PI_GetDefaultConfig ( ci_pi_config_t *  config)

The default configuration value is:

config->width = 0;
config->vsyncWidth = 3U;
config->hsyncWidth = 2U;
config->polarityFlags = 0;
config->pixelLinkAddr = 0;
config->inputFormat = kCI_PI_InputUYVY8888_8BitBus;
config->workMode = kCI_PI_NonGatedClockMode;
config->useExtVsync = false;
config->swapUV = false;
Parameters
configPointer to the configuration.
static void CI_PI_Reset ( CI_PI_CSR_Type *  base)
inlinestatic
Parameters
baseCI_PI peripheral address.
void CI_PI_Start ( CI_PI_CSR_Type *  base)
Parameters
baseCI_PI peripheral address.
void CI_PI_Stop ( CI_PI_CSR_Type *  base)
Parameters
baseCI_PI peripheral address.
static uint32_t CI_PI_GetStatus ( CI_PI_CSR_Type *  base)
inlinestatic
Parameters
baseCI_PI peripheral address.
Returns
Status returned as the OR'ed value of _ci_pi_flags.