AR0234 camera XVS trigger pin not working on some Raspberry Pi 5 cameras

I’m really stuck with the external trigger (XVS) pin on my AR0234 cameras. I’ve got 13 of them running on a Raspberry Pi 5, and 5 of them won’t trigger any more. They were working at one point, but after I re-soldered the cable-side connections with brand new connectors, three of those just stopped working.

Here’s what I’ve tried so far:

  • Only soldered the XVS and GND pins (unfortunately I didn’t test triggering before soldering).
  • Triggering works when I drive it from a low-frequency generator, but as soon as I add a resistor into the path (so more current is drawn), triggering fails.
  • Swapped known-good cameras into the “bad” locations and the problem stays with the camera, not the system.
  • Tried different cables, different resistors, different solder jobs, and different ways to route from the level-shifter to the cameras.

The weird part: I measure about 1200 ohms between the XVS pin and GND, but only on the non-working cameras. It’s almost like a path forms between XVS and GND once the current gets high enough. I also posted a longer write-up here: AR0234 Hardware XVS Trigger Problem

Thanks for all that detail. So let me make sure I’ve got the picture right:

  • 13x AR0234 on a Pi 5
  • XVS external trigger works on some units but not others (5 affected)
  • ~1200 ohm continuity between XVS and GND, only on the failing units
  • Triggers fine with a low-frequency generator, but stops once you add a resistor and draw more current
  • Swapping working cameras into the failing positions shows the problem follows the camera

That ~1200 ohm reading between XVS and GND on the bad units is the red flag - it points to a hardware short or leakage path that only shows up under higher current, possibly bad soldering/welds on the camera side. We’re still investigating and I’m checking with our hardware engineers before I give you any soldering instructions.

A few quick questions to narrow this down:

  1. Did you solder all 13 cameras to the pinout, or only some?
  2. Did you ever test external triggering on these before soldering anything?
  3. Is it 3 or 5 cameras that are currently failing the external trigger?

While I’m re-checking the trigger setup, I’ve got a separate problem with a different camera. I have a 16MP camera (board B0371, IMX519) on a Raspberry Pi 3, and every image comes out blurry. I noticed this in the logs:

Running libcamera-still -t 0 --autofocus-mode manual -k:

Preview window unavailable
[0:02:00.005205399] [678] INFO Camera camera_manager.cpp:297 libcamera v0.0.0+4367-ad9428b4
[0:02:00.030943929] [679] ERROR V4L2 v4l2_device.cpp:93 'ak7375 10-000c': Failed to open V4L2 device '/dev/v4l-subdev1': Invalid argument
[0:02:00.031056429] [679] ERROR CameraSensor camera_sensor.cpp:527 'imx519 10-001a': Lens initialisation failed, lens disabled
[0:02:00.103105344] [679] INFO RPI vc4.cpp:444 Registered camera /base/soc/i2c0mux/i2c@1/imx519@1a to Unicam device /dev/media3 and ISP device /dev/media0
[0:02:00.103228678] [679] INFO RPI pipeline_base.cpp:1101 Using configuration file '/usr/share/libcamera/pipeline/rpi/vc4/rpi_apps.yaml'
[0:02:00.104740711] [678] INFO Camera camera.cpp:1033 configuring streams: (0) 2328x1748-YUV420
[0:02:00.105544098] [679] INFO RPI vc4.cpp:572 Sensor: /base/soc/i2c0mux/i2c@1/imx519@1a - Selected sensor format: 2328x1748-SRGGB10_1X10 - Selected unicam format: 2328x1748-pRAA
#0 (0.00 fps) exp 29990.00 ag 2.59 dg 1.33
#1 (30.00 fps) exp 29990.00 ag 2.59 dg 1.28
#2 (30.00 fps) exp 29990.00 ag 2.59 dg 1.28
#3 (30.00 fps) exp 29990.00 ag 2.59 dg 1.28
#4 (30.00 fps) exp 29990.00 ag 3.44 dg 1.00
#5 (30.00 fps) exp 29990.00 ag 3.30 dg 1.00
#6 (30.00 fps) exp 29990.00 ag 3.31 dg 1.00
#7 (30.00 fps) exp 29990.00 ag 3.31 dg 1.00
#8 (30.00 fps) exp 29990.00 ag 3.31 dg 1.00
#9 (30.00 fps) exp 29990.00 ag 3.31 dg 1.00
#10 (30.00 fps) exp 29990.00 ag 3.31 dg 1.00
#11 (30.00 fps) exp 29990.00 ag 3.31 dg 1.00
#12 (30.00 fps) exp 29990.00 ag 3.31 dg 1.00
#13 (30.00 fps) exp 29990.00 ag 3.31 dg 1.00
#14 (30.00 fps) exp 29990.00 ag 3.31 dg 1.00

