50. CSI-2 Host (CSI)

50.1 Introduction

The camera serial interface 2 (CSI-2) is a part of a group of communication protocols defined by the MIPI® Alliance. The MIPI® CSI-2 Host controller is a digital core that implements all protocol functions defined in the MIPI® CSI-2 specification.

It provides an interface between the system and the MIPI® D-PHY, allowing communication with a CSI-2 compliant camera.

50.2 Standard and references

50.3 Glossary

Table 485. Glossary of terms

TermDefinition
D-PHY_RXD-PHY physical layer receiver
EOFEnd of frame
EOTEnd of transmission
ESCEscape mode for the D-PHY_RX
HSHigh speed
ISBImaging system bus
LLPLow-level protocol
LPLow power
PHYPhysical layer
PPIPhy protocol interface
RXReceiver
SOFStart of frame
SOTStart of transmission

50.4 CSI-2 Host main features

50.5 CSI-2 Host functional description

50.5.1 General description

The MIPI CSI-2 Host controller offers a means to connect cameras to capture and dispatch a robust header with ECC correction and data payload with checksum.

A D-PHY_RX receiver fills out the role of interfacing the external serial camera devices with the embedded CSI-2 Host controller:

The CSI-2 Host-controller register bank is configured and accessed by the APB bus interface.

A block diagram of the CSI-2 Host is shown in the figure below.

Figure 442. CSI-2 Host block diagram

Block diagram of the CSI-2 Host showing internal components and external interfaces.

The diagram illustrates the CSI-2 Host architecture. On the left, external signals DL1P, DL1N, DL0P, DL0N, CLKP, and CLKN are connected to a D-PHY receiver (D-PHY_RX). The D-PHY receiver is linked via a PPI interface to the CSI-2 Host block. Inside the CSI-2 Host, the APB bus connects to a Register bank. The Register bank provides control to three main functional blocks: a Lane merger (containing a FIFO), a Clock changer (containing a FIFO), and a Low-level protocol decoder (LLP) (containing a FIFO). Data flows from the Lane merger to the Clock changer, and then to the LLP. The LLP outputs an ISB-Byte header. Below these blocks are the D-PHY interface, Error management, and Programmable interrupt controller. Bidirectional data paths connect the Lane merger, Clock changer, and LLP to the D-PHY interface and Error management. The Programmable interrupt controller is connected to the LLP and the Error management block.

Block diagram of the CSI-2 Host showing internal components and external interfaces.

MSv53041V1.

50.5.2 System level architecture

The figure below shows the CSI-2 Host architecture.

Figure 443. CSI-2 Host architecture

Block diagram of the CSI-2 Host architecture. The diagram shows the D-PHY receiver (D-PHY_RX) on the left, connected to external signals DL1P, DL1N, DL0P, DL0N, CLKP, and CLKN. It is connected via a PPI interface to the CSI-2 Host block. Inside the CSI-2 Host block, the data path consists of a Lane merger, a Clock changer, and a Low-level protocol decoder (LLP). The LLP outputs an ISB-Byte header to the DCMIPP block. The CSI-2 Host also contains a D-PHY interface, a Register bank, Error management, and a Programmable interrupt controller. The D-PHY interface is connected to the D-PHY receiver. The diagram is labeled MSv53042V1.
graph LR
    subgraph D_PHY_RX [D-PHY receiver (D-PHY_RX)]
        DL1P[DL1P]
        DL1N[DL1N]
        DL0P[DL0P]
        DL0N[DL0N]
        CLKP[CLKP]
        CLKN[CLKN]
    end

    subgraph CSI2_HOST [CSI-2 Host]
        PPI[PPI]
        LaneMerger[Lane merger]
        ClockChanger[Clock changer]
        LLP[Low-level protocol decoder (LLP)]
        DPHYInterface[D-PHY interface]
        RegisterBank[Register bank]
        ErrorManagement[Error management]
        PIC[Programmable interrupt controller]
        
        PPI --> LaneMerger
        LaneMerger --> ClockChanger
        ClockChanger --> LLP
        LLP --> ISBByteHeader[ISB-Byte header]
        DPHYInterface --> PPI
    end

    ISBByteHeader --> DCMIPP[DCMIPP]
  
Block diagram of the CSI-2 Host architecture. The diagram shows the D-PHY receiver (D-PHY_RX) on the left, connected to external signals DL1P, DL1N, DL0P, DL0N, CLKP, and CLKN. It is connected via a PPI interface to the CSI-2 Host block. Inside the CSI-2 Host block, the data path consists of a Lane merger, a Clock changer, and a Low-level protocol decoder (LLP). The LLP outputs an ISB-Byte header to the DCMIPP block. The CSI-2 Host also contains a D-PHY interface, a Register bank, Error management, and a Programmable interrupt controller. The D-PHY interface is connected to the D-PHY receiver. The diagram is labeled MSv53042V1.

The blocks shown have the following functions:

50.5.3 CSI-2 Host reset and clocks

There are two reset sources:

There are three clocks to serve the CSI-2 Host controller (see Figure 444):

Figure 444. CSI-2 Host clock domain

Block diagram of the CSI-2 Host clock domain showing three clock domains: clk_byte, clk_proc, and APB. The clk_byte domain contains DATA lane resynchronization and Lane merger blocks. The clk_proc domain contains Clock changer and LLP decoder blocks. The APB clock domain contains a Register bank. Data flows from 8b input through the first two blocks to 32b output through the last two blocks, then to DCMIPP ISB-Byte header.

The diagram illustrates the CSI-2 Host clock domain architecture. It is divided into three main clock domains: clk_byte domain, clk_proc domain, and APB clock domain.

MSv53480V1

Block diagram of the CSI-2 Host clock domain showing three clock domains: clk_byte, clk_proc, and APB. The clk_byte domain contains DATA lane resynchronization and Lane merger blocks. The clk_proc domain contains Clock changer and LLP decoder blocks. The APB clock domain contains a Register bank. Data flows from 8b input through the first two blocks to 32b output through the last two blocks, then to DCMIPP ISB-Byte header.

The D-PHY_RX supports up to 2.5 Gbit/s per data lane: the maximum frequency on the D-PHY_RX clock is 2.5 Gbits / 8 to output a byte = 312 MHz.

50.5.4 Lane merger

Applications requiring more bandwidth than the one provided by a single data lane may expand the data path to more lanes in order to increase the attainable data rate. The lane merger supports then up to two data lanes.

The lane merger module converts the D-PHY_RX PPI protocol into a byte-oriented bus to be sent to the LLP.

The lane merger parallelizes the bytes to 32 bits in parallel to build a 32-bit output as shown in the figures below. The cycle number does not account for module internal latency.

Figure 445. Lane merger input and output (one data lane)

Diagram showing lane merger input and output for one data lane.

Lane merger input (one data lane)

DL0DL1
Cycle 7Byte 7
Cycle 6Byte 6
Cycle 5Byte 5
Cycle 4Byte 4
Cycle 3Byte 3
Cycle 2Byte 2
Cycle 1Byte 1
Cycle 0Byte 0

Lane merger output (one data lane)

Cycle 7Byte 7Byte 6Byte 5Byte 4
Cycle 6Invalid
Cycle 5Invalid
Cycle 4Invalid
Cycle 3Byte 3Byte 2Byte 1Byte 0
Cycle 2Invalid
Cycle 1Invalid
Cycle 0Invalid

31 0

MSv53045V1

Diagram showing lane merger input and output for one data lane.

Figure 446. Lane merger input and output (two data lanes)

Diagram showing lane merger input and output for two data lanes.

Lane merger input (two data lanes)

DL0DL1
Cycle 3Byte 6Byte 7
Cycle 2Byte 4Byte 5
Cycle 1Byte 2Byte 3
Cycle 0Byte 0Byte 1

Lane merger output (two data lanes)

Cycle 3Byte 7Byte 6Byte 5Byte 4
Cycle 2Invalid
Cycle 1Byte 3Byte 2Byte 1Byte 0
Cycle 0Invalid

31 0

MSv53046V1

Diagram showing lane merger input and output for two data lanes.

LANENB[2:0] in CSI_LMCFGR configures the number of data lanes used in the application. The software needs to map the physical data lanes input to the lane merger logical data lanes, using DL0MAP[2:0] and DL1MAP[2:0] as shown in the figure below.

Figure 447. Data lane mapping

Block diagram showing data lane mapping with physical data lanes 0 and 1 connected through multiplexers controlled by DL0MAP[2:0] and DL1MAP[2:0] to logical data lanes 0 and 1 into the Lane merger.

Physical data lane 0

Physical data lane 1

DL0MAP[2:0]

DL1MAP[2:0]

Logical data lane 0

Logical data lane 1

Lane merger

MSv53047V1

Block diagram showing data lane mapping with physical data lanes 0 and 1 connected through multiplexers controlled by DL0MAP[2:0] and DL1MAP[2:0] to logical data lanes 0 and 1 into the Lane merger.

50.5.5 Clock changer

The clock changer module changes the clock frequency from the input clock domain linked to the D-PHY_RX PPI protocol, to the output clock domain based on clk_proc clock domain (reference clock for the LLP).

An integrated FIFO receives data from the input clock domain and realigns it to the output clock domain.

50.5.6 Low-level protocol (LLP)

The LLP module retrieves the raw data from the lane merger, and decodes the data flow respect to the CSI-2 low-level protocol. The software selects which data in the data interleaving flow need to be sent to the DCMIPP without being filtered out. The LLP is compliant with the MIPI CSI-2 specification as described in Section 50.2.

A data integrity check is done thanks to an ECC code for packet header error correction, and a 16-bit CRC checksum code for payload error detection. All these errors are flagged into specific registers, and may trig interruption for specific software action needs (see Section 50.8 for more details).

Figure 448. Low-level protocol overview

Diagram of the Low-level protocol overview showing the sequence of packets: LPS, SOT, SP, EOT, LPS, SOT, PH, DATA, PF, EOT, LPS, SOT, PH, DATA, PF, EOT, LPS. The diagram illustrates the structure of a CSI-2 frame, starting with a Low-Power State (LPS), followed by a Start of Transmission (SOT), a Short Packet (SP), and an End of Transmission (EOT). This is followed by another LPS, then a SOT, a Packet Header (PH), a DATA payload, a Packet Footer (PF), and an EOT. The sequence repeats with another LPS, SOT, PH, DATA, PF, EOT, and ends with an LPS. A legend below the diagram defines the abbreviations: LPS: low-power state, SOT: start of transmission, EOT: end of transmission, PH: packet header, PF: packet footer. The diagram is labeled MSv53048V1 in the bottom right corner.
Diagram of the Low-level protocol overview showing the sequence of packets: LPS, SOT, SP, EOT, LPS, SOT, PH, DATA, PF, EOT, LPS, SOT, PH, DATA, PF, EOT, LPS. The diagram illustrates the structure of a CSI-2 frame, starting with a Low-Power State (LPS), followed by a Start of Transmission (SOT), a Short Packet (SP), and an End of Transmission (EOT). This is followed by another LPS, then a SOT, a Packet Header (PH), a DATA payload, a Packet Footer (PF), and an EOT. The sequence repeats with another LPS, SOT, PH, DATA, PF, EOT, and ends with an LPS. A legend below the diagram defines the abbreviations: LPS: low-power state, SOT: start of transmission, EOT: end of transmission, PH: packet header, PF: packet footer. The diagram is labeled MSv53048V1 in the bottom right corner.

The CSI-2 low-level protocol is mainly composed by short and long packets, each of them having a well identified role.

Long packet

The long packet format is presented in Figure 449. It contains a data ID that is composed of a virtual channel number for which the data packets are attached, and the corresponding data type. The LLP module filters data out by configuring CSI_VCxCFGRy registers (x = 0 to 3, y = 1 to 4), and VCxSTART/VCxSTOP bits in CSI_CR register.

The word-count field allows the LLP to determine the data-payload width before detecting the packet footer and the EOT. This information is used to detect shorter-than-expected packets, and to trigger a corresponding error (refer to Section 50.8).

The ECC corrects a single erroneous bit in the packet header in the case of data corruption. An error is raised if there are two errors in total (the LLP decoder immediately stops the current frame), because only one bit can be corrected.

The packet data corresponds to the data payload for a given virtual channel and for an identified data type.

To complete the long-packet reception block, a packet footer that contains a 16-bit CRC checksum is received and compared to that which is internally calculated by the LLP, to check the data integrity of the received data payload.

Figure 449. CSI2- long-packet structure for a D-PHY physical layer

Diagram of CSI2 long-packet structure for a D-PHY physical layer. The top part shows a high-level view: a 32-bit Packet header (PH), Packet data (Length = word count (WC) * data word Width (8 bits)), and a 16-bit packet footer (PF). The bottom part shows a detailed view of the packet header and data words. The header consists of Data ID, Word count (WC), and ECC. The data words are Data 0, Data 1, Data 2, Data 3, ..., Data WC-4, Data WC-3, Data WC-2, Data WC-1, and a 16-bit checksum. Annotations explain the ECC for the packet header, the 16-bit word count (WC), and the Data identifier (ID).

32-bit Packet header (PH)

Packet data :
Length = word count (WC) * data word Width (8 bits)

16-bit packet footer (PF)

Data ID

Word count (WC)

ECC

Data 0

Data 1

Data 2

Data 3

Data WC-4

Data WC-3

Data WC-2

Data WC-1

16-bit checksum

8-bit error-code correction ( ECC) for the packet header:
Allows 1-bit errors with the packet header to be corrected, and 2-bit errors to be detected.

16-bit word count (WC): LLP reads the next WC data words independent of their values. The LLP uses the WC value to determine the end-of-packet. The word count value is transmitted least significant bit first.

Data identifier (ID): contains the virtual channel identifier and the data type code, that denotes the format/content of the application specific payload data (used by the application layer).

MSv53049V1

