# Raspberry Pi 5 Bookworm

#### Prepare SD card

- Device: Raspberry Pi 5 (Raspberry Pi 5, 500, and Compute Module 5)
- OS: Raspberry Pi OS (64-bit) (tested with release 2025-05-13)

#### Connect CSI2 camera

[![image-1750065886673.jpg](https://wiki.kurokesu.com/uploads/images/gallery/2025-06/scaled-1680-/image-1750065886673.jpg)](https://wiki.kurokesu.com/uploads/images/gallery/2025-06/image-1750065886673.jpg)

#### OS Prepare

Login to your Raspberry device and update it first.

```shell
sudo apt update
sudo apt upgrade -y
```

### IMX462

Camera [462x-CSI-M12x](https://www.kurokesu.com/shop/camera_modules/462x-CSI-M12x)

#### Setup camera

Edit config file:

```shell
sudo nano /boot/firmware/config.txt
# camera_auto_detect=1 --- Find camera_auto_detect=1 and comment it out.

# Paste these lines at the end of the config file
dtoverlay=imx462,cam0,clock-frequency=37125000
camera_auto_detect=0
```

Reboot

#### Test camera

Check if camera is detected

```shell
libcamera-hello --list-cameras

Available cameras
-----------------
0 : imx462 [1920x1080 12-bit RGGB] (/base/axi/pcie@1000120000/rp1/i2c@88000/imx290@1a)
    Modes: 'SRGGB10_CSI2P' : 1280x720 [60.00 fps - (320, 180)/1280x720 crop]
                             1920x1080 [60.00 fps - (0, 0)/1920x1080 crop]
           'SRGGB12_CSI2P' : 1280x720 [60.00 fps - (320, 180)/1280x720 crop]
                             1920x1080 [60.00 fps - (0, 0)/1920x1080 crop]
```

Capture picture to /tmp/test.jpg

```shell
libcamera-jpeg -o /tmp/test.jpg -n

[0:00:18.871385025] [1789]  INFO Camera camera_manager.cpp:326 libcamera v0.5.0+59-d83ff0a4
[0:00:18.878529284] [1792]  INFO RPI pisp.cpp:720 libpisp version v1.2.1 981977ff21f3 29-04-2025 (14:13:50)
[0:00:18.889916414] [1792]  WARN CameraSensor camera_sensor_legacy.cpp:501 'imx462 10-001a': No sensor delays found in static properties. Assuming unverified defaults.
[0:00:18.890301599] [1792]  INFO RPI pisp.cpp:1179 Registered camera /base/axi/pcie@1000120000/rp1/i2c@88000/imx290@1a to CFE device /dev/media3 and ISP device /dev/media0 using PiSP variant BCM2712_C0
Mode selection for 960:540:12:P
    SRGGB10_CSI2P,1280x720/0 - Score: 1125
    SRGGB10_CSI2P,1920x1080/0 - Score: 1375
    SRGGB12_CSI2P,1280x720/0 - Score: 125
    SRGGB12_CSI2P,1920x1080/0 - Score: 375
Stream configuration adjusted
[0:00:18.890887136] [1789]  INFO Camera camera.cpp:1205 configuring streams: (0) 960x540-YUV420 (1) 1280x720-RGGB_PISP_COMP1
[0:00:18.890972340] [1792]  INFO RPI pisp.cpp:1483 Sensor: /base/axi/pcie@1000120000/rp1/i2c@88000/imx290@1a - Selected sensor format: 1280x720-SRGGB12_1X12 - Selected CFE format: 1280x720-PC1R
Mode selection for 1920:1080:12:P
    SRGGB10_CSI2P,1280x720/0 - Score: 3000
    SRGGB10_CSI2P,1920x1080/0 - Score: 1000
    SRGGB12_CSI2P,1280x720/0 - Score: 2000
    SRGGB12_CSI2P,1920x1080/0 - Score: 0
Stream configuration adjusted
[0:00:24.120965985] [1789]  INFO Camera camera.cpp:1205 configuring streams: (0) 1920x1080-YUV420 (1) 1920x1080-RGGB_PISP_COMP1
[0:00:24.124285707] [1792]  INFO RPI pisp.cpp:1483 Sensor: /base/axi/pcie@1000120000/rp1/i2c@88000/imx290@1a - Selected sensor format: 1920x1080-SRGGB12_1X12 - Selected CFE format: 1920x1080-PC1R
Still capture image received
```