RPI Zero 1.3 + 16mpx IMX519 -> illegal operation

Hi,

Having issue with Arducam IMX519 and Raspberry Pi 1.3 Zero. Started with the latest Raspberry OS Lite (Bullseye, kernel 5.15, February 21st 2023) and working libcamera with OV5647 that was swapped with IMX519.

Followed Quick Start - Arducam Wiki.

  • I installed the driver first (./install_pivariety_pkgs.sh -p imx519_kernel_driver_low_speed). Running libcamera-jpeg -o test.jpg returned:
Preview window unavailable
[1:23:33.907998543] [812]  INFO Camera camera_manager.cpp:299 libcamera v0.0.4+22-923f5d70
[1:23:34.079092329] [813]  INFO RPI raspberrypi.cpp:1476 Registered camera /base/soc/i2c0mux/i2c@1/imx519@1a to Unicam device /dev/media3 and ISP device /dev/media0
[1:23:34.083685297] [812]  INFO Camera camera.cpp:1028 configuring streams: (0) 2328x1748-YUV420
[1:23:34.086664276] [813]  INFO RPI raspberrypi.cpp:851 Sensor: /base/soc/i2c0mux/i2c@1/imx519@1a - Selected sensor format: 2328x1748-SRGGB10_1X10 - Selected unicam format: 2328x1748-pRAA
[1:23:34.123205016] [817]  WARN IPARPI raspberrypi.cpp:801 Could not set AF_MODE - no AF algorithm
Segmentation fault
  • Ran ./install_pivariety_pkgs.sh -p libcamera_dev and ./install_pivariety_pkgs.sh -p libcamera_apps
    libcamera-jpeg -o test.jpg returned:
Preview window unavailable
[1:42:32.150664944] [1681]  INFO Camera camera_manager.cpp:299 libcamera v0.0.0+4224-42eae600
Illegal instruction
  • sudo apt update & sudo apt upgrade took my kernel to 6.1.19+. The drivers for IMX519 and AK7375 are included by default (I’ve manually removed the previous ones). However, the issue is the same as above.

Running out of ideas. Any help please?

@jhud

We have upgraded the focus algorithm.
You need to update the driver of imx519

./install_pivariety_pkgs.sh -p imx519_low_speed

Thanks @Edward

./install_pivariety_pkgs.sh -p imx519_kernel_driver_low_speed gave me:

Cannot find the corresponding package, please send the following information to [email protected]
Hardware Revision: 900093
Kernel Version: 6.1.19+

6.1.19+ is something apt upgrade gave me yesterday (Moving Linux Kernel to 6.1 - Raspberry Pi Forums). Could you add support to that?

In any case, I was on 5.15 two days ago and followed your install instructions but got the same result as with 6.1.

dmesg|grep imx
[    0.153388] platform 20801000.csi: Fixed dependency cycle(s) with /soc/i2c0mux/i2c@1/imx519@1a
[   33.531857] imx519 10-001a: Device found is imx519
[   33.532148] imx519 10-001a: Consider updating driver imx519 to match on endpoints
@raspberrypi:~ $ apt show libcamera-apps
Package: libcamera-apps
Version: 0~git20230309+4def288-1
Status: install ok installed
Priority: optional
Section: video
Maintainer: Arducam <[email protected]>

/boot/config.txt

disable_camera_led=1
camera_auto_detect=0
gpu_mem=128
dtoverlay=w1-gpio
dtoverlay=imx519
dtparam=i2c_vc=on
libcamera-still --list-cameras
Illegal instruction

(at least this worked with original libcamera and gave me the supported resolutions but with the original version any attempt to get picture gave Segmentation fault)

@jhud

We will release the latest kernel driver this week.

Look your libcamera version

dpkg -l | grep libcamera

I also tried the 6.x version, there should be no problem.

Try reinstall libcamera, we recently also update the libcamera.

./install_pivariety_pkgs.sh -p libcamera_dev
./install_pivariety_pkgs.sh -p libcamera_apps

@Edward I just ran again:

./install_pivariety_pkgs.sh -p libcamera_dev
./install_pivariety_pkgs.sh -p libcamera_apps

Result of dpkg -l | grep libcamera afterwards:

ii  libcamera-apps                       0~git20230309+4def288-1          armhf        libcamera-apps
ii  libcamera-dev:armhf                  0~git20230315+42eae600-1         armhf        complex camera support library (development files)
ii  libcamera0:armhf                     0~git20230315+42eae600-1         armhf        complex camera support library
ii  python3-libcamera                    0~git20230302+923f5d70-1         armhf        complex camera support library (Python 3 bindings)