Earlier I ran libcamera-jpeg -t 1 -n -o test1.jpg and got the same lens init error:

[0:02:57.513760868] [684] INFO Camera camera_manager.cpp:297 libcamera v0.0.0+4367-ad9428b4
[0:02:57.539613776] [685] ERROR V4L2 v4l2_device.cpp:93 'ak7375 10-000c': Failed to open V4L2 device '/dev/v4l-subdev1': Invalid argument
[0:02:57.539727369] [685] ERROR CameraSensor camera_sensor.cpp:527 'imx519 10-001a': Lens initialisation failed, lens disabled
[0:02:57.609053770] [685] INFO RPI vc4.cpp:444 Registered camera /base/soc/i2c0mux/i2c@1/imx519@1a to Unicam device /dev/media2 and ISP device /dev/media0
[0:02:57.609180488] [685] INFO RPI pipeline_base.cpp:1101 Using configuration file '/usr/share/libcamera/pipeline/rpi/vc4/rpi_apps.yaml'
[0:02:57.610802984] [684] INFO Camera camera.cpp:1033 configuring streams: (0) 2328x1748-YUV420
[0:02:57.611594858] [685] INFO RPI vc4.cpp:572 Sensor: /base/soc/i2c0mux/i2c@1/imx519@1a - Selected sensor format: 2328x1748-SRGGB10_1X10 - Selected unicam format: 2328x1748-pRAA
[0:02:58.133271262] [684] INFO Camera camera.cpp:1033 configuring streams: (0) 4656x3496-YUV420 (1) 4656x3496-SRGGB10_CSI2P
[0:02:58.135089123] [685] INFO RPI vc4.cpp:572 Sensor: /base/soc/i2c0mux/i2c@1/imx519@1a - Selected sensor format: 4656x3496-SRGGB10_1X10 - Selected unicam format: 4656x3496-pRAA
Still capture image received

So it still captures the image, but it’s blurry and I can’t get focus to do anything.

Thanks for the full logs. The blur is explained by these two lines:

[0:02:57.539613776] [685] ERROR V4L2 v4l2_device.cpp:93 'ak7375 10-000c': Failed to open V4L2 device '/dev/v4l-subdev1': Invalid argument
[0:02:57.539727369] [685] ERROR CameraSensor camera_sensor.cpp:527 'imx519 10-001a': Lens initialisation failed, lens disabled

The ak7375 is the VCM/lens driver, and when its V4L2 subdev fails to open with ‘Invalid argument’, libcamera disables the lens entirely. That’s why you still get ‘Still capture image received’ but nothing is actually focused. Until that lens init failure is resolved, neither autofocus nor manual focus will do anything.

Did the manual focus command let you move the lens at all, or does it stay blurry no matter what? With -k enabled:

libcamera-still -t 0 --autofocus-mode manual -k
  • “f” triggers one-shot autofocus
  • “a” adds to the lens position, “d” decreases it (minimum step is 1)
  • lens-position x range is 0~15 and supports decimals like 0.25

One thing worth knowing: the IMX519 lens position isn’t calibrated by default, so --lens-position isn’t simply the inverse of distance unless you’re using a calibrated tuning file. I’ve sent you the pi3_imx519.json tuning file through private message - copy it onto the Pi 3 and run libcamera-still -t 0 --tuning-file pi3_imx519.json. Also, these modules are rated for 0-50°C operation, so extreme cold like -20°C would need customization.

I tried the manual focus command with -k, but the image stays blurry and I can’t adjust it to anything sharp. I’m pretty sure it’s down to this line:

ERROR CameraSensor camera_sensor.cpp:527 'imx519 10-001a': Lens initialisation failed, lens disabled

My 12MP camera (board B0308) doesn’t show this error at all, so it seems specific to this 16MP B0371.