Diagram of CSI2 long-packet structure for a D-PHY physical layer. The top part shows a high-level view: a 32-bit Packet header (PH), Packet data (Length = word count (WC) * data word Width (8 bits)), and a 16-bit packet footer (PF). The bottom part shows a detailed view of the packet header and data words. The header consists of Data ID, Word count (WC), and ECC. The data words are Data 0, Data 1, Data 2, Data 3, ..., Data WC-4, Data WC-3, Data WC-2, Data WC-1, and a 16-bit checksum. Annotations explain the ECC for the packet header, the 16-bit word count (WC), and the Data identifier (ID).

Short packet

The CSI-2 short-packet format for a D-PHY physical layer is shown in Figure 450.

It is similar to the long packet header, except that the word count field is replaced by a 16-bit data field. The ECC 8-bit code is present to secure headers having potential bit corruption.

Figure 450. Short-packet structure based on D-PHY physical layer

Diagram of CSI2 short-packet structure based on D-PHY physical layer. The diagram shows a 32-bit wide short packet structure: LPS, SOT, Data ID, 16-bit Data field, ECC, EOT, and LPS. Annotations explain the Frame start (FS)/frame end (FE), Line start (LS)/line end (LE), Generic short packet codes, and the Data ID field.

Short packet (32-bit wide)

LPS

SOT

Data ID

16-bit Data field

ECC

EOT

LPS

Frame start (FS)/frame end (FE): 16-bit frame count number
Line start (LS)/line end (LE): 16-bit logical line number
Generic short packet codes: Arbitrary 16-bit data value

The data ID contains a data type value from 0x00 to 0x0F to identify a short packet.

MSv53050V1

Diagram of CSI2 short-packet structure based on D-PHY physical layer. The diagram shows a 32-bit wide short packet structure: LPS, SOT, Data ID, 16-bit Data field, ECC, EOT, and LPS. Annotations explain the Frame start (FS)/frame end (FE), Line start (LS)/line end (LE), Generic short packet codes, and the Data ID field.

Data ID field

The 8-bit data ID field comprises 2 bits for the virtual channel number coding, and 6 bits to identify the packet data type (short or long packet), and the payload data packet format in the case of long packet reception.

The LLP filters subsequent packets depending on the user configuration indicated in the previously received data ID field (see Figure 451).

Figure 451. DATA ID structure in short or long packet format

DATA ID

7                      6 5                                                              0

Virtual channel
(VC)
Data type
(DT)

└─ Virtual channel number                                                              |

Data type classes (1)Description
0x00 to 0x07Synchronization short packet data types
0x08 to 0x0FGeneric short packet data types
0x10 to 0x17Generic long packet data types
0x18 to 0x1FYUV data
0x20 to 0x27RGB data
0x28 to 0x2FRAW data
0x30 to 0x37User defined byte-based data
0x38 to 0x3FReserved

(1) Refer to the MIPI Alliance specification for the CSI-2 to have the detail of each intermediate value not described in this table.

MSv53051V1

Data type field

The data type (DT) fields are configured by the application code to determine which data types are processed by the LLP for a given virtual channel. CSI_VCxCFGRy registers are used to configure the data types to be considered by the LLP.

Each virtual channel is managed independently, and up to seven different virtual-channel data types can be declared in parallel. All data type input to the LLP that are not defined for a given virtual channel are filtered out by the LLP module and discarded.

Data types in the video data flow are located:

Data interleaving: data-type based

In the video data flow, the transmitter can merge, on the same physical node, multi-device data transmissions having different data types. The LLP filters out these multi-device flows depending on the application configuration. A typical video data flow interleaving multiple data types is shown in Figure 452.

The application software must configure CSI_VCxCFGRy registers to enable data types for a virtual channel, and to set data-type formats to be processed. The LLP reorders the input data in a format that optimizes memory usage (see Figure 452 to Figure 460).

Figure 452. Data interleaving using data type Diagram illustrating data interleaving using data type. Sequence of packets across three rows:
Row 1: LPS, SOT, FS (Frame start), EOT, LPS, SOT, PH, Data payload (Embedded data), PF, EOT, LPS, SOT, PH, Data payload (Embedded data), PF, EOT.
Row 2: LPS, SOT, PH, YUV data (YUV image data), PF, EOT, LPS, SOT, PH, RGB data (RGB image data), PF, EOT.
Row 3: LPS, SOT, PH, RGB data (RGB image data), PF, EOT, LPS, SOT, PH, YUV data (YUV image data), PF, EOT, LPS, SOT, FE (Frame end), EOT, LPS.
Trace connections route the flow from row 1 to row 2 and row 2 to row 3. Label MSv53052V1 appears at bottom right.
Diagram illustrating data interleaving using data type. Sequence of packets across three rows: Row 1: LPS, SOT, FS (Frame start), EOT, LPS, SOT, PH, Data payload (Embedded data), PF, EOT, LPS, SOT, PH, Data payload (Embedded data), PF, EOT. Row 2: LPS, SOT, PH, YUV data (YUV image data), PF, EOT, LPS, SOT, PH, RGB data (RGB image data), PF, EOT. Row 3: LPS, SOT, PH, RGB data (RGB image data), PF, EOT, LPS, SOT, PH, YUV data (YUV image data), PF, EOT, LPS, SOT, FE (Frame end), EOT, LPS. Trace connections route the flow from row 1 to row 2 and row 2 to row 3. Label MSv53052V1 appears at bottom right.

Data interleaving: virtual channels

The data interleaving in the video data flow can also be managed by the virtual channel ID. Each external device can have a specific virtual channel identifier in order for the software layer or the DCMIPP to properly handle data packets belonging to a device.

The application code defines which of the virtual channels have to be considered by the LPP without any filtering operation. The CSI_CR register must be configured accordingly by activating the virtual channel (via VCxSTART), or by setting VCxSTOP to deactivate the virtual channel.

The virtual channel number is encapsulated in the data ID packet in short or long packet.

A typical data interleaving case is illustrated in Figure 453.

Figure 453. Data interleaving using virtual channels

Diagram illustrating data interleaving using virtual channels. The diagram shows a sequence of packets for two virtual channels (VC0 and VC1) interleaved within a frame. The sequence starts with a Frame start for VC0, followed by its data payload, and then a Frame start for VC1, followed by its data payload. The packets are labeled with their functions: LPS, SOT, FS, EOT, PH, Data payload, PF, and EOT. The diagram shows the interleaving of these packets for both virtual channels, with VC0 packets appearing first in each frame segment, followed by VC1 packets. The sequence ends with a Frame end for VC1, followed by a Frame end for VC0.

The diagram illustrates the interleaving of data for two virtual channels (VC0 and VC1) within a frame. The sequence of packets is as follows:

The interleaving of virtual channels is shown in the following sequence:

MSv53053V1

Diagram illustrating data interleaving using virtual channels. The diagram shows a sequence of packets for two virtual channels (VC0 and VC1) interleaved within a frame. The sequence starts with a Frame start for VC0, followed by its data payload, and then a Frame start for VC1, followed by its data payload. The packets are labeled with their functions: LPS, SOT, FS, EOT, PH, Data payload, PF, and EOT. The diagram shows the interleaving of these packets for both virtual channels, with VC0 packets appearing first in each frame segment, followed by VC1 packets. The sequence ends with a Frame end for VC1, followed by a Frame end for VC0.

Data formats

The LLP, in addition to a data-flow filter role, handles data reordering for memory optimization, storage, or post-processing purposes.

The CSI-2 Host controller is compliant with the MIPI Alliance CSI-2 specification. It mainly supports the following data formats:

Figure 454. RAW6 (BPP6) input and output format

Diagram showing RAW6 (BPP6) input and output format across three cycles. Each cycle is a 32-bit bus divided into four 8-bit lanes (n+3, n+2, n+1, n+0). Cycle 1 shows P5[1:0] in lane n+3, P4[5:0] in n+2, P3[5:0] in n+1, and P2[5:0] in n+0. Cycle 2 shows P10[3:0] in lane n+3, P9[5:0] in n+2, P8[5:0] in n+1, and P7[5:0] in n+0. Cycle 3 shows P15[5:0] in lane n+3, P14[5:0] in n+2, P13[5:0] in n+1, and P12[5:0] in n+0. P11[5:0] and P10[5:4] are in lane n+0. The diagram is labeled MSv53054V1.
n+3n+2n+1n+0
Cycle 1P5[1:0]P4[5:0]P3[5:0]P2[5:0]P1[5:0] P0[5:0]
310
Cycle 2P10[3:0]P9[5:0]P8[5:0]P7[5:0]P6[5:0] P5[5:2]
310
Cycle 3P15[5:0]P14[5:0]P13[5:0]P12[5:0]P11[5:0] P10[5:4]
310

MSv53054V1

Diagram showing RAW6 (BPP6) input and output format across three cycles. Each cycle is a 32-bit bus divided into four 8-bit lanes (n+3, n+2, n+1, n+0). Cycle 1 shows P5[1:0] in lane n+3, P4[5:0] in n+2, P3[5:0] in n+1, and P2[5:0] in n+0. Cycle 2 shows P10[3:0] in lane n+3, P9[5:0] in n+2, P8[5:0] in n+1, and P7[5:0] in n+0. Cycle 3 shows P15[5:0] in lane n+3, P14[5:0] in n+2, P13[5:0] in n+1, and P12[5:0] in n+0. P11[5:0] and P10[5:4] are in lane n+0. The diagram is labeled MSv53054V1.
Figure 455. Raw7 (BPP7) input and output format Figure 455: Raw7 (BPP7) input and output format. The diagram shows seven cycles of data transfer, each with a 32-bit bus (31 to 0) divided into four 8-bit lanes (n+3, n+2, n+1, n+0). Each lane contains pixel data blocks. Cycle 1: P4[3:0], P3[6:0], P2[6:0], P1[6:0], P0[6:0]. Cycle 2: P9[0], P8[6:0], P7[6:0], P6[6:0], P5[6:0], P4[6:4]. Cycle 3: P13[4:0], P12[6:0], P11[6:0], P10[6:0], P9[6:1]. Cycle 4: P18[1:0], P17[6:0], P16[6:0], P15[6:0], P14[6:0], P13[6:5]. Cycle 5: P22[5:0], P21[6:0], P20[6:0], P19[6:0], P18[6:2]. Cycle 6: P27[2:0], P26[6:0], P25[6:0], P24[6:0], P23[6:0], P22[6:5]. Cycle 7: P31[6:0], P30[6:0], P29[6:0], P28[6:0], P27[6:3].

Figure 455 illustrates the Raw7 (BPP7) input and output format across seven cycles. Each cycle shows a 32-bit bus (31 to 0) divided into four 8-bit lanes (n+3, n+2, n+1, n+0). The data blocks in each lane are as follows:

MSv53055V1

Figure 455: Raw7 (BPP7) input and output format. The diagram shows seven cycles of data transfer, each with a 32-bit bus (31 to 0) divided into four 8-bit lanes (n+3, n+2, n+1, n+0). Each lane contains pixel data blocks. Cycle 1: P4[3:0], P3[6:0], P2[6:0], P1[6:0], P0[6:0]. Cycle 2: P9[0], P8[6:0], P7[6:0], P6[6:0], P5[6:0], P4[6:4]. Cycle 3: P13[4:0], P12[6:0], P11[6:0], P10[6:0], P9[6:1]. Cycle 4: P18[1:0], P17[6:0], P16[6:0], P15[6:0], P14[6:0], P13[6:5]. Cycle 5: P22[5:0], P21[6:0], P20[6:0], P19[6:0], P18[6:2]. Cycle 6: P27[2:0], P26[6:0], P25[6:0], P24[6:0], P23[6:0], P22[6:5]. Cycle 7: P31[6:0], P30[6:0], P29[6:0], P28[6:0], P27[6:3].

Figure 456. Raw8 (BPP8) input and output format

Figure 456: Raw8 (BPP8) input and output format diagram. Shows a 32-bit register format for Cycle 1 from bit 31 down to 0, split into four bytes labeled n+3, n+2, n+1, n+0 at top row, and P3[7:0], P2[7:0], P1[7:0], P0[7:0] at bottom row. Document reference MSv53056V1.
Figure 456: Raw8 (BPP8) input and output format diagram. Shows a 32-bit register format for Cycle 1 from bit 31 down to 0, split into four bytes labeled n+3, n+2, n+1, n+0 at top row, and P3[7:0], P2[7:0], P1[7:0], P0[7:0] at bottom row. Document reference MSv53056V1.

Figure 457. Raw 10 (BPP10) input and output format

Figure 457: Raw 10 (BPP10) input and output format diagram divided into Input format (left) and Output format (right) for Cycle 1 to Cycle 5. Each cycle displays a 32-bit register from bit 31 to 0 with bytes n+3, n+2, n+1, n+0 mapping into pixel high/low bits: Cycle 1 input shows P3[9:2], P2[9:2], P1[9:2], P0[9:2]; Cycle 2 input shows P6[9:2], P5[9:2], P4[9:2], and packed 2-bit fields P3[1:0], P2[1:0], P1[1:0], P0[1:0]; etc. Output format displays unpacked reconstructed 10-bit pixels P0[9:0], P1[9:0], P2[9:0], etc. across 5 cycles. Document reference MSv53057V1.
Figure 457: Raw 10 (BPP10) input and output format diagram divided into Input format (left) and Output format (right) for Cycle 1 to Cycle 5. Each cycle displays a 32-bit register from bit 31 to 0 with bytes n+3, n+2, n+1, n+0 mapping into pixel high/low bits: Cycle 1 input shows P3[9:2], P2[9:2], P1[9:2], P0[9:2]; Cycle 2 input shows P6[9:2], P5[9:2], P4[9:2], and packed 2-bit fields P3[1:0], P2[1:0], P1[1:0], P0[1:0]; etc. Output format displays unpacked reconstructed 10-bit pixels P0[9:0], P1[9:0], P2[9:0], etc. across 5 cycles. Document reference MSv53057V1.

Figure 458. Raw12 (BPP12) input/output format