The same problem persists. Could the camera HW be faulty?

@jhud

I have released the latest kernel imx519 driver

please try again

./install_pivariety_pkgs.sh -p imx519_low_speed

@Edward

Thanks. I suppose you meant:

./install_pivariety_pkgs.sh -p imx519_kernel_driver_low_speed

The new driver was installed:

$ ls -al /lib/modules/6.1.19+/kernel/drivers/media/i2c/imx519.ko.xz
-rw-r--r-- 1 root root 8436 Mar 21 04:45 /lib/modules/6.1.19+/kernel/drivers/media/i2c/imx519.ko.xz

However, the problem is still there:

$ libcamera-hello
Preview window unavailable
[0:01:07.900838000] [504]  INFO Camera camera_manager.cpp:299 libcamera v0.0.0+4224-42eae600
Illegal instruction

I haven’t mentioned yet, because I don’t see a connection, that after the fresh install of the OS recently, the only thing I did was some tweaking to reduce sdcard wear (inspired by Reducing SD Card Wear on a Raspberry Pi or Armbian Device # Chris Dzombak). After that my old Raspberry Camera Module 1.3 still works so I don’t think that can impact this.

Thanks

@jhud

You ar right. My fault.

I need some information

Please reboot your device and execute the following command:

wget -O arducam-camera-bug-report https://github.com/ketai-dhr/arducam-camera-bug-report/releases/download/tools/arducam-camera-bug-report
chmod +x ./arducam-camera-bug-report
./arducam-camera-bug-report

This will output an arducam-bug-report.txt in the current directory.

Please send this file to me via google cloud disk or similar platform or email ([email protected])

Thank you for your cooperation and have a nice life.

@Edward Thanks. Just sent it by email.

@jhud

This seems to be possible only in pizero, I will test pizero1.3 tomorrow, please wait.

@Edward I appreciate it and am waiting. Thanks

Hi all,

I have a similar issue using the imx519 + rpi ed B+ (HW 0010).
No issues getting and installing pivariety_pkgs (libcamera_apps/dev+imx519_kernel_driver_low_speed).
glamor is enabled as well but running libcamera-hello I also get “illegal operation”

Could you check the B+ case as well?

Forgot to tell you that I’m also running bullseye+kernel 6.1.19+

@jhud

My raspberry pie zero1.3 camera interface is broken, I have been repairing it for a long time but can’t make it work.

Seems like this hardware is hard to come by now, they are no longer making it.

Can you try with pi3/pi4.

Works very smoothly on these devices, even the pizero 2W works fine.

@LoKau

Sorry, I don’t have this device, can you try it with pizero2W/Pi3/pi4?

@Edward That’s unfortunate ;( I only have RPI Zero 1.3 and need the lowest consumption device for my thing. Looks like I’ll need to return the camera. Or do you see any chance this will come to life?

@Edward, same for me, I only have my B+, other boards aren’t available for the moment.
Could my logs be useful for you? I have them ready if needed.

@jhud @LoKau

I’ll give you a conclusion next week. Please wait.

1 Like

@jhud @LoKau

There is an alternative that you can use first.
Uninstall our libcamera-apps and use the official

sudo apt remove libcamera-apps
sudo apt install libcamera-apps

@Edward Hmm, that I tried initially, see my first post here.

Preview window unavailable
[1:23:33.907998543] [812]  INFO Camera camera_manager.cpp:299 libcamera v0.0.4+22-923f5d70
[1:23:34.079092329] [813]  INFO RPI raspberrypi.cpp:1476 Registered camera /base/soc/i2c0mux/i2c@1/imx519@1a to Unicam device /dev/media3 and ISP device /dev/media0
[1:23:34.083685297] [812]  INFO Camera camera.cpp:1028 configuring streams: (0) 2328x1748-YUV420
[1:23:34.086664276] [813]  INFO RPI raspberrypi.cpp:851 Sensor: /base/soc/i2c0mux/i2c@1/imx519@1a - Selected sensor format: 2328x1748-SRGGB10_1X10 - Selected unicam format: 2328x1748-pRAA
[1:23:34.123205016] [817]  WARN IPARPI raspberrypi.cpp:801 Could not set AF_MODE - no AF algorithm
Segmentation fault

That was still with kernel 5.15 I believe.