---
title: "MIPI CSI-2 Camera Bring-up"
description: "Carrier-board bring-up of a MIPI CSI-2 camera on the E1M and E1M-X SoMs: per-camera LDO setup, lane routing, and the per-backend state of the SDK camera and ISP path."
source: https://docs.alplab.ai/app-notes/an-003-mipi-csi-camera
subtitle: "AN-003 · E1M and E1M-X SoMs"
document: "AN-003"
revision: "0.7"
date: "November 2026"
status: "Preliminary"
pdf: https://docs.alplab.ai/docs-pdf/an-003-mipi-csi-camera-v0.7.pdf
---

# MIPI CSI-2 Camera Bring-up

## 1 Scope {#scope}

This application note covers the carrier-board side of bringing up a MIPI CSI-2 camera: configuring the on-module per-camera LDO, routing the CSI lanes, and building the SDK's `<alp/camera.h>` capture path.

:::warning[Warning:]
**Bench status (Alp SDK™ v0.17.0).** Live capture through `<alp/camera.h>` is bench-verified on E1M-AEN803 (Alif Ensemble E8) on the E1M EVK with RPi-style CSI-2 camera modules (OV9281 and OV5647 raw capture, IMX296 and IMX335 raw capture, and the ISP-Pico path with OV5647), and on E1M-V2M103 with an IMX296LQ (RAW10 through the Linux V4L2 backend). Other sensors and other SoMs are unverified. The `ai-camera-viewer` reference example itself is still build-verified only (its README carries an `[UNTESTED]`-on-hardware marker). The hardware guidance below — LDO sizing, lane routing, pin assignment — is datasheet-backed and safe to design against. Budget bench time for first light on your own sensor.
:::

**Table 1:** Scope summary