Right, that confirms it - as long as the ak7375 subdev fails to open and the lens stays disabled, no amount of focus adjustment will help. The capture side works, but the lens driver never initializes. Let me look into the ak7375 side of this.

While that’s being looked into, I’ve hit a problem with yet another setup: 2x IMX708 102° FOV modules on a Raspberry Pi 5, board code UC-A37 Rev. A.

Running with the tuning file fails and reports ‘no cameras available’:

libcamera-still -t 0 --tuning-file /opt/arducam/imx708-b0311.json
[0:01:06.371210868] [1736] INFO Camera camera_manager.cpp:284 libcamera v0.1.0+246-9fb4698e-dirty (2024-02-27T06:28:07+00:00)
[0:01:06.382499595] [1739] INFO RPI pisp.cpp:662 libpisp version v1.0.4 6e3a53d137f4 14-02-2024 (14:00:12)
[0:01:06.394446489] [1739] WARN RPiSdn sdn.cpp:39 Using legacy SDN tuning - please consider moving SDN inside rpi.denoise
[0:01:06.394842711] [1739] WARN RPiController controller.cpp:176 No algorithm found for "rpi.focus"
[0:01:06.395001881] [1739] ERROR IPARPI pisp.cpp:279 Tuning data file target returned "bcm2835", expected "pisp"
[0:01:06.395013864] [1739] ERROR RPI pipeline_base.cpp:825 Failed to load a suitable IPA library
[0:01:06.395021625] [1739] ERROR RPI pisp.cpp:890 Failed to register camera imx708: -22
[0:01:06.395229098] [1739] INFO RPI pisp.cpp:662 libpisp version v1.0.4 6e3a53d137f4 14-02-2024 (14:00:12)
[0:01:06.398271950] [1739] WARN RPiSdn sdn.cpp:39 Using legacy SDN tuning - please consider moving SDN inside rpi.denoise
[0:01:06.398932579] [1739] WARN RPiController controller.cpp:176 No algorithm found for "rpi.focus"
[0:01:06.399102233] [1739] ERROR IPARPI pisp.cpp:279 Tuning data file target returned "bcm2835", expected "pisp"
[0:01:06.399121680] [1739] ERROR RPI pipeline_base.cpp:825 Failed to load a suitable IPA library
[0:01:06.399133811] [1739] ERROR RPI pisp.cpp:890 Failed to register camera imx708: -22
Made X/EGL preview window
ERROR: *** no cameras available ***

Without the tuning file both cameras work, but the exposure/ISO never changes - it’s always the same. I’ve installed the drivers and I’m using the proper 22-22 pin cables (CB023) for the Pi 5.

The errors give it away:

ERROR IPARPI pisp.cpp:279 Tuning data file target returned "bcm2835", expected "pisp"
ERROR RPI pipeline_base.cpp:825 Failed to load a suitable IPA library
ERROR RPI pisp.cpp:890 Failed to register camera imx708: -22

That tuning file was built for the legacy bcm2835 pipeline, but the Pi 5 uses the pisp pipeline, so the IPA library fails to load and the camera never registers. If your boards are UC-A74 Rev.C, you don’t need a tuning file at all - just run:

libcamera-still -t 0

Docs here: 12MP IMX708 - Arducam Wiki

On the cabling side, the B0309 camera board’s CSI port is 22-pin, so for the Pi 5 you want a 22-22pin cable (CB023).

Just double-checking - my boards actually say UC-A37 Rev. A, not UC-A74 Rev.C. Does that change anything?

Got it, thanks for confirming. With UC-A37 Rev. A the same conclusion applies: if the plain libcamera command already accesses the camera, you can ignore the tuning-file command that was designed for the original B0311. Just use libcamera-still -t 0.

One more thing on these IMX708 modules. Video recording with libcamera-vid produces a weird file - it previews an image for about one frame and then closes. Changing resolution or frame rate doesn’t help. The only thing that let recording actually run was adding --libav-format mpegts:

libcamera-vid -t 10000 -o test.h264

The plain .h264 output is the broken one. Shouldn’t plain .h264 recording work too?

For now, the workaround is to keep using --libav-format mpegts since that’s what’s recording correctly for you. The fact that mpegts works while the plain .h264 container fails points more at the muxing/container step than the camera stream itself, but plain .h264 should still work, so I’ll dig into that further. In the meantime, stick with the mpegts format for recording.