Hi,
I’m having problems using the Arducam AR1820HS connected to the CAM1 connector on the Raspberry PI Compute Module IO Board V3. Please note that the compute module being used is the newer CM3+ and not a CM3. This is important because it will come up in one of the questions I have at the end of this post.
On the IO board, CD1_SDA is connected to GPIO 44 (SDA1) , CD1_SCL is connected to GPIO 45 (SCL1), CAM1_IO0 is connected to GPIO0, and CAM1_IO1 is connected to GPIO 1. I have made the necessary changes to dt-blob file and generated a dt-blob.bin to support this pin configuration. I have also made the changes in /boot/config.txt to enable I2C-1 on GPIO 44 and 45.
When I run “raspi-gpio get”, the results show GPIO 44 and GPIO 45 are configured for SDA1 and SCL1 respectively. GPIO 0 and GPIO 1 show up as outputs, which is to be expected because they are the CAM1 IO signals. I also see i2c-1 when I list the contents of /dev.
I also changed and compiled preview_camera0.c located MIPI_Camera/RPI to work with my pin configuration. I couldn’t find much information on the structure camera_interface, so I was kinda guessing at this point. The following are the values I’m using in my preview_camera0.c file.
struct camera_interface cam_interface = {
.i2c_bus = 1,
.camera_num = 1,
.sda_pins = {2, 44},
.scl_pins = {3, 45},
.led_pins = {30, 1},
.shutdown_pins = {31, 0},
}
My first question is are these the correct changes I need to make in preview_camera0.c to work with the pin configuration I described above?
Now this is where my problems start. When I run “i2cdetect -y 1” the AR1820HS is detected, but with a slave address of 0x6C; however, according to your software guide, the slave address should be 0x6E. Is it possible your website is wrong?
https://www.arducam.com/docs/camera-breakout-board/18mp-ar1820hs/software-guide/
When I run “./preview-camer0” I get the following output:
Open camera…
Hardware Platform: a02100
Can’t detected the support hardware version
Couldn’t open I2C device
Init camera status = 4097
It seems as though your API doesn’t support CM3+ which has a code number a02100. I have verified that is the correct code number for a CM3+. So does your API support the CM3+? Have you tested it using the CM3+, and again I am not talking about the CM3. The CM3 and the CM3+ are two different items. What does error code 4097 mean? Do you have a list of error codes that I can review so I don’t have to create a forum post every time I get a new error code? Is there any step I missed or anything I did wrong that you noticed which would be the cause of my failure to run preview-camer0?
Thank you for the help,
Mark