| Audience | Firmware engineers integrating a camera sensor into vision workloads. |
|---|---|
| Prerequisites | <strong>QS-</strong> guide completed, RPi-compatible MIPI camera module (e.g. RPi V2 or HQ camera). |
| Outcome | `ai-camera-viewer` builds and flashes against the `<alp/camera.h>` surface. First light on your sensor is your bring-up step. |
| Time | 20 minutes to a flashed image; sensor bring-up is open-ended. |
| Source | `examples/camera-vision/ai-camera-viewer/` in [alp-sdk](https://github.com/alplabai/alp-sdk). |

## 2 Hardware Setup {#hardware-setup}

The table below is **silicon and module hardware**, not a software support matrix. See [Section 3](#isp-status) for what the SDK actually drives today.

**Table 2:** MIPI CSI-2 camera interfaces per family

| SoM family | CSI interfaces + LDO |
|---|---|
| E1M-AEN | 1 × 2-lane CSI (`CSI0`). Per-camera LDO: `+V_CAM0` (`Z34`) + `CAM_VFB0` (`Z33`) divider; a second LDO pair `+V_CAM1` (`AB34`) / `CAM_VFB1` (`AB33`) is available as a general-purpose carrier rail. |
| E1M-X V2N / V2N-M1 | 2 × 4-lane CSI (`CSI0`, `CSI1`). Per-camera LDOs: `+V_CAM0`…`+V_CAM3` with matching `CAM_VFBx` feedback divider. |

Both SoCs carry an on-die ISP block: the Alif Ensemble ISP-Pico (VeriSilicon ISP Nano "Pico") on E4 / E6 / E8 — but not on E3 / E5 / E7 — and an Arm Mali™-C55 on the Renesas RZ/V2N. The SDK drives the ISP-Pico on the Alif Ensemble E8 only; the Renesas ISP is not reachable from the SDK. [Section 3](#isp-status) has the detail.

Place the feedback resistor pair (`R1`, `R2`) **close to the SoM `CAM_VFBx` pin**; long feedback traces invite oscillation. The output voltage is set by:

V<sub>CAM</sub> = 0.6 V × (1 + R<sub>1</sub> / R<sub>2</sub>)

## 3 ISP Status {#isp-status}

**ISP availability differs by SoM.** Do not choose an E6 over an E5, or an E1M-X over an E1M-AEN, expecting the SDK to hand you a working ISP: only the Alif Ensemble E8 (E1M-AEN801 / E1M-AEN803) has a driven ISP today.

**Table 3:** Camera backends and ISP status (SDK v0.17.0)

| Backend | Status |
|---|---|
| Zephyr video (portable, any board with a `video_*` sensor driver) | Sensor pipeline (open / start / stop / capture / release / close) is real code. `alp_camera_configure_isp()` returns `ALP_ERR_NOSUPPORT`: the portable video class has no in-line ISP surface. |
| Alif ISP-Pico (E8 only; not E4 or E6) | Opt-in (`CONFIG_ALP_SDK_CAMERA_ALIF_ISP`, default off; needs the ISP devicetree node). Capture through the ISP, with auto-exposure and auto-white-balance running, is bench-proven on E1M-AEN803 with an OV5647 (`examples/aen/aen-isp-capture`, `examples/aen/aen-isp-ov5647-viewfinder`). Its `alp_camera_configure_isp()` still latches the requested configuration and returns `ALP_OK`, so treat `ALP_OK` as "accepted", not as proof the ISP was reprogrammed. The Alif vendor-extension surface (3A windows, per-channel gain tables, lens-shading LUTs) returns `ALP_ERR_NOSUPPORT` from every entry point. Widening it to E4 / E6 needs explicit backend registrations plus board validation. IMX296 colour is uncalibrated (no AWB / colour-correction table). |
| Renesas V2N N44 ISP (zephyr) | `alp_camera_configure_isp()` and every Renesas vendor-extension ISP call return `ALP_ERR_NOSUPPORT`. The Cortex-A55 owns the CRU, CSI-2 and ISP blocks; the Cortex-M33 has no module for them. |
| Linux V4L2 (`yocto_drv`, any Linux target) | V4L2 plus media-controller backend. `camera_id` N maps to the devicetree alias `alp-camera<N>`; any sensor with a mainline V4L2 subdev driver works with no per-sensor code. Supports `ALP_PIXFMT_GREY8`, `RAW8` and `RAW10` only (colour formats return `ALP_ERR_NOSUPPORT`). RAW10 is bench-verified on E1M-V2M103 with an IMX296LQ; RAW8 is not. |

:::warning[Warning:]
`ALP_OK` from `alp_camera_configure_isp()` never means a Renesas ISP was programmed: on V2N it returns `ALP_ERR_NOSUPPORT`. Check the return code, and do not gate image quality on it on any SoM.
:::

**New:** `alp_camera_get_fps()` returns the frame rate the backend actually settled on at open, in thousandths of a frame per second (29.97 fps reads as 29970). `alp_camera_config_t::fps` is only a request; read the settled value instead of assuming it.

Plan on your sensor delivering the pixel format you need directly, and on doing any 3A or tuning work in your application, except where the ISP-Pico path above applies.

## 4 Software Walkthrough {#software-walkthrough}

```bash
tan build --project examples/camera-vision/ai-camera-viewer
tan flash examples/camera-vision/ai-camera-viewer
```

The example opens an OV5640 stream at 240 × 240 RGB565 via `alp_camera_open()`, runs a person-detect model over the frames, and composes the preview plus bounding boxes with LVGL. Two things to know before you build it:

- It ships **without** a model file, to avoid the binary-blob licence question. Compile your own `.tflite` with Arm's Vela compiler and replace the placeholder buffer in `src/inference_loop.c`.
- Its reference board wiring drives an ST7789 240 × 320 TFT over SPI — not a DSI panel. See **AN-004** for the display side.

If `alp_camera_open()` fails the example does not abort: it logs `camera open failed; running with synthetic frame` and renders a placeholder preview so the UI layout can be checked against a design mock-up. A running demo is therefore **not** on its own evidence that your sensor is streaming — confirm the log line is absent.

## 5 Troubleshooting {#troubleshooting}

- **LDO voltage off**: divider current too low; reduce `R1 + R2` until divider current = 100 × worst-case feedback-pin current (see **DS-AEN-001 §8.7** formula).
- **No CSI link**: differential lanes swapped (P/N reversed) or trace impedance not 100 Ω differential.
- **E1M-AEN hw_rev R2: camera never produces frames on the E1M EVK**: on R2 modules the P and N pads of each CSI-2 lane are swapped (see **E1M-AEN Errata E-01**). On the E1M EVK's 15-pin camera connector J3 an R2 module needs a P/N-crossing adapter: swap pins 13 ↔︎ 14 (D0), 10 ↔︎ 11 (D1) and 7 ↔︎ 8 (CLK) and leave grounds, power and control straight. Without it the camera answers on I<sup>2</sup>C but no frame ever arrives, and the capture call times out. R3 modules carry the corrected pad polarity; read the module hardware revision from the identity EEPROM before applying either rule.
- **Lane skew errors**: lane-to-lane length mismatch > TBD ps.

## 6 References {#references}

- **Example source**: `examples/camera-vision/ai-camera-viewer/` in alp-sdk; API in `include/alp/camera.h`. Bench examples: `examples/aen/aen-camera-firstlight/` (raw first light), `examples/aen/aen-isp-capture/` and `examples/aen/aen-isp-ov5647-viewfinder/` (capture through the ISP-Pico). `examples/aen/aen-isp-regcheck/` is a test-pattern frame test of the ISP, not a sensor capture. Linux camera path: `docs/v2n-camera-csi.md` and `docs/camera-shields.md`. (The earlier `aen-camera-regcheck` example no longer exists.)
- **Hardware Design Guides**: **HG-AEN-001** §8.3, **HG-V2N-001** §6.4 (MIPI CSI-2 routing rules).
- **Datasheet CSI-2 pin tables**: §2.3 in each datasheet.

## 7 Revision History {#revision-history}

**Table 4:** Revision History

<table>
<thead>
<tr><th>Revision</th><th>Changes</th><th>Date</th></tr>
</thead>
<tbody>
<tr>
<td>0.1</td>
<td>
<ul>
<li>Initial draft.</li>
</ul>
</td>
<td>May 2026</td>
</tr>
<tr>
<td>0.2</td>
<td>
<ul>
<li>Updated SDK references to current layout: <ul><li>example path `examples/camera-vision/ai-camera-viewer/`, added `include/alp/camera.h` and the `aen-camera-regcheck` / `aen-isp-regcheck` reg-checks</li> <li>corrected the AEN on-die ISP to the Alif Ensemble ISP-Pico (`vsi,isp-pico`)</li> <li>aligned the stream config with the example (240×240 RGB565).</li></ul></li>
</ul>
</td>
<td>June 2026</td>
</tr>
<tr>
<td>0.3</td>
<td>
<ul>
<li>Corrected the ISP story against alp-sdk source: the ISP-Pico backend registers for E8 only (not an E4/E6/E8 support tier), its Kconfig defaults to `n`, and the devicetree node is disabled — so no ISP offload is reachable today and the vendor-ext camera surface returns `ALP_ERR_NOSUPPORT`.</li>
<li>Separated the genuine E4/E6/E8 ISP hardware metadata from the support story.</li>
<li>Noted that live capture is unproven (no sensor wired on the bench) and that on V2N `configure_isp` returns `ALP_OK` without programming the ISP.</li>
<li>Removed a fabricated expected-output log.</li>
<li>Fixed the Alp SDK repository links (`alpDevs` → `alplabai`).</li>
</ul>
</td>
<td>July 2026</td>
</tr>
<tr>
<td>0.4</td>
<td>
<ul>
<li>Re-verified against Alp SDK<sup>TM</sup> v0.17.0.</li>
<li>Replaced "no ISP offload on any SoM" with the per-backend status: Alif ISP-Pico is bench-proven on E8 and its `configure_isp` still returns `ALP_OK`; on V2N `configure_isp` and every Renesas ISP vendor-extension call return `ALP_ERR_NOSUPPORT` (the earlier text said `ALP_OK`).</li>
<li>Added the Linux V4L2 backend (`yocto_drv`, `alp-camera<N>` alias, GREY8 / RAW8 / RAW10, RAW10 verified on E1M-V2M103 with an IMX296LQ) and `alp_camera_get_fps()`.</li>
<li>Updated the capture bench status.</li>
<li>References now point to `aen-camera-firstlight` and `aen-isp-capture`; `aen-camera-regcheck` was removed and `aen-isp-regcheck` is a test-pattern frame test.</li>
<li>Added the E1M-AEN hw_rev R2 CSI-2 P/N-swap erratum and the P/N-crossing adapter on the E1M EVK J5.</li>
</ul>
</td>
<td>October 2026</td>
</tr>
<tr>
<td>0.5</td>
<td>
<ul>
<li>E1M EVK camera connector corrected for the 2641-R3 board: the 15-pin CSI-2 connector is `J3` (not `J5`).</li>
<li>Lane pins are 13 / 14 (D0), 10 / 11 (D1) and 7 / 8 (CLK); the R2 P/N-crossing adapter pin pairs updated to match.</li>
</ul>
</td>
<td>October 2026</td>
</tr>
<tr>
<td>0.6</td>
<td>
<ul>
<li>Release history: every entry formatted as a bullet list.</li>
</ul>
</td>
<td>October 2026</td>
</tr>
<tr>
<td>0.7</td>
<td>
<ul>
<li>Product name on page 1 links to the product page on alplab.ai.</li>
</ul>
</td>
<td>November 2026</td>
</tr>
</tbody>
</table>