Input formatOutput format
n+3n+2n+1n+3n+2n+1n+0
P2[11:4]P1[3:0] P0[3:0]P1[11:4]P0[11:4]P2[7:0]P1[11:0]P0[11:0]
310310
n+3n+2n+1n+3n+2n+1n+0
P5[11:4]P4[11:4]P3[3:0] P2[3:0]P3[11:4]P5[3:0]P4[11:0]P3[11:0] P2[11:8]
310310
n+3n+2n+1n+3n+2n+1n+0
P7[3:0] P6[3:0]P7[11:4]P6[11:4]P5[3:0] P4[3:0]P7[11:0]P6[11:0]P5[11:4]
310310
Cycle 1Cycle 1
Cycle 2Cycle 2
Cycle 3Cycle 3

MSv53058V1

Figure 459. Raw14 (BPP14) input format

Figure 459: Raw14 (BPP14) input format mapping between Input format and Output format across Cycles 1 through 7.
Figure 459: Raw14 (BPP14) input format mapping between Input format and Output format across Cycles 1 through 7.

MSv53059V1

Figure 460. Raw16 (BPP16) input/output format

Diagram showing Input format and Output format for Raw16 (BPP16) data. The Input format shows four 8-bit words (n+3 to n+0) with P1[7:0] and P0[7:0] in the top row, and P1[15:8] and P0[15:8] in the bottom row. The Output format shows the same four words, but P1[15:0] and P0[15:0] are combined into single 16-bit words in the bottom row. Both formats are labeled 'Cycle 1' and show bit positions 31 to 0.
Input formatOutput format
n+3n+2n+1n+0n+3n+2n+1n+0
P1[7:0]P1[15:8]P0[7:0]P0[15:8]P1[15:0]P0[15:0]
31 031 0

MSv53080V2

Diagram showing Input format and Output format for Raw16 (BPP16) data. The Input format shows four 8-bit words (n+3 to n+0) with P1[7:0] and P0[7:0] in the top row, and P1[15:8] and P0[15:8] in the bottom row. The Output format shows the same four words, but P1[15:0] and P0[15:0] are combined into single 16-bit words in the bottom row. Both formats are labeled 'Cycle 1' and show bit positions 31 to 0.

50.5.7 CSI-2 Host protocol output

The CSI-2 Host controller generates ISB-Byte header data according to CSI_VCxCFGRy. The ISB-Byte header generation respects the following rules:

The only differences between the ISB-Byte data flow in input to the LLP and the ISB-Byte header bus at the output are listed below:

The ISB-Byte header is used by the DCMIPP peripheral to handle post-processing data from the external devices.

50.6 CSI-2 Host programming guide

50.6.1 CSI-2 PHY setup

The following actions are required to setup the CSI-2 PHY:

  1. 1. Quit the hardware reset state with PEN = 0x01 in CSI_PRCR.
  2. 2. Configure frequency settings with:
    • – DLD = 0x00 in CSI_PFCR (to remain in Rx)
    • – HSFR in CSI_PFCR that depends on the bit-rate expected on the data lanes
    • – CCFR = RoundUp((F - 17) × 4) in CSI_PFCR (F = configuration clock frequency)
  3. 3. Configure internal registers via the test interface, with TRSEN = TCKEN = 0x0 in CSI_PTCR0.

50.6.2 CSI-2 Host controller setup and data reception start

The D-PHY RX software initialization is required to set up the CSI-2 Host controller.

Lane-merger configuration (static configuration)

The lane merger must be configured while CSIEN = 0 in CSI_CR, and when the D-PHY_RX is not streaming (when it is not providing a clock).

To map the physical data lane to the logical data lane, the lane merger needs to be configured through DL0MAP and DL1MAP in CSI_LMCFGR. In addition, the number of valid data lanes must be configured through LANENB in the same register.

LLP configuration

  1. 1. Configure the watchdog value in CSI_WDR. This corresponds to the maximum number of clock cycles between two packets before an input frame is considered erroneous and the transmission failed. It can be left at 0x0 to disable the watchdog feature.
  2. 2. Enable the CSI-2 Host controller with CSIEN = 1 in CSI_CR.
  3. 3. Configure the selected virtual channels in CSI_VCxCFGRy.
    If all data types must be captured with the same format, in CSI_VCxCFGR1:
    • – Set ALLDT = 0x011.
    • – Select the format with CDTFT[4:0].
    If only a few data types are to be captured, or if the format is not identical for all data types, then up to seven data types can be selected:
    • – Set ALLDT = 0x0 in CSI_VCxCFGR1.
    • – Set DTyEN = 0x1 (y = 0 to 6) in CSI_VCxCFGR1 for the data types used.
    • – Set DTy[5:0] in CSI_VCxCFGRy to the selected data type.
    • – Set DTyFT[4:0] in CSI_VCxCFGRy to the selected format.
  4. 4. Depending on application requirements, specific software actions may detect particular events in a frame, and trigger a corresponding interrupt, with the following:
    • – Set LINECNT[15:0] and BYTECNT[15:0] in CSI_LBxCFGR to trigger an event when the data corresponding to a specific byte within a specific line is detected by the LLP. Up to four independent triggers can be programmed and linked to a selected virtual channel through LBxVC[1:0] in CSI_PRGITER. The selected trigger can be enabled by setting LBxEN in the same register.
    • – Set COUNT[24:0] in CSI_TIMxCFGR to trigger an event after a specified number of clock cycles (clk_proc) from an SOF or an EO, depending on TIMxEOF and TIMxEN in CSI_PRGITER. Up to four independent timer triggers can be programmed and linked to a selected virtual channel through TIMxVC[1:0] in CSI_PRGITER.
  5. 5. Enable interrupt sources for which the code needs to make specific actions, by configuring CSI_IER0 and CSI_IER1 registers.
  6. 6. D-PHY_RX lanes can be enabled by setting DL0EN and/or DL1EN, and CLEN in CSI_PCR.
  7. 7. Start the virtual channel by setting VCxSTART = 0x1 in CSI_CR.

50.6.3 Data reception stop

To stop data reception, set VCxSTOP = 1 in CSI_CR. The data reception stops at the end of the current frame. The virtual channel status can be retrieved from VCxSTATEF in CSI_SR0.

Note: A virtual channel cannot start before it has been completely stopped (VCxSTATEF = 0 in CSI_SR0).

50.7 CSI-2 Host low-power modes

Table 486. Effect of low-power modes on CSI-2 Host controller

ModeDescription
SleepNo effect. The CSI-2 host interrupts cause the device to exit the Sleep mode.
StopThe CSI-2 host is in power-down, and must be reinitialized after exiting Stop mode.
StandbyThe CSI-2 host is in power-down, and must be reinitialized after exiting Standby mode.

50.8 CSI-2 Host interrupts and errors

Few events can generate an error flag or an interrupt from the CSI-2 Host controller interrupt handler.

The table below defines the error sources flagged by the CSI-2 HOST controller. The content of CSI_ERR1 and CSI_ERR2 registers can be used to know exactly from which virtual number and data types a particular error appeared and has been detected. It can be used as debug purpose too.

Table 487. List of errors detected by the CSI-2 Host controller

Error descriptionBit nameRegister
Virtual channel number on which a data ID information error is detectedIDVCERR[1:0]CSI_ERR1
Data type for which a data ID information error is detectedIDDTERR[5:0]
Virtual channel number for which the ECC has corrected one bit in errorCECCVCERR[1:0]
Data type for which the ECC has corrected one bit in errorCECCDTERR[5:0]
Virtual channel number for which a CRC error is detectedCRCVCERR[1:0]
Data type for which a CRC error is detectedCRCDTERR[5:0]
Virtual channel number on which the invalid synchronization has been detectedSYNCVCERR[1:0]CSI_ERR2
Virtual channel number on which a watchdog error has been detectedWDVCERR[1:0]
Virtual channel number on which a shorter packet than expected has been detectedSPKTVCERR[1:0]
Data type for which the shorter packet than expected error has been detectedSPKTDTERR[5:0]

The table below shows the interrupt sources that are triggered by the CSI-2 Host controller if the corresponding bit is enabled.

Table 488. List of events that trigger an interrupt

Interrupt flagRegisterInterrupt sources
SYNCERRFCSI_SR0Synchronization error. The interrupt is enabled if SYNCERRIE is set in CSI_IER0(1).
WDERRFWatchdog error. The interrupt is enabled if WDERRIE is set in CSI_IER0(1).
SPKTERRFShorter packet than expected error. The interrupt is enabled if SPKTERRIE is set in CSI_IER0 register(1).
IDERRFData ID information error. The interrupt is enabled if IDERRIE is set in CSI_IER0(1).
CECCERRFCorrected ECC error. The interrupt is enabled if CECCERRIE is set in CSI_IER0(1).
ECCERRFECC error. The interrupt is enabled if ECCERRIE is set in CSI_IER0(1).
CRCERRFCRC error. The interrupt is enabled if CRCERRIE is set in CSI_IER0(1).
CCFIFOFFClock changer FIFO full event. The interrupt is enabled if CCFIFOFFIE is set in CSI_IER0(2).
SPKTFShort packet detection. The interrupt is enabled if SPKTIE is set in CSI_IER0(2).
EOF3FEOF on virtual channel 3. The interrupt is enabled if EOF3IE is set in CSI_IER0(2).
EOF2FEOF on virtual channel 2. The interrupt is enabled if EOF2IE is set in CSI_IER0(2).
EOF1FEOF on virtual channel 1. The interrupt is enabled if EOF1IE is set in CSI_IER0(2).
EOF0FEOF on virtual channel 0. The interrupt is enabled if EOF0IE is set in CSI_IER0(2).
SOF3FSOF on virtual channel 3. The interrupt is enabled if SOF3IE is set in CSI_IER0(2).
SOF2FSOF on virtual channel 2. The interrupt is enabled if SOF2IE is set in CSI_IER0(2).
SOF1FSOF on virtual channel 1. The interrupt is enabled if SOF1IE is set in CSI_IER0(2).
SOF0FSOF on virtual channel 0. The interrupt is enabled if SOF0IE is set in CSI_IER0(2).
TIM3FTimer 3 counter value reached. The interrupt is enabled if TIM3IE is set in CSI_IER0(2).
TIM2FTimer 2 counter value reached. The interrupt is enabled if TIM2IE is set in CSI_IER0(2).
TIM1FTimer 1 counter value reached. The interrupt is enabled if TIM1IE is set in CSI_IER0(2).
TIM0FTimer 0 counter value reached. The interrupt is enabled if TIM0IE is set in CSI_IER0(2).
LB3FLine/byte event 3 reached. The interrupt is enabled if LB3IE is set in CSI_IER0(2).
LB2FLine/byte event 2 reached. The interrupt is enabled if LB2IE is set in CSI_IER0(2).
LB1FLine/byte event 1 reached. The interrupt is enabled if LB1IE is set in CSI_IER0(2).
LB0FLine/byte event 0 reached. The interrupt is enabled if LB0IE is set in CSI_IER0(2).
Table 488. List of events that trigger an interrupt (continued)
Interrupt flagRegisterInterrupt sources
ECTRLDL1FCSI_SR1Error control on data line 1. The interrupt is enabled if ECTRLDL1IE is set in CSI_IER1.
ESYNCESCDL1FLow-power data transmission synchronization error on data line 1. The interrupt is enabled if ESYNCESCDL1IE is set in CSI_IER1.
EESCDL1FEscape entry error on data line 1. The interrupt is enabled if EESCDL1IE is set in CSI_IER1.
ESOTSYNCDL1FSOT synchronization error on data line 1. The interrupt is enabled if ESOTSYNCDL1IE is set inCSI_IER1.
ESOTDL1FSOT error on data line 1. The interrupt is enabled if the bit ESOTDL1IE is set into CSI_IER1.
ECTRLDL0FError control on data line 0. The interrupt is enabled if the bit ECTRLDL0IE is set into CSI_IER1.
ESYNCESCDL0FLow-power data transmission synchronization error on data line 0. The interrupt is enabled if the bit ESYNCESCDL0IE is set into CSI_IER1.
EESCDL0FEscape entry error on data line 0. The interrupt is enabled if EESCDL0IE is set in CSI_IER1.
ESOTSYNCDL0FSOT synchronization error on data line 0. The interrupt is enabled if ESOTSYNCDL0IE is set in CSI_IER1.
ESOTDL0FSOT error on data line 0. The interrupt is enabled if ESOTDL0IE is set in CSI_IER1.
  1. 1. Refer to Section 50.8.1: Error handling.
  2. 2. Refer to Section 50.8.2: Interrupt handling.

50.8.1 Error handling

Details of the errors are given in CSI_ERR1 and CSI_ERR2.

Note: Except for data ID information, all other errors can occur during the product life, and must be handled by the software.

Corrected ECC error

When this error is detected, the CECCERR interrupt is triggered if CECCERRIE = 1 in CSI_IER0. This is an information event rather than a real error, as the CSI-2 Host controller successfully recovered the ECC error, so the frame is processed properly. Some details of the error are located in CECCVCERR and CECCDTERR in CSI_ERR1:

ECC error

When a multi-bit ECC error is detected, the ECCERR interrupt is triggered if ECCERRIE = 1 in CSI_IER0. As all virtual channels are potentially corrupted, the LPP immediately stops the current frames.

The CSI-2 Host controller restarts each enabled virtual channel on the next SOF packet of each channel. The software must perform the necessary error management (such as resetting some peripherals after this error detection). No details are available for the error as the relevant information is corrupted.

CRC error

When a CRC error is detected, the CRCERR interrupt is triggered if CRCERRIE = 1 in CSI_IER0. As the frame envelope is not corrupted, the CSI-2 Host controller does not stop the frame processing. The software must perform the necessary error management (such as reseting some peripherals, possibly including the CSI-2 Host controller). Details are available for this error in CRCVCERR and CRCDTERR in CSI_ERR1.

Data ID information

When a reserved data type is detected, the IDERR interrupt is triggered if IDERRIE = 1 in CSI_IER0. This is an information event rather than a real error, as the hardware processes this packet as for any non-erroneous packet.Details for the error are available in IDVCERR and IDDTERR in CSI_ERR1.

Invalid synchronization

When an invalid synchronization is detected, the SYNCERR interrupt is triggered if SYNCERRIE = 1 in CSI_IER0. An invalid synchronization is either an SOF short packet during a frame, or an EOF short packet during an inter-frame. It is an information event rather than a real error, as the hardware is able to handle such an error:

Shorter than expected packet

When a shorter-than-expected packet is received, the SPKTERR interrupt is triggered if SPKTERRIE = 1 in CSI_IER0. The packet is padded up to its theoretical size, and the frame is processed as if no error occurred. The software must perform the necessary error management (such as reseting some peripherals, possibly including the CSI decoder). Details for the error are available in SPKTVCERR and SPKTDTERR in CSI_ERR2.

Watchdog

When the time between two packets of a given virtual channel is longer than the programmed watchdog (CNT[31:0] in CSI_WDR), the WDERR interrupt is triggered if WDERRIE = 1 in CSI_WDR. As the corresponding virtual channel stream is corrupted, the CSI2 Host controller immediately stops processing this virtual channel. The software must perform the necessary error management (such as reseting some peripherals after this error detection), before restarting the CSI-2 Host. Details for the error are available in WDVCERR in CSI_ERR2.

50.8.2 Interrupt handling

The CSI-2 Host controller offers many interrupt sources that can be activated if the associated enable bit is set. Some interrupt sources are linked to an error detection from the D-PHY physical layer or the CSI-2 Host controller (refer to Section 50.8.1).

Short packet interrupt

This interrupt notifies the software that a generic short packet has been received. The software can retrieve the associated data in CSI_SPDFR. This register value is overwritten with each new generic short packet.

SOF and EOF interrupts

The CSI-2 Host controller generates an SOF interrupt for each SOF short packet received. It also generates an EOF interrupt for each EOF short packet, independently for all four virtual channels. These interrupts are generated even if the virtual channel is disabled. The software must mask or ignore these interrupts if they are not needed.

Line/byte programmable interrupts

The CSI-2 Host controller provides four interrupts that can be programmed to be triggered at any point during the active data of a frame. In order to set a programmable line/byte interrupt, the software must follow these steps:

  1. 1. Select a virtual channel by setting LBxVC[1:0] in CSI_PRGITR.
  2. 2. Select the frame location at which the interrupt is triggered by setting LINECNT and BYTECNT in CSI_LBxCFGRy.
  3. 3. Enable the line/byte counting by setting LBxEN in the CSI_PGRITR register. This bit must be set only when the CSI-2 is enabled.
  4. 4. Enable the interrupt by setting LBxIE in CSI_IER0.
  5. 5. The interrupt is generated starting from the next frame on the selected virtual channel.

In order to stop a programmable interrupt, the software must reset the LBxIE bit in the CSI_IER0 register. It immediately stops the interrupt.

Note: All four line/byte programmable interrupts are independent.

Timer-based programmable interrupts

The CSI-2 Host controller provides four interrupts that can be programmed to be triggered based on a timer. In order to set a programmable timer based interrupt, the software must select a virtual channel by setting TIMxVC[1:0] in CSI_PRGITR. The following steps must be followed, while the CSI-2 is disabled:

  1. 1. Select the starting event of the timer with TIMxEOF in CSI_PRGITR.
  2. 2. Select the timer duration by setting COUNT[24:0] in CSI_TIMxCFGR.
  3. 3. Select and enable counting by setting TIMxEN in CSI_PRGITR.
  4. 4. Enable the interrupt by setting TIMxIE in CSI_IER0.
  5. 5. The interrupt is generated starting from the next frame on the selected virtual channel.

In order to stop a programmable interrupt, the software must reset the TIMxIE bit in the CSI_IER0 register. It immediately stops the interrupt.

Note: All four timer-based programmable interrupts are independent.
If the timer is set to a value longer than the frame period, the interrupt may not be generated for all frames.

Clock-changer FIFO full interrupt

The clock changer is also built around a FIFO which is never full in normal conditions. If the overall system works very slowly (for example due to the CSI-2 and DCMIPP processing clock frequency being set to an inadequate frequency, system-bus bandwidth availability, and so on), the clock-changer FIFO may become full. In this case, an interrupt is set if CCFIFOE = 1 in CSI_IER0.

50.9 CSI-2 Host registers

50.9.1 CSI-2 Host control register (CSI_CR)

Address offset: 0x00

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
VC3 STOPVC3 STARTRes.Res.VC2 STOPVC2 STARTRes.Res.VC1 STOPVC1 STARTRes.Res.VC0 STOPVC0 STARTRes.CSIEN
wwwwwwwwrw

Bits 31:16 Reserved, must be kept at reset value.

Bit 15 VC3STOP: Virtual channel 3 stop

The CSI-2 decoder stops the virtual channel 3.

0: No effect

1: Pulse generation to stop the virtual channel 3 processing

Note: The CSI-2 decoder stops processing the virtual channel 3 after the next EOF event (or immediately if the Stop command is issued during frame blanking).

A write operation into this bit must not be simultaneous with a write into VC3START.

Reading this bit returns 0.

Bit 14 VC3START: Virtual channel 3 start

The CSI-2 decoder processes the virtual channel 3 according to CSI_VC3CFGRx (x = 0..3).

0: No effect

1: Pulse generation to start the virtual channel 3 processing

Note: The CSI-2 decoder starts processing the virtual channel 3 after the next SOF event.

A write operation into this bit must not be simultaneous with a write into VC3STOP.

Reading this bit returns 0.

Bits 13:12 Reserved, must be kept at reset value.

Bit 11 VC2STOP: Virtual channel 2 stop

The CSI-2 decoder stops the virtual channel 2.

0: No effect

1: Pulse generation to stop the virtual channel 2 processing

Note: The CSI-2 decoder stops processing the virtual channel 2 after the next EOF event (or immediately if the Stop command is issued during frame blanking).

A write operation into this bit must not be simultaneous with a write into VC2START.

Reading this bit returns 0.

Bit 10 VC2START: Virtual channel 2 start

The CSI-2 decoder processes the virtual channel 2 according to CSI_VC2CFGRx (x = 0..3).

0: No effect

1: Pulse generation to start the virtual channel 2 processing

Note: The CSI-2 decoder starts processing the virtual channel 2 after the next SOF event.

A write operation into this bit must not be simultaneous with a write into VC2STOP.

Reading this bit returns 0.

Bits 9:8 Reserved, must be kept at reset value.

Bit 7 VC1STOP: Virtual channel 1 stop

The CSI-2 decoder stops the virtual channel 1.

0: No effect

1: Pulse generation to stop the virtual channel 1 processing

Note: The CSI-2 decoder stops processing the virtual channel 1 after the next EOF event (or immediately if the Stop command is issued during frame blanking).

A write operation into this bit must not be simultaneous with a write into VC1START.

Reading this bit returns 0.

Bit 6 VC1START: Virtual channel 1 start

The CSI-2 decoder processes the virtual channel 1 according to CSI_VC1CFGRx (x = 0..3).

0: No effect

1: Pulse generation to start the virtual channel 1 processing

Note: The CSI-2 decoder starts processing the virtual channel 1 after the next SOF event.

A write operation into this bit must not be simultaneous with a write into VC1STOP.

Reading this bit returns 0.

Bits 5:4 Reserved, must be kept at reset value.

Bit 3 VC0STOP: Virtual channel 0 stop

The CSI-2 decoder stops the virtual channel 0.

0: No effect

1: Pulse generation to stop the virtual channel 0 processing

Note: The CSI-2 decoder stops processing the virtual channel 0 after the next EOF event (or immediately if the Stop command is issued during frame blanking).

A write operation into this bit must not be simultaneous with a write into VC0START.

Reading this bit returns 0.

Bit 2 VC0START: Virtual channel 0 start

The CSI-2 decoder processes the virtual channel 0 according to CSI_VC0CFGRx (x = 0..3).

0: No effect

1: Pulse generation to start the virtual channel 0 processing

Note: The CSI-2 decoder starts processing the virtual channel 0 after the next SOF event.

A write operation into this bit must not be simultaneous with a write into VC0STOP.

Reading this bit returns 0.

Bit 1 Reserved, must be kept at reset value.

Bit 0 CSIEN: CSI-2 enable

This bit enables the CSI-2 peripheral for processing the data flow coming from the camera through the D-PHY_RX.

0: CSI-2 disabled

1: CSI-2 enabled

50.9.2 CSI-2 Host DPHY_RX control register (CSI_PCR)

Address offset: 0x04

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.DL1ENDL0ENCLENPWR DOWN
rwrwrwrw

Bits 31:4 Reserved, must be kept at reset value.

Bit 3 DL1EN: D-PHY_RX data lane 1 enable

This bit enables the data lane 1 for the D-PHY_RX.

0: Data lane 1 module is in shutdown mode.

1: Enable the data lane 1 module.

Bit 2 DL0EN: D-PHY_RX data lane 0 enable

This bit enables the data lane 0 for the D-PHY_RX.

0: Data lane 0 module is in shutdown mode.

1: Enable the data lane 0 module.

Bit 1 CLEN: Clock lane enable

This bit enables the clock lane module of the D-PHY_RX.

0: Clock lanes disabled

1: Clock lanes enabled

Bit 0 PWRDOWN: Power down

This bit keeps the D-PHY_RX in power-down state.

0: Active state

1: Power down the D-PHY_RX

50.9.3 CSI-2 Host virtual channel x configuration register 1 (CSI_VCxCFGR1)

Address offset: 0x10+0x10*x, (x = 0 to 3)

Reset value: 0x0000 0000

Any change in this register while the virtual channel x is running is ignored.

31302928272625242322212019181716
Res.Res.Res.DT0FT[4:0]Res.Res.DT0[5:0]
rwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
Res.Res.Res.CDTFT[4:0]DT6ENDT5ENDT4ENDT3ENDT2ENDT1ENDT0ENALLDT
rwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:29 Reserved, must be kept at reset value.

Bits 28:24 DT0FT[4:0]: Data type 0 format

These bits configure the input pixel format for the virtual channel x on data type 0.

00000: (BPP6) 6-bit words (for example RAW6, RGB666)

00001: (BPP7) 7-bit words (for example RAW7)

00010: (BPP8) 8-bit words (for example RAW8, YUV 8 bits, RGB888, RGB444, RGB555, RGB565, JPEG)

00011: (BPP10) 10-bit words (for example RAW10, YUV 10 bits)

00100: (BPP12) 12-bit words (for example RAW12)

00101: (BPP14) 14-bit words (for example RAW14)

00110: (BPP16) 16-bit words (for example RAW16)

Others: reserved and must not be used

Note: The format selection is valid only if ALLDT = 0 and DT0EN = 1. These bits have no effect if ALLDT = 1.

Bits 23:22 Reserved, must be kept at reset value.

Bits 21:16 DT0[5:0]: Data type 0 class selection for virtual channel x

These bits select the data type 0 class and subclass for the virtual channel x according to the MIPI specification for CSI-2.

Bits 15:13 Reserved, must be kept at reset value.

Bits 12:8 CDTFT[4:0]: Common format for all data types

These bits are configured to select which input pixel format is applied for all the seven data type on virtual channel x.

00000: (BPP6) 6-bit words (for example RAW6, RGB666)

00001: (BPP7) 7-bit words (for example RAW7)

00010: (BPP8) 8-bit words (for example RAW8, YUV 8 bits, RGB888, RGB444, RGB555, RGB565, JPEG)

00011: (BPP10) 10-bit words (for example RAW10, YUV 10 bits)

00100: (BPP12) 12-bit words (for example RAW12)

00101: (BPP14) 14-bit words (for example RAW14)

00110: (BPP16) 16-bit words (for example RAW16)

Others: Reserved

Note: The format selection is valid only if ALLDT = 1. These bits have no effect if ALLDT = 0.

Bit 7 DT6EN: Data type 6 enable

This bit enables the data type 6 for the virtual channel x. The data type format is applied with respect to the configuration of DT6[5:0] and DT6FT[4:0] in CSI_VCxCFGR4.

0: Data type 6 for virtual channel x is disabled.

1: Data type 6 for virtual channel x is enabled.

Note: This bit has no effect if ALLDT = 1.

Bit 6 DT5EN: Data type 5 enable

This bit enables the data type 5 for the virtual channel x. The data type format is applied with respect to the configuration of DT5[5:0] and DT5FT[4:0] in CSI_VCxCFGR4.

0: Data type 5 for virtual channel x is disabled.

1: Data type 5 for virtual channel x is enabled.

Note: This bit has no effect if ALLDT = 1.

Bit 5 DT4EN: Data type 4 enable

This bit enables the data type 4 for the virtual channel x. The data type format is applied with respect to the configuration of DT4[5:0] and DT4FT[4:0] in CSI_VCxCFGR3.

0: Data type 4 for virtual channel x is disabled.

1: Data type 4 for virtual channel x is enabled.

Note: This bit has no effect if ALLDT = 1.

Bit 4 DT3EN: Data type 3 enable

This bit enables the data type 3 for the virtual channel x. The data type format is applied with respect to the configuration of DT3[5:0] and DT3FT[4:0] in CSI_VCxCFGR3.

0: Data type 3 for virtual channel x is disabled.

1: Data type 3 for virtual channel x is enabled.

Note: This bit has no effect if ALLDT = 1.

Bit 3 DT2EN: Data type 2 enable

This bit enables the data type 2 for the virtual channel x. The data type format is applied with respect to the configuration of DT2[5:0] and DT2FT[4:0] in CSI_VCxCFGR2.

0: Data type 2 for virtual channel x is disabled.

1: Data type 2 for virtual channel x is enabled.

Note: This bit has no effect if ALLDT = 1.

Bit 2 DT1EN: Data type 1 enable

This bit enables the data type 1 for the virtual channel x. The data type format is applied with respect to the configuration of DT1[5:0] and DT1FT[4:0] in CSI_VCxCFGR2.

0: Data type 1 for virtual channel x is disabled.

1: Data type 1 for virtual channel x is enabled.

Note: This bit has no effect if ALLDT = 1.

Bit 1 DT0EN: Data type 0 enable

This bit enables the data type 0 for the virtual channel x. The data type format is applied with respect to the configuration of DT0[5:0] and DT0FT[4:0] in CSI_VCxCFGR1.

