Disclaimer: Do not unplug or disturb your Raspberry Pi or camera device while flashing new firmware. If you do, it will brick the camera and will be unusable. If you are uncomfortable doing this, please return your device to your distributor and get a replacement.
There have been some AI Camera production units that have been shipped with an older RP2040 firmware. The instructions in this post will allow you to update the RP2040 firmware to the latest version (v15 at the time of writing).
Preparation
Begin by using a fresh installation of Raspberry Pi OS and ensure your device eeprom/firmware and other software is up-to-date. This will allow the camera auto-detection on boot to work correctly.
To check if your firmware is out-of-date, boot your device with the AI Camera attached and run the following in a terminal window:
If you see the following output:
or
you will need to update to the latest version 15.
If the dmesg output shows a sensible firmware string like fw ver. 14, jump ahead to the Flashing section below. If your dmesg output shows fw ver. 4294967295, please update /boot/firmware/config.txt with the following:
1) Comment out camera_auto_detect=1 if present:2) Add the following to the bottom of the file:3) Reboot
After rebooting, the dmesg output should show a sensible firmware string like fw ver. 14.
Flashing
Once you see a sensible firmware string like fw ver. 14 in dmesg, download imx500_i2c_flash and main_v15.bin from this shared drive and save them onto your Raspberry Pi home directory.
Then, run the flash tool in a terminal window with:
and you should get the following output:
Testing
After completing the flashing, reboot the device and you should see the correct firmware version reported from dmesg:
The camera should now be detected by libcamera:
You can now revert the changes to /boot/firmware/config.txt to re-enable camera auto-detection. Note that you must be running the latest VC firmware/eeprom for auto-detection to work correctly with the AI camera.
There have been some AI Camera production units that have been shipped with an older RP2040 firmware. The instructions in this post will allow you to update the RP2040 firmware to the latest version (v15 at the time of writing).
Preparation
Begin by using a fresh installation of Raspberry Pi OS and ensure your device eeprom/firmware and other software is up-to-date. This will allow the camera auto-detection on boot to work correctly.
To check if your firmware is out-of-date, boot your device with the AI Camera attached and run the following in a terminal window:
Code:
dmesg | grep 2040
Code:
rp2040-gpio-bridge 10-0040: rp2040_gbdg_probe() found dev ID: ffffffffffffffff, fw ver. 4294967295
Code:
rp2040-gpio-bridge 10-0040: rp2040_gbdg_probe() found dev ID: 372b544f381064eb, fw ver. 14
If the dmesg output shows a sensible firmware string like fw ver. 14, jump ahead to the Flashing section below. If your dmesg output shows fw ver. 4294967295, please update /boot/firmware/config.txt with the following:
1) Comment out camera_auto_detect=1 if present:
Code:
#camera_auto_detect=1
Code:
dtoverlay=imx500
After rebooting, the dmesg output should show a sensible firmware string like fw ver. 14.
Flashing
Once you see a sensible firmware string like fw ver. 14 in dmesg, download imx500_i2c_flash and main_v15.bin from this shared drive and save them onto your Raspberry Pi home directory.
Then, run the flash tool in a terminal window with:
Code:
./imx500_i2c_flash main_v15.bin
Code:
$ ./imx500_i2c_flash main_v15.binexpected digest: 974c26176019f8b0ef23437988f2badfWrote chunk 0expected digest: 783e2517e382ab8439aeadf31e22c035Wrote chunk 1expected digest: dea39394264b4945df451bb419737d58Wrote chunk 2expected digest: f2e9b2396c3a33292175328f76241d2aWrote chunk 3expected digest: a1ae4500c38a97d777ce115000f58d6fWrote chunk 4expected digest: 9cfe9eec1bf22c34a0769f585ca7e548Wrote chunk 5expected digest: d6f8aecfa069c2cbdabe917df33a74fdWrote chunk 6expected digest: ae7686a60ad7d61999042c69205a0233Wrote chunk 7expected digest: b637ae8d825ae6a4af4580c6cd7838a6Wrote chunk 8expected digest: 1e3c49cb23cec2e1386fa7c09a0b67a5Wrote chunk 9expected digest: 70f163a757adb287da1362fef96d81e8Wrote chunk 10expected digest: adacb44c830d1640bfffa65a5452144eWrote chunk 11
After completing the flashing, reboot the device and you should see the correct firmware version reported from dmesg:
Code:
$ dmesg | grep 2040rp2040-gpio-bridge 10-0040: rp2040_gbdg_probe() found dev ID: 372b544f381064eb, fw ver. 15
Code:
$ rpicam-hello --list-camerasAvailable cameras-----------------0 : imx500 [4056x3040 10-bit RGGB] (/base/soc/i2c0mux/i2c@1/imx500@1a) Modes: 'SRGGB10_CSI2P' : 2028x1520 [30.02 fps - (0, 0)/4056x3040 crop] 4056x3040 [10.00 fps - (0, 0)/4056x3040 crop]
Statistics: Posted by naushir — Wed Oct 16, 2024 11:12 am