0: Data type 0 for virtual channel x is disabled.

1: Data type 0 for virtual channel x is enabled.

Note: This bit has no effect if ALLDT = 1.

Bit 0 ALLDT: All data types enable for the virtual channel x

This bit allows to capture all data types according to CDTFT[4:0] for the virtual channel x.

0: Data type capture managed individually

1: All data types captured for virtual channel x

50.9.4 CSI-2 Host virtual channel x configuration register 2 (CSI_VCxCFGR2)

Address offset: 0x14+0x10*x, (x = 0 to 3)

Reset value: 0x0000 0000

Any change in this register while the virtual channel x is running is ignored.

31302928272625242322212019181716
Res.Res.Res.DT2FT[4:0]Res.Res.DT2[5:0]
rwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
Res.Res.Res.DT1FT[4:0]Res.Res.DT1[5:0]
rwrwrwrwrwrwrwrwrwrwrw

Bits 31:29 Reserved, must be kept at reset value.

Bits 28:24 DT2FT[4:0]: Data type 2 format

These bits configure the input pixel format for the virtual channel x on data type 2.

00000: (BPP6) 6-bit words (for example RAW6, RGB666)

00001: (BPP7) 7-bit words (for example RAW7)

00010: (BPP8) 8-bit words (for example RAW8, YUV 8 bits, RGB888, RGB444, RGB555, RGB565, JPEG)

00011: (BPP10) 10-bit words (for example RAW10, YUV 10 bits)

00100: (BPP12) 12-bit words (for example RAW12)

00101: (BPP14) 14-bit words (for example RAW14)

00110: (BPP16) 16-bit words (for example RAW16)

Others: Reserved and must not be used.

Note: The format selection is valid only if ALLDT = 0 and DT2EN = 1. These bits have no effect if ALLDT = 1.

Bits 23:22 Reserved, must be kept at reset value.

Bits 21:16 DT2[5:0]: Data type 2 class selection for virtual channel x

These bits select the data type 2 class and subclass for the virtual channel x according to the MIPI specification for CSI- 2.

Bits 15:13 Reserved, must be kept at reset value.

Bits 12:8 DT1FT[4:0]: Data type 1 format

These bits configure the input pixel format for the virtual channel x on data type 1.

00000: (BPP6) 6-bit words (for example RAW6, RGB666)

00001: (BPP7) 7 -it words (for example RAW7)

00010: (BPP8) 8 -it words (for example RAW8, YUV 8 bits, RGB888, RGB444, RGB555, RGB565, JPEG)

00011: (BPP10) 10-bit words (for example RAW10, YUV 10 bits)

00100: (BPP12) 12 -it words (for example RAW12)

00101: (BPP14) 14 -it words (for example RAW14)

00110: (BPP16) 16 -it words (for example RAW16)

Others: Reserved and must not be used.

Note: The format selection is valid only if ALLDT = 0 and DT1EN = 1. These bits have no effect if ALLDT = 1.

Bits 7:6 Reserved, must be kept at reset value.

Bits 5:0 DT1[5:0]: Data type 1 class selection for virtual channel x

These bits select the data type 1 class and subclass for the virtual channel x according to the MIPI specification for CSI- 2.

50.9.5 CSI-2 Host virtual channel x configuration register 3 (CSI_VCxCFGR3)

Address offset: 0x18 + 0x10 * x, (x = 0 to 3)

Reset value: 0x0000 0000

Any change in this register while the virtual channel x is running is ignored.

31302928272625242322212019181716
Res.Res.Res.DT4FT[4:0]Res.Res.DT4[5:0]
rwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
Res.Res.Res.DT3FT[4:0]Res.Res.DT3[5:0]
rwrwrwrwrwrwrwrwrwrwrw

Bits 31:29 Reserved, must be kept at reset value.

Bits 28:24 DT4FT[4:0]: Data type 4 format

These bits configure the input pixel format for the virtual channel x on data type 4.

00000: (BPP6) 6-bit words (for example RAW6, RGB666)

00001: (BPP7) 7-bit words (for example RAW7)

00010: (BPP8) 8-bit words (for example RAW8, YUV 8 bits, RGB888, RGB444, RGB555, RGB565, JPEG)

00011: (BPP10) 10-bit words (for example RAW10, YUV 10 bits)

00100: (BPP12) 12-bit words (for example RAW12)

00101: (BPP14) 14-bit words (for example RAW14)

00110: (BPP16) 16-bit words (for example RAW16)

Others: Reserved and must not be used.

Note: The format selection is valid only if ALLDT = 0 and DT4EN = 1. These bits have no effect if ALLDT = 1.

Bits 23:22 Reserved, must be kept at reset value.

Bits 21:16 DT4[5:0]: Data type 4 class selection for virtual channel x

These bits select the data type 4 class and subclass for the virtual channel x according to the MIPI specification for CSI-2.

Bits 15:13 Reserved, must be kept at reset value.

Bits 12:8 DT3FT[4:0]: Data type 3 format

These bits configure the input pixel format for the virtual channel x on data type 3.

00000: (BPP6) 6-bit words (for example RAW6, RGB666)

00001: (BPP7) 7-bit words (for example RAW7)

00010: (BPP8) 8-bit words (for example RAW8, YUV 8 bits, RGB888, RGB444, RGB555, RGB565, JPEG)

00011: (BPP10) 10-bit words (for example RAW10, YUV 10 bits)

00100: (BPP12) 12-bit words (for example RAW12)

00101: (BPP14) 14-bit words (for example RAW14)

00110: (BPP16) 16-bit words (for example RAW16)

Others: Reserved and must not be used.

Note: The format selection is valid only if ALLDT = 0 and DT3EN = 1. These bits have no effect if ALLDT = 1.

Bits 7:6 Reserved, must be kept at reset value.

Bits 5:0 DT3[5:0]: Data type 3 class selection for virtual channel x

These bits select the data type 3 class and subclass for the virtual channel x according to the MIPI specification for CSI-2.

50.9.6 CSI-2 Host virtual channel x configuration register 4 (CSI_VCxCFGR4)

Address offset: 0x1C + 0x10 * x, (x = 0 to 3)

Reset value: 0x0000 0000

Any change in this register while the virtual channel x is running is ignored.

31302928272625242322212019181716
Res.Res.Res.DT6FT[4:0]Res.Res.DT6[5:0]
rwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
Res.Res.Res.DT5FT[4:0]Res.Res.DT5[5:0]
rwrwrwrwrwrwrwrwrwrwrw

Bits 31:29 Reserved, must be kept at reset value.

Bits 28:24 DT6FT[4:0]: Data type 6 format

These bits configure the input pixel format for the virtual channel x on data type 6.

00000: (BPP6) 6-bit words (for example RAW6, RGB666)

00001: (BPP7) 7-bit words (for example RAW7)

00010: (BPP8) 8-bit words (for example RAW8, YUV 8 bits, RGB888, RGB444, RGB555, RGB565, JPEG)

00011: (BPP10) 10-bit words (for example RAW10, YUV 10 bits)

00100: (BPP12) 12-bit words (for example RAW12)

00101: (BPP14) 14-bit words (for example RAW14)

00110: (BPP16) 16-bit words (for example RAW16)

Others: Reserved and must not be used.

Note: The format selection is valid only if ALLDT = 0 and DT6EN = 1. These bits have no effect if ALLDT = 1.

Bits 23:22 Reserved, must be kept at reset value.

Bits 21:16 DT6[5:0]: Data type 6 class selection for virtual channel x

These bits select the data type 6 class and subclass for the virtual channel x according to the MIPI specification for CSI-2.

Bits 15:13 Reserved, must be kept at reset value.

Bits 12:8 DT5FT[4:0]: Data type 5 format

These bits configure the input pixel format for the virtual channel x on data type 5.

00000: (BPP6) 6-bit words (for example RAW6, RGB666)

00001: (BPP7) 7-bit words (for example RAW7)

00010: (BPP8) 8-bit words (for example RAW8, YUV 8 bits, RGB888, RGB444, RGB555, RGB565, JPEG)

00011: (BPP10) 10-bit words (for example RAW10, YUV 10 bits)

00100: (BPP12) 12-bit words (for example RAW12)

00101: (BPP14) 14-bit words (for example RAW14)

00110: (BPP16) 16-bit words (for example RAW16)

Others: Reserved.

Note: The format selection is valid only if ALLDT = 0 and DT5EN = 1. These bits have no effect if ALLDT = 1.

Bits 7:6 Reserved, must be kept at reset value.

Bits 5:0 DT5[5:0]: Data type 5 class selection for virtual channel x

These bits select the data type 5 class and subclass for the virtual channel x according to the MIPI specification for Camera Serial Interface 2.

50.9.7 CSI-2 Host line byte x configuration register (CSI_LBxCFGR)

Address offset: 0x50+0x04*x, (x = 0 to 3)

Reset value: 0x0000 0000

Any change in this register while LBxEN bit is set into the CSI_PRGitr is ignored.

Bit 31Bit 30Bit 29Bit 28Bit 27Bit 26Bit 25Bit 24Bit 23Bit 22Bit 21Bit 20Bit 19Bit 18Bit 17Bit 16
313029282726252423 LINECNT[15:0]22212019181716
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
151413121110987 BYTECNT[15:0]6543210
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
Bits 31:16LINECNT[15:0]: Line counter
Bits 15:0BYTECNT[15:0]: Byte counter
RM0457 Rev 52789/5881

Bits 31:16 LINECNT[15:0]: Line counter

These bits select the line number, associated to LINECNT[15:0], to trigger, if enabled, the corresponding line/byte interruption flag based on the selected virtual channel identified in CSI_PRGitr.

Bits 15:0 BYTECNT[15:0]: Byte counter

These bits select the byte number, associated to BYTECNT[15:0], to trigger, if enabled, the corresponding line/byte interruption flag based on the selected virtual channel identified in CSI_PRGitr.

50.9.8 CSI-2 Host timer x configuration register (CSI_TIMxCFGR)

Address offset: 0x60 + 0x04 * x, (x = 0 to 3)

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.COUNT[24:16]
rwrwrwrwrwrwrwrwrw
1514131211109876543210
COUNT[15:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:25 Reserved, must be kept at reset value.

Bits 24:0 COUNT[24:0]: Clock cycle counter

This register is used to specify how many clock cycles (clk_proc) the timer needs to count from a SOF on the considered virtual channel, before triggering the associated interrupt flag if enabled in CSI_PRGITER. The interruption is generated if TIMxIE is set in CSI_IER0.

50.9.9 CSI-2 Host lane merger configuration register (CSI_LMCFGR)

Address offset: 0x70

Reset value: 0x4321 0200

This register must not be modified while the CSI-2 is enabled.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.DL1MAP[2:0]Res.DL0MAP[2:0]
rwrwrwrwrwrw
1514131211109876543210
Res.Res.Res.Res.Res.LANENB[2:0]Res.Res.Res.Res.Res.Res.Res.Res.
rwrwrw

Bits 31:23 Reserved, must be kept at reset value.

Bits 22:20 DL1MAP[2:0]: Physical mapping of logical data lane 1

These bits are used to map the physical data lane 1 on the logical data lane.

001: Physical data lane 1 connected to logical data lane 0

010: Physical data lane 1 connected to logical data lane 1

Others: Reserved

Note: This field value must be different from DL0MAP[2:0].

Bit 19 Reserved, must be kept at reset value.

Bits 18:16 DL0MAP[2:0]: Physical mapping of logical data lane 0

These bits are used to map the physical data lane 0 on the logical data lane.

001: Physical data lane 0 connected to logical data lane 0

010: Physical data lane 0 connected to logical data lane 1

Others: Reserved

Note: This field value must be different from DL1MAP[2:0].

Bits 15:11 Reserved, must be kept at reset value.

Bits 10:8 LANENB[2:0]: Number of lanes

These bits are used to specify the number of lanes used for the data reception.

001: 1 lane for the reception

010: 2 lanes for the reception

Others: Reserved

Bits 7:0 Reserved, must be kept at reset value.

50.9.10 CSI-2 Host program interrupt register (CSI_PRGITR)

Address offset: 0x74

Reset value: 0x0000 0000

31302928272625242322212019181716
TIM3 ENTIM3 EOFTIM3VC[1:0]TIM2 ENTIM2 EOFTIM2VC[1:0]TIM1 ENTIM1 EOFTIM1VC[1:0]TIM0 ENTIM0 EOFTIM0VC[1:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
LB3 ENRes.LB3VC[1:0]LB2 ENRes.LB2VC[1:0]LB1 ENRes.LB1VC[1:0]LB0 ENRes.LB0VC[1:0]
rwrwrwrwrwrwrwrwrwrwrwrw

Bit 31 TIM3EN: TIM3 base time enable

This bit is used to enable the mechanism of event generation starting from SOF or EOF depending on TIM3EOF. An interrupt is generated if TIM3IE is set in CSI_IER0.

0: Timer 3 clock cycle counter not active

1: Timer 3 clock cycle counter active

Note: Enabling this bit locks TIM3EOF and TIM3VC[1:0] values.

The counting starts from the next frame after setting this bit.

This bit must be written only when the CSI-2 is disabled.

Bit 30 TIM3EOF: TIM3 base time starting from the EOF

This bits is used to select the starting point of the counter on the selected virtual channel.

0: SOF selected as starting point for the counter

1: EOF selected as starting point for the counter

Note: The write access to this bit is ignored if TIM3EN = 1 in CSI_PRGITR.

This bit must be written only when the CSI-2 is disabled.

Bits 29:28 TIM3VC[1:0]: TIM3 base time linked to a virtual channel

These bits are used to select from which of the virtual channels the TIM3 counter is linked.

00: Virtual channel 0 used to generate the TIM3 event

01: Virtual channel 1 used to generate the TIM3 event

10: Virtual channel 2 used to generate the TIM3 event

11: Virtual channel 3 used to generate the TIM3 event

Note: The write access to these bits is ignored if TIM3EN = 1 in CSI_PRGITR.

These bits must be written only when the CSI-2 is disabled.

Bit 27 TIM2EN: TIM2 base time enable

This bit is used to enable the mechanism of event generation starting from SOF or EOF depending on TIM2EOF. An interrupt is generated if TIM2IE is set in CSI_IER0.

0: Timer 2 clock cycle counter not active.

1: Timer 2 clock cycle counter active

Note: Enabling this bit locks TIM2EOF and TIM2VC[1:0] values.

The counting starts from the next frame after setting this bit.

This bit must be written only when the CSI-2 is disabled.

Bit 26 TIM2EOF: TIM2 base time starting from the EOF

This bits is used to select the starting point of the counter on the selected virtual channel.

0: SOF selected as starting point for the counter

1: EOF selected as starting point for the counter

Note: The write access to this bit is ignored if TIM2EN = 1 in CSI_PRGITR.

This bit must be written only when the CSI-2 is disabled.

Bits 25:24 TIM2VC[1:0]: TIM2 base time linked to a virtual channel

These bits are used to select from which of the virtual channels the TIM2 counter is linked.

00: Virtual channel 0 used to generate the TIM2 event

01: Virtual channel 1 used to generate the TIM2 event

10: Virtual channel 2 used to generate the TIM2 event

11: Virtual channel 3 used to generate the TIM2 event

Note: The write access to these bits is ignored if TIM2EN = 1 in CSI_PRGITR.

These bits must be written only when the CSI-2 is disabled.

Bit 23 TIM1EN: TIM1 base time enable

This bit is used to enable the mechanism of event generation starting from SOF or EOF depending on TIM1EOF. An interrupt is generated if TIM1IE is set in CSI_IER0.

0: Timer 1 clock cycle counter not active.

1: Timer 1 clock cycle counter active

Note: Enabling this bit locks TIM1EOF and TIM1VC[1:0] values.

The counting starts from the next frame after setting this bit.

This bit must be written only when the CSI-2 is disabled.

Bit 22 TIM1EOF: TIM1 base time starting from the EOF

This bits is used to select the starting point of the counter on the selected virtual channel.

0: SOF selected as starting point for the counter

1: EOF selected as starting point for the counter

Note: The write access to this bit is ignored if TIM1EN = 1 in CSI_PRGITR.

This bit must be written only when the CSI-2 is disabled.

Bits 21:20 TIM1VC[1:0]: TIM1 base time linked to a virtual channel

These bits are used to select from which of the virtual channels the TIM1 counter is linked.

00: Virtual channel 0 used to generate the TIM1 event

01: Virtual channel 1 used to generate the TIM1 event

10: Virtual channel 2 used to generate the TIM1 event

11: Virtual channel 3 used to generate the TIM1 event

Note: The write access to these bits is ignored if TIM1EN = 1 in CSI_PRGITR.

These bits must be written only when the CSI-2 is disabled.

Bit 19 TIM0EN: TIM0 base time enable

This bit is used to enable the mechanism of event generation starting from SOF or EOF depending on TIM0EOF. An interrupt is generated if TIM0IE is set in CSI_IER0.

0: Timer 0 clock cycle counter not active

1: Timer 0 clock cycle counter active

Note: Enabling this bit locks TIM0EOF and TIM0VC[1:0] values.

The counting starts from the next frame after setting this bit.

This bit must be written only when the CSI-2 is disabled.

Bit 18 TIM0EOF: TIM0 base time starting from the EOF

This bits is used to select the starting point of the counter on the selected virtual channel.

0: SOF selected e as starting point for the counter

1: EOF selected as starting point for the counter

Note: The write access to this bit is ignored if TIM0EN = 1 in CSI_PRGITR.

This bit must be written only when the CSI-2 is disabled.

Bits 17:16 TIM0VC[1:0]: TIM0 base time linked to a virtual channel

These bits are used to select from which of the virtual channels the TIM0 counter is linked.

00: Virtual channel 0 used to generate the TIM0 event

01: Virtual channel 1 used to generate the TIM0 event

10: Virtual channel 2 used to generate the TIM0 event

11: Virtual channel 3 used to generate the TIM0 event

Note: The write access to these bits is ignored if TIM0EN = 1 in CSI_PRGITR.

These bits must be written only when the CSI-2 is disabled.

Bit 15 LB3EN: Line/byte 3 counter enable

This bit is used to enable the mechanism of event generation at any location in the frame corresponding to the value set in CSI_LB3CFGR. An interrupt is generated if LB3IE is set in CSI_IER0.

0: Line/byte 3 counter stopped

1: Line/byte 3 counter active

Note: Enabling this bit locks LB3VC[1:0] value.

The counter starts from the next frame after setting this bit.

This bit must be set only when the CSI-2 is enabled.

Bit 14 Reserved, must be kept at reset value.

Bits 13:12 LB3VC[1:0]: Line/byte counter 3 linked to a virtual channel

These bits are used to select from which of the virtual channels the line/byte counter 3 is linked.

00: Virtual channel 0 used to generate the line/byte counter 3 event

01: Virtual channel 1 used to generate the line/byte counter 3 event

10: Virtual channel 2 used to generate the line/byte counter 3 event

11: Virtual channel 3 used to generate the line/byte counter 3 event

Note: The write access to these bits is ignored if LB3EN = 1 in CSI_PRGITR.

Bit 11 LB2EN: Line/byte 2 counter enable

This bit is used to enable the mechanism of event generation at any location in the frame corresponding to the value set in CSI_LB2CFGR. An interrupt is generated if LB2IE is set in CSI_IER0.

0: Line/byte 2 counter stopped

1: Line/byte 2 counter active

Note: Enabling this bit locks LB2VC[1:0] value.

The counter starts from the next frame after setting this bit.

This bit must be set only when the CSI-2 is enabled.

Bit 10 Reserved, must be kept at reset value.

Bits 9:8 LB2VC[1:0]: Line/byte counter 2 linked to a virtual channel

These bits are used to select from which of the virtual channels the line/byte counter 2 is linked.

00: Virtual channel 0 used to generate the line/byte counter 2 event

01: Virtual channel 1 used to generate the line/byte counter 2 event

10: Virtual channel 2 used to generate the line/byte counter 2 event

11: Virtual channel 3 used to generate the line/byte counter 2 event

Note: The write access to these bits is ignored if LB2EN = 1 in CSI_PRGTR.

Bit 7 LB1EN: Line/byte 1 counter enable

This bit is used to enable the mechanism of event generation at any location in the frame corresponding to the value set in CSI_LB1CFGR. An interrupt is generated if LB1IE is set in CSI_IER0.

0: Line/byte 1 counter stopped

1: Line/byte 1 counter active

Note: Enabling this bit locks LB1VC[1:0] value.

The counter starts from the next frame after setting this bit.

This bit must be set only when the CSI-2 is enabled.

Bit 6 Reserved, must be kept at reset value.

Bits 5:4 LB1VC[1:0]: Line/byte counter 1 linked to a virtual channel

These bits are used to select from which of the virtual channels the line/byte counter 1 is linked.

00: Virtual channel 0 used to generate the line/byte counter 1 event

01: Virtual channel 1 used to generate the line/byte counter 1 event

10: Virtual channel 2 used to generate the line/byte counter 1 event

11: Virtual channel 3 used to generate the line/byte counter 1 event

Note: The write access to these bits is ignored if LB1EN = 1 in CSI_PRGTR.

Bit 3 LB0EN: Line/byte 0 counter enable

This bit is used to enable the mechanism of event generation at any location in the frame corresponding to the value set in CSI_LB0CFGR. An interrupt is generated if LB0IE is set in CSI_IER0.

0: Line/byte 0 counter stopped

1: Line/byte 0 counter active

Note: Enabling this bit locks LB0VC[1:0] value.

The counter starts from the next frame after setting this bit.

This bit must be set only when the CSI-2 is enabled.

Bit 2 Reserved, must be kept at reset value.

Bits 1:0 LB0VC[1:0]: Line/byte counter 0 linked to a virtual channel

These bits are used to select from which of the virtual channels the line/byte counter 0 is linked.

00: Virtual channel 0 used to generate the line/byte counter 0 event

01: Virtual channel 1 used to generate the line/byte counter 0 event

10: Virtual channel 2 used to generate the line/byte counter 0 event

11: Virtual channel 3 used to generate the line/byte counter 0 event

Note: The write access to these bits is ignored if LB0EN = 1 in CSI_PRGITER.

50.9.11 CSI-2 Host watchdog register (CSI_WDR)

Address offset: 0x78

Reset value: 0x0000 0000

Bit 31Bit 30Bit 29Bit 28Bit 27Bit 26Bit 25Bit 24Bit 23Bit 22Bit 21Bit 20Bit 19Bit 18Bit 17Bit 16
313029282726252423 CNT[31:16]22212019181716
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
151413121110987 CNT[15:0]6543210
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
Bits 31:0CNT[31:0]: Watchdog counter
31302928272625242322212019181716
Res.SYNCWDSPKTIDCECCECCCRC
ERRIERes.Res.CCFIF
ERRIEERRIEERRIEERRIEERRIEERRIEOFIERes.Res.Res.Res.SPKTIE
rwrwrwrwrwrwrwrwrw
1514131211109876543210
EOF3EOF2EOF1EOF0SOF3SOF2SOF1SOF0TIM3TIM2TIM1TIM0LB3LB2LB1LB0
IEIEIEIEIEIEIEIEIEIEIEIEIEIEIEIE
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
Bit 30SYNCERRIE: Invalid synchronization error interrupt enable
RM0457 Rev 52795/5881

Bits 31:0 CNT[31:0]: Watchdog counter

These bits contains the maximum number of clock cycles (clk_proc) between an EOF and a SOF for a given channel before triggering an interrupt if WDERRIE = 1 in CSI_IER0.

The value 0x000000 disables the watchdog counter.

50.9.12 CSI-2 Host interrupt enable register 0 (CSI_IER0)

Address offset: 0x80

Reset value: 0x0000 0000

Bit 31 Reserved, must be kept at reset value.

Bit 30 SYNCERRIE: Invalid synchronization error interrupt enable

This bit enables the interrupt generation when an invalid synchronization is detected.

It can be a SOF short packet during a frame, or and EOF short packet during an inter-frame.

0: Interrupt on invalid synchronization error disabled

1: Interrupt on invalid synchronization error enabled

Bit 5 TIM1IE: Timer 1 interrupt enable

This bit enables the interrupt generation from the timer 1 linked to the virtual channel number configured by TIM1VC in CSI_PRGITR. The interrupt raises when the timer 1 value reaches the value configured in CSI_TIM1CFGR.

0: Timer 1 interrupt disabled

1: Timer 1 interrupt enabled

Bit 4 TIM0IE: Timer 0 interrupt enable

This bit enables the interrupt generation from the timer 0 linked to the virtual channel number configured by TIM0VC in CSI_PRGITR. The interrupt raises when the timer 0 value reaches the value configured in CSI_TIM0CFGR.

0: Timer 0 interrupt disabled

1: Timer 0 interrupt enabled

Bit 3 LB3IE: Line/byte counter 3 interrupt enable

This bit enables the interrupt generation when the active frame of the virtual channel configured by LB3VC in CSI_PRGITR reaches the line/byte number programmed in CSI_LB3CFGR.

Bit 2 LB2IE: Line/byte counter 2 interrupt enable

This bit enables the interrupt generation when the active frame of the virtual channel configured by LB2VC in CSI_PRGITR reaches the line/byte number programmed in CSI_LB2CFGR.

Bit 1 LB1IE: Line/byte counter 1 interrupt enable

This bit enables the interrupt generation when the active frame of the virtual channel configured by LB1VC in CSI_PRGITR reaches the line/byte number programmed in CSI_LB1CFGR.

Bit 0 LB0IE: Line/byte counter 0 interrupt enable

This bit enables the interrupt generation when the active frame of the virtual channel configured by LB0VC in CSI_PRGITR reaches the line/byte number programmed in CSI_LB0CFGR.

50.9.13 CSI-2 Host interrupt enable register 1 (CSI_IER1)

Address offset: 0x84

Reset value: 0x0000 0000

Bit 31Bit 30Bit 29Bit 28Bit 27Bit 26Bit 25Bit 24Bit 23Bit 22Bit 21Bit 20Bit 19Bit 18Bit 17Bit 16
31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211 ESYN109876543210
ESOTESYNCESOT
Res.Res.Res.ECTRLCEESCESOTEESCESOT
DL1IERes.Res.Res.ECTRL
SYNCESCSYNC
DL1IEESCDL1IEDL0IEDL0IEDL0IE
DL1IEDL0IEDL0IE
rwrwrwrwrwrwrwrwrwrw

Bits 31:13 Reserved, must be kept at reset value.

Bit 0 ESOTDL0IE: SOT error interrupt enable on lane 0

This bit enables the interrupt generation when the high-speed SOT leader sequence is corrupted in a such way that the proper synchronization can still be achieved.

0: Lane 0 SOT interrupt error disabled

1: Lane 0 SOT interrupt error enabled

50.9.14 CSI-2 Host status register 0 (CSI_SR0)

Address offset: 0x90

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.SYNC
ERRF
WD
ERRF
SPKT
ERRF
ID
ERRF
CECC
ERRF
ECC
ERRF
CRC
ERRF
Res.Res.CCFIF
OFF
VC3
STATE
F
VC2
STATE
F
VC1
STATE
F
VC0
STATE
F
SPKTF
rrrrrrrrrrrrr
1514131211109876543210
EOF3
F
EOF2
F
EOF1
F
EOF0
F
SOF3
F
SOF2
F
SOF1
F
SOF0
F
TIM3
F
TIM2
F
TIM1
F
TIM0
F
LB3
F
LB2
F
LB1
F
LB0
F
rrrrrrrrrrrrrrrr

Bit 31 Reserved, must be kept at reset value.

Bit 30 SYNCERRF: Invalid synchronization error flag

This bit indicates an invalid synchronization is detected. It can be a SOF short packet during a frame, or and EOF short packet during an inter-frame.

Bit 29 WDERRF: Watchdog error flag

This bit indicates that the time between two packets for a virtual channel is longer than the programmed watchdog.

Bit 28 SPKTERRF: Short packet error flag

This bit indicates a reception of a shorter packet than expected.

Bit 27 IDERRF: Data type ID error flag

This bit indicates a detection of a reserved data type.

Bit 26 CECCERRF: Corrected ECC error flag

This bit indicates a corrected ECC error detection took place in the frame.

Bit 25 ECCERRF: ECC error flag

This bit indicates that an ECC error has been detected.

Bit 24 CRCERRF: CRC error flag

This bit indicates a CRC error detection on a long packet reception.

Bits 23:22 Reserved, must be kept at reset value.

Bit 21 CCFIFOFF: Clock changer FIFO full flag

This bit indicates a FIFO full detection in the clock changer.

Bit 20 VC3STATEF: Virtual channel 3 state flag

This bit indicates the state of the virtual channel 3.

0: Virtual channel inactive

1: Virtual channel active

Bit 3 LB3F: Line/byte counter 3 flag

This bit notifies that the active frame of the virtual channel configured by LB3VC in CSI_PRGITER has reached the line/byte number programmed in th CSI_LB3CFGR.

Bit 2 LB2F: Line/byte counter 2 flag

This bit notifies that the active frame of the virtual channel configured by LB2VC in CSI_PRGITER has reached the line/byte number programmed in CSI_LB2CFGR.

Bit 1 LB1F: Line/byte counter 1 flag

This bit notifies that the active frame of the virtual channel configured by LB1VC in CSI_PRGITER has reached the line/byte number programmed in CSI_LB1CFGR.

Bit 0 LB0F: Line/byte counter 0 flag

This bit notifies that the active frame of the virtual channel configured by LB0VC in CSI_PRGITER has reached the line/byte number programmed in CSI_LB0CFGR.

50.9.15 CSI-2 Host status register 1 (CSI_SR1)

Address offset: 0x94

Reset value: 0x0000 0000

31302928272625242322212019181716
ACT CLFULPN CLFULPN ACTFSTOP CLFRes.ULPN DL1FSTOP DL1FSKCAL DL1FSYNC DL1FACT DL1FRes.ULPN DL0FSTOP DL0FSKCAL DL0FSYNC DL0FACT DL0F
rrrrrrrrrrrrrr
1514131211109876543210
Res.Res.Res.ECTRL DL1FESYN C ESC DL1FEESC DL1FESOT SYNC DL1FESOT DL1FRes.Res.Res.ECTRL DL0FESYNC ESC DL0FEESC DL0FESOT SYNC DL0FESOT DL0F
rrrrrrrrrr

Bit 31 ACTCLF: D-PHY_RX receiver clock active flag

This bit indicates the status of RxClkactiveHs D-PHY_RX signal.

Bit 30 ULPNCLF: D-PHY_RX receiver Ultra-Low power state (not) on clock lane.

This bit indicates the status of RxUlpsClkNot D-PHY_RX signal.

Bit 29 ULPNACTF: D-PHY_RX receiver ULP state (not) active

This bit indicates the status of UlpsactiveNotC D-PHY_RX signal.

Bit 28 STOPCLF: D-PHY_RX receiver in stop state for the clock lane

This bit indicates the status of StopStateC D-PHY_RX signal.

Bit 27 Reserved, must be kept at reset value.

Bit 26 ULPNDL1F: D-PHY_RX receiver ultra-low-power state (not) active on data lane 1

This bit indicates the status of UlpsActiveNot_D_lane1 D-PHY_RX signal.

Bit 25 STOPDL1F: D-PHY_RX receiver data lane 1 in stop state

This bit indicates the status of StopState_D_lane1 D-PHY_RX signal.

Bit 24 SKCALDL1F: D-PHY_RX lane 1 high-speed skew calibration

This bit indicates the status of RxSkewCalHS_lane1 D-PHY_RX signal.

Bit 23 SYNCDL1F: D-PHY_RX lane 1 receiver synchronization observed

This bit indicates the status of RXSyncHS_lane1 D-PHY_RX signal.

50.9.16 CSI-2 Host flag clear register 0 (CSI_FCR0)

Address offset: 0x100

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.CSYN
CERR
F
CWD
ERRF
CSPKT
ERRF
CID
ERRF
CCEC
C
ERRF
CECC
ERRF
CCRC
ERRF
Res.Res.CCCFI
FOFF
Res.Res.Res.Res.CSPKT
F
wwwwwwwww
1514131211109876543210
CEOF3
F
CEOF2
F
CEOF1
F
CEOF0
F
CSOF3
F
CSOF2
F
CSOF1
F
CSOF0
F
CTIM3
F
CTIM2
F
CTIM1
F
CTIM0
F
CLB3
F
CLB2
F
CLB1
F
CLB0
F
wwwwwwwwwwwwwwww

Bit 31 Reserved, must be kept at reset value.

Bit 30 CSYNCERRF: Clear invalid synchronization error flag
Write 1 clears SYNCERRF flag in CSI_SR0.

Bit 29 CWDERRF: Clear watchdog error flag
Write 1 clears WDERRF flag in CSI_SR0.

Bit 28 CSPKTERRF: Clear short packet error flag
Write 1 clears SPKTERRF flag in CSI_SR0.

Bit 27 CIDERRF: Clear data type ID error flag
Write 1 clears CIDERRF flag in CSI_SR0.

Bit 26 CCECCERRF: Clear corrected ECC error flag
Write 1 clears CCECCERRF flag in CSI_SR0.

Bit 25 CECCERRF: Clear ECC error flag
Write 1 clears CECCERRF flag in CSI_SR0.

Bit 24 CCRCERRF: Clear CRC error flag
Write 1 clears CRCERRF flag in CSI_SR0.

Bits 23:22 Reserved, must be kept at reset value.

Bit 21 CCCFIFOFF: Clear clock changer FIFO full flag
Write 1 clears CCFIFOFF flag in CSI_SR0.

Bits 20:17 Reserved, must be kept at reset value.

Bit 16 CSPKTF: Clear short packet flag
Write 1 clears SPKTF flag in CSI_SR0.

Bit 15 CEOF3F: Clear EOF flag for virtual channel 3
Write 1 clears EOF3F flag in CSI_SR0.

Bit 14 CEOF2F: Clear EOF flag for virtual channel 2
Write 1 clears EOF2F flag in CSI_SR0.

Bit 13 CEOF1F: Clear EOF flag for virtual channel 1
Write 1 clears EOF1F flag in CSI_SR0.

Bit 12 CEOF0F: Clear EOF flag for virtual channel 0
Write 1 clears EOF0F flag in CSI_SR0.

50.9.17 CSI-2 Host flag clear register 1 (CSI_FCR1)

Address offset: 0x104

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.CECTRLDL1FCESYNCESC DL1FCEESC DL1FCESOTSYNC DL1FCESOTDL1FRes.Res.Res.CECTRLDL0FCESYNCESC DL0FCEESC DL0FCESOTSYNC DL0FCESOTDL0F
wwwwwwwwww

Bits 31:13 Reserved, must be kept at reset value.

50.9.18 CSI-2 Host short packet data field register (CSI_SPDFR)

Address offset: 0x110

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.VCHANNEL[1:0]DATATYPE[5:0]
rrrrrrrr
1514131211109876543210
DATAFIELD[15:0]
rrrrrrrrrrrrrrrr

Bits 31:24 Reserved, must be kept at reset value.

Bits 23:22 VCHANNEL[1:0]: Virtual channel

This bit indicates which is the virtual channel number decoded in the last generic short packet data field reception. Write to this bit has no effect.

Bits 21:16 DATATYPE[5:0]: Data type class

This bit indicates which is the data type class and subclass (according to the MIPI specification for CSI-2) decoded in the last generic short packet data field reception. Write to this bit has no effect.

Bits 15:0 DATAFIELD[15:0]: Data field

This bit indicates which is the current data field decoded in the last generic short packet data field reception. Write to this bit has no effect.

50.9.19 CSI-2 Host error register 1 (CSI_ERR1)

Address offset: 0x114

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.IDVCERR[1:0]IDDTERR[5:0]
rrrrrrrr
1514131211109876543210
CECCVCERR[1:0]CECCDTERR[5:0]CRCVCERR[1:0]CRCDTERR[5:0]
rrrrrrrrrrrrrrrr

Bits 31:24 Reserved, must be kept at reset value.

Bits 23:22 IDVCERR[1:0]: Virtual channel having ID error

This bit indicates for which virtual channel an ID error has been detected.

IDERRF is set in CSI_SR0 to highlight the error.

Bits 21:16 IDDTERR[5:0]: Data type in error

This bit indicates for which data type an ID error has been detected.

IDERRF is set in CSI_SR0 to highlight the error.

Bits 15:14 CECCVCERR[1:0]: Virtual channel having a corrected ECC error

This bit indicates for which virtual channel a corrected ECC error has been detected.

CECCERRF is set in CSI_SR0 to highlight the error.

Bits 13:8 CECCDTERR[5:0]: Data type having a corrected ECC error

This bit indicates for which data type a corrected ECC error has been detected.

CECCERRF is set in CSI_SR0 to highlight the error.

Bits 7:6 CRCVCERR[1:0]: Virtual channel having a CRC error

This bit indicates for which virtual channel a CRC error has been detected.

CRCERRF is set in CSI_SR0 to highlight the error.

Bits 5:0 CRCDTERR[5:0]: Data type having a CRC error

This bit indicates for which data type a CRC error has been detected.

CRCERRF is set in CSI_SR0 to highlight the error.

50.9.20 CSI-2 Host error register 2 (CSI_ERR2)

Address offset: 0x118

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.SYNCVCERR
[1:0]
WDVCERR
[1:0]
rrrr
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.SPKTVCERR
[1:0]
SPKTDTERR
[5:0]
rrrrrrrr

Bits 31:20 Reserved, must be kept at reset value.

Bits 19:18 SYNCVCERR[1:0]: Virtual channel having synchronization error

This bit indicates for which virtual channel a synchronization error has been detected.
SYNCERRF is set in CSI_SR0 to highlight the error.

Bits 17:16 WDVCERR[1:0]: Virtual channel having a watchdog error

This bit indicates for which virtual channel a watchdog error has been detected.
WDERRF is set in CSI_SR0 to highlight the error.

Bits 15:8 Reserved, must be kept at reset value.

Bits 7:6 SPKTVCERR[1:0]: Virtual channel having a short packet error

This bit indicates for which virtual channel a short packet error has been detected.
SPKTERRF is set in CSI_SR0 to highlight the error.

Bits 5:0 SPKTDTERR[5:0]: Data type having a short packet error

This bit indicates for which data type a shorter packet than expected error has been detected.
SPKTERRF is set in CSI_SR0 to highlight the error.

50.9.21 CSI-2 Host hardware configuration register (CSI_HHWCFGR)

Address offset: 0x0FF0

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.TECHNO[3:0]
rrrr

Bits 31:4 Reserved, must be kept at reset value.

Bits 3:0 TECHNO[3:0]: Technology

This field returns the technology used.

0x0: Technology information is not provided.

0x1: Reserved for 40nm PHY

0x2: 16FF Synopsys PHY

50.9.22 CSI-2 Host version register (CSI_HVERR)

Address offset: 0x0FF4

Reset value: 0x0000 0010

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.MAJREV[3:0]MINREV[3:0]
rrrrrrrr

Bits 31:8 Reserved, must be kept at reset value.

Bits 7:4 MAJREV[3:0]: Major revision

This field returns the major revision of the CSI-2 Host.

Bits 3:0 MINREV[3:0]: Major revision

This field returns the minor revision of the CSI-2 Host.

50.9.23 CSI-2 Host identification register (CSI_HPIDR)

Address offset: 0x0FF8

Reset value: 0x0016 2011

31302928272625242322212019181716
ID[31:16]
rrrrrrrrrrrrrrrr
1514131211109876543210
ID[15:0]
rrrrrrrrrrrrrrrr

Bits 31:0 ID[31:0]: Identification code

This field returns the identification code of the CSI-2 Host.

50.9.24 CSI-2 Host size identification register (CSI_HSIDR)

Address offset: 0x0FFC

Reset value: 0xA3C5 DD04

31302928272625242322212019181716
SID[31:16]
rrrrrrrrrrrrrrrr
1514131211109876543210
SID[15:0]
rrrrrrrrrrrrrrrr

Bits 31:0 SID[31:0]: Size and ID This field returns the size and the ID of the CSI-2 Host.

50.10 CSI PHY registers

50.10.1 CSI PHY reset control register (CSI_PRCR)

Address offset: 0x1000

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PENRes.
rw

Bits 31:2 Reserved, must be kept at reset value. Bit 1 PEN: When set to 0, this bit places the digital section of the D-PHY in the reset state. 0: PHY is disabled (in reset state). 1: PHY is enabled (out of reset state). Bit 0 Reserved, must be kept at reset value.

50.10.2 CSI PHY mode control register (CSI_PMCR)

Address offset: 0x1004

Reset value: 0x0001 1003

RM0457 Bit 18 Bit 17 Bit 16 Bit 6 Bit 5 Bit 4DEDF DISTURBF PROGFAIL OTPSEC OTPERR OTPNVIR: Disturb flag : Programming failed : OTP with error : OTP not virgin
31 30 292827 26 25 24 23 22 21 20 19 18 17 16
Res. Res. Res.Res.Res. Res. Res. Res. Res. Res. Res. Res. Res. Res. Res. TUEX DL0 rw
15 14 131211 10 9 8 7 6 5 4 3 2 1 0
Res. Res. Res.TUESFRXM FRXM
DL0Res. Res. Res. RTDL0 Res. Res. Res. DTDL Res. FTXSM
DL0 DL1 DL0
rwrw rw rw rw rw
Bit 16TUEXDL0: Tx ULP exit sequence data lane 0
Bit 12TUESDL0: Tx ULP escape-mode data lane 0
Bit 8RTDL0: Turn-around request data lane 0 0: No request
Bit 4DTDL: Disable turn-around data lane 0 0: Disabled
Bit 2FTXSMDL01: Enabled : Force to Tx Stop mode the data lane 0 0: Disabled 1: Enabled
Bit 1FRXMDL1: Force to Rx mode the data lane 1 0: Disabled 1: Enabled
Bit 0FRXMDL0: Force to Rx mode the data lane 0 0: Disabled 1: Enabled
RM0457 Rev 5 2811/ 5881

Bits 31:17 Reserved, must be kept at reset value.

Bit 16 TUEXDL0: Tx ULP exit sequence data lane 0

This bit initiates the transmission of the ULP exit sequence.

Bits 15:13 Reserved, must be kept at reset value.

Bit 12 TUESDL0: Tx ULP escape-mode data lane 0

Bits 11:9 Reserved, must be kept at reset value.

Bit 8 RTDL0: Turn-around request data lane 0

This bit is used to indicate that the protocol layer needs to turn the lane around, allowing from the other side to start transmitting the data.

0: No request

1: Request for turn-around for DL0

Bits 7:5 Reserved, must be kept at reset value.

Bit 4 DTDL: Disable turn-around data lane 0

This bit is used to prevent the bi-directional lane from processing a turn-around request in the lane interconnect

0: Disabled

1: Enabled

Bit 3 Reserved, must be kept at reset value.

Bit 2 FTXSMDL0: Force to Tx Stop mode the data lane 0

0: Disabled

1: Enabled

Bit 1 FRXMDL1: Force to Rx mode the data lane 1

Module 0 into receive mode/wait for stop state.

0: Disabled

1: Enabled

Bit 0 FRXMDL0: Force to Rx mode the data lane 0

Module 0 into receive mode/wait for stop state.

0: Disabled

1: Enabled

50.10.3 CSI PHY frequency control register (CSI_PFCR)

Address offset: 0x1008

Reset value: 0x0000 0017

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.DLD
rw
1514131211109876543210
Res.HSFR[6:0]Res.Res.CCFR[5:0]
rwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:17 Reserved, must be kept at reset value.

Bit 16 DLD: Data lane direction of lane 0

0: Rx

1: Tx

Bit 15 Reserved, must be kept at reset value.

Bits 14:8 HSFR[6:0]: PHY high-speed frequency range selection

Must be set when the CSI PHY is in power-down, and must not change during operation.

Bits 7:6 Reserved, must be kept at reset value.

Bits 5:0 CCFR[5:0]: Configuration clock frequency range selection

Must be set at value = round (Fcfg_clk(MHz) - 17) * 4.

50.10.4 CSI PHY test control register 0 (CSI_PTCR0)

Address offset: 0x1010

Reset value: 0x0000 0001

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.TRSENTCKEN
rwrw

Bits 31:2 Reserved, must be kept at reset value.

Bit 1 TRSEN: Test-interface reset enable for the TDI bus into the PHY

Bit 0 TCKEN: Test-interface clock enable for the TDI bus into the PHY

50.10.5 CSI PHY test control register 1 (CSI_PTCR1)

Address offset: 0x1014

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.TWM
rw
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.TDI[7:0]
rwrwrwrwrwrwrwrw

Bits 31:17 Reserved, must be kept at reset value.

Bit 16 TWM: Test-interface write mode selector

0: Data write operation is set on the rising edge of the testclk signal.

1: Address write operation is set on the falling edge of the testclk signal.

Bits 15:8 Reserved, must be kept at reset value.

Bits 7:0 TDI[7:0]: Test-interface data in

50.10.6 CSI PHY test status register (CSI_PTSR)

Address offset: 0x1018

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.TDO[7:0]
rrrrrrrr

Bits 31:8 Reserved, must be kept at reset value.

Bits 7:0 TDO[7:0]: CSI PHY test interface data output bus for read-back and internal probing functionalities

50.10.7 CSI-2 Host hardware configuration register (CSI_HWCFGR)

Address offset: 0x1FF0

Reset value: 0x0000 0022

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.LANES[3:0]TECHNO[3:0]
rrrrrrrr
ST logo
ST logo

Bits 31:8 Reserved, must be kept at reset value.

Bits 7:4 LANES[3:0]: Amount of CSI data lanes (excluding the clock lane)

Bits 3:0 TECHNO[3:0]: Technology

50.10.8 CSI-2 Host version register (CSI_VERR)

Address offset: 0x1FF4

Reset value: 0x0000 0010

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.MAJREV[3:0]MINREV[3:0]
rrrrrrrr

Bits 31:8 Reserved, must be kept at reset value.

Bits 7:4 MAJREV[3:0]: Major revision

This field returns the major revision of the CSI-2 Host.

Bits 3:0 MINREV[3:0]: Major revision

This field returns the minor revision of the CSI-2 Host.

50.10.9 CSI-2 Host identification register (CSI_IPIDR)

Address offset: 0x1FF8

Reset value: 0x0016 2011

31302928272625242322212019181716
ID[31:16]
rrrrrrrrrrrrrrrr
1514131211109876543210
ID[15:0]
rrrrrrrrrrrrrrrr

Bits 31:0 ID[31:0]: Identification code

This field returns the identification code of the CSI-2 Host.

50.10.10 CSI-2 Host size identification register (CSI_SIDR)

Address offset: 0x1FFC

Reset value: 0xA3C5 DD08

31302928272625242322212019181716
SID[31:16]
rrrrrrrrrrrrrrrr
1514131211109876543210
SID[15:0]
rrrrrrrrrrrrrrrr

Bits 31:0 SID[31:0]: Size and ID

This field returns the size and the ID of the CSI-2 Host.

50.11 CSI-2 Host and PHY register map

Table 489. CSI-2 Host and PHY register map and reset values

OffsetRegister name313029282726252423222120191817161514131211109876543210
0x00CSI_CRResResResResResResResResResResResResResResResResVC3STOPVC3STARTResResVC2STOPVC2STARTResResVC1STOPVC1STARTResResVC0STOPVC0STARTResCSIEN
Reset value000000000
0x04CSI_PCRResResResResResResResResResResResResResResResResResResResResResResResResResResResDL1ENDL0ENCLENPWRDOWN
Reset value00000
0x08-0x0CReservedReserved
0x10 + 0x10*x (x=0 to 3)CSI_VCxCFGR1ResResResDT0FT[4:0]ResResDT0[5:0]ResResResResResResCDTFT[4:0]DT6ENDT5ENDT4ENDT3ENDT2ENDT1ENDT0ENALLDT
Reset value000000000000000000000
0x14 + 0x10*x (x=0 to 3)CSI_VCxCFGR2ResResResDT2FT[4:0]ResResDT2[5:0]ResResResResResResDT1FT[4:0]ResResDT1[5:0]
Reset value0000000000000000000
0x18 + 0x10*x (x=0 to 3)CSI_VCxCFGR3ResResResDT4FT[4:0]ResResDT4[5:0]ResResResResResResDT3FT[4:0]ResResDT3[5:0]
Reset value0000000000000000000
0x1C + 0x10*x (x=0 to 3)CSI_VCxCFGR4ResResResDT6FT[4:0]ResResDT6[5:0]ResResResResResResDT5FT[4:0]ResResDT5[5:0]
Reset value0000000000000000000
0x50 + 0x04*x (x=0 to 3)CSI_LBxCFGRLINECNT[15:0]BYTECNT[15:0]
Reset value00000000000000000000000000000000
ST logo
ST logo

Table 489. CSI-2 Host and PHY register map and reset values (continued)

OffsetRegister name313029282726252423222120191817161514131211109876543210
0x60 + 0x04*x (x=0 to 3)CSI_TIMxCFGRRes.Res.Res.Res.Res.Res.Res.COUNT[24:0]
Reset value0000000000000000000000000
0x70CSI_LMCFGRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.DL1MAP[2:0]Res.DL0MAP[2:0]Res.Res.Res.LANENB[2:0]Res.Res.Res.Res.Res.Res.Res.Res.Res.
Reset value01000010010
0x74CSI_PRGITRTIM3ENTIM3EOFTIM3VC[1:0]TIM2ENTIM2EOFTIM2VC[1:0]TIM1ENTIM1EOFTIM1VC[1:0]TIM0ENTIM0EOFTIM0VC[1:0]LB3ENRes.LB3VC[1:0]LB2ENRes.LB2VC[1:0]LB1ENRes.LB1VC[1:0]LB0ENRes.LB0VC[1:0]
Reset value0000000000000000000000000000
0x78CSI_WDRCNT[31:0]
Reset value00000000000000000000000000000000
0x7CReservedReserved
0x80CSI_IER0Res.SYNCERRIEWDERRIESPKTERRIEIDERRIECECCERRIEECCERRIECRCERRIERes.Res.CCFIFOFIERes.Res.Res.Res.SPKTIEEOF4IEEOF3IEEOF2IEEOF1IESOF3IESOF2IESOF1IESOF0IETIM3IETIM2IETIM1IETIM0IELB3IELB2IELB1IELB0IE
Reset value0000000000000000000000000
0x84CSI_IER1Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.ECTRLDL1IEESYNCESCDL1IEEESCDL1IEESOTSYNCDL1IEESOTDL1IERes.Res.Res.ECTRLDL0IEESYNCESCDL0IEEESCDL0IEESOTSYNCDL0IEESOTDL0IE
Reset value0000000000
0x88-0x8CReservedReserved
0x90CSI_SR0Res.SYNCERRFWDERRFSPKTERRFIDERRFCECCERRFECCERRFCRCERRFRes.Res.CCFIFOFFVC3STATEFVC2STATEFVC1STATEFVC0STATEFSPKTFEOF3FEOF2FEOF1FEOF0FSOF3FSOF2FSOF1FSOF0FTIM3FTIM2FTIM1FTIM0FLB3FLB2FLB1FLB0F
Reset value00000000000000000000000000000
0x94CSI_SR1ACTCLFULPNCLFULPNACTFSTOPCLFRes.ULPNDL1FSTOPDL1FSKCALDL1FSYNCDL1FACTDL1FRes.ULPNDL0FSTOPDL0FSKCALDL0FSYNCDL0FACTDL0FRes.Res.Res.ECTRLDL1FESYNCESCDL1FEESCDL1FESOTSYNCDL1FESOTDL1FRes.Res.Res.ECTRLDL0FESYNCESCDL0FEESCDL0FESOTSYNCDL0FESOTDL0F
Reset value000000000000000000000000
0x98-0x9CReservedReserved
0x100CSI_FCR0Res.CSYNCERRFCWDERRFCSPKTERRFCIDERRFCCECCRRFCECCERRFCCRCERRFRes.Res.CCCFIFOFFRes.Res.Res.Res.CSPKTFCEOF3FCEOF2FCEOF1FCEOF0FCSOF3FCSOF2FCSOF1FCSOF0FCTIM3FCTIM2FCTIM1FCTIM0FCLB3FCLB2FCLB1FCLB0F
Reset value0000000000000000000000000
Table 489. CSI-2 Host and PHY register map and reset values (continued)
OffsetRegister
name
313029282726252423222120191817161514131211109876543210
0x104CSI_FCR1Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.CECTRLDL1FCESYNCSCDLFCEESCDL1FCESOTSYNCDL1FCESOTDL1FRes.Res.Res.CECTRLDL0FCESYNCSCDL0FCEESCDL0FCESOTSYNCDL0FCESOTDL0F
Reset value0000000000
0x108-
0x10C
ReservedReserved
0x110CSI_SPDFRRes.Res.Res.Res.Res.Res.Res.Res.VCHANNEL[1:0]DATATYPE[5:0]DATAFIELD[15:0]
Reset value000000000000000000000000
0x114CSI_ERR1Res.Res.Res.Res.Res.Res.Res.Res.IDVCERR[1:0]IDDTERR[5:0]CECCVCERR[1:0]CECCDTERR[5:0]CRCVCERR[1:0]CRCDTERR[5:0]
Reset value000000000000000000000000
0x118CSI_ERR2Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.SYNCVCERR[1:0]WDVCERR[1:0]Res.Res.Res.Res.Res.Res.Res.Res.SPKTVCERR[1:0]SPKTDTERR[5:0]
Reset value000000000000
0x11C-
0xFEC
ReservedReserved
0xFF0CSI_
HHWCFGR
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.TECHNO
[3:0]
Reset value0000
0xFF4CSI_HVERRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.MAJREV
[3:0]
MINREV
[3:0]
Reset value00100000
0xFF8CSI_HIPIDRID[31:0]
Reset value00000000000101100010000000001000
0xFFCCSI_HSIDRSID[31:0]
Reset value10100011110001011101110100000100
0x1000CSI_PRCRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PEN
Reset value0
0x1004CSI_PMCRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.TUEXDL0Res.TUESDL0Res.Res.Res.Res.Res.RTDL0Res.Res.Res.DTDLRes.FTXSMDL0FRXMDL1FRXMDL0
Reset value1100011

Table 489. CSI-2 Host and PHY register map and reset values (continued)

OffsetRegister name313029282726252423222120191817161514131211109876543210
0x1008CSI_PFCRResResResResResResResResResResResResResResResDLDResResHSFR[6:0]ResResCCFR[5:0]
Reset value00000000000010111
0x100CReservedReserved
0x1010CSI_PTCR0ResResResResResResResResResResResResResResResResResResResResResResResResResResResResResTRSENTCKEN
Reset value01
0x1014CSI_PTCR1ResResResResResResResResResResResResResResResTWMResResResResResResResResResTDI[7:0]
Reset value00000000
0x1018CSI_PTSRResResResResResResResResResResResResResResResResResResResResResResResResTDO[7:0]
Reset value00000000
0x101C-0x1FECReservedReserved
0x1FF0CSI_HWCGRResResResResResResResResResResResResResResResResResResResResResResResResLANES[3:0]TECHNO[3:0]
Reset value00100010
0x1FF4CSI_VERRResResResResResResResResResResResResResResResResResResResResResResResResMAJREV[3:0]MINREV[3:0]
Reset value00010000
0x1FF8CSI_IPIDRID[31:0]
Reset value00000000000101100010000000010001
0x1FFCCSI_SIDRSID[31:0]
Reset value1010001110001011101110100001000
Refer to Section 2.4 for the register boundary addresses.