Hi all,
I am using Jetson Nano development kit with latest sdk. L4T-32.4.3
The query , i have might be bit different , but let me try to explain.
We have interfaced one imx219 camera with jetson nano, which is running absolutely fine with the default imx219.c driver provided by nvidia.
We got to know that, there is an temperature sensor in IMX219 which is register - 0x0140. The temperature register will give the temperature data once camera streaming is started.
So, from command line we just use “i2ctransfer” commands to read the value & we are able to get the value.
Commands are:
sudo i2ctransfer -f -y 6 w3@0x10 0x01 0x40 0x80
sudo i2ctransfer -f -y 6 w2@0x10 0x01 0x40 r1
Now my query starts, when i tried to do the same from imx219.c driver , i dont get the same result.
I have just created sysfs file to enable the temperature register by writing 0x80 to the register & then read the register again. All i got is the same value “0x80” from the register while i was expecting to get some other temperature data similar to i2ctransfer command.
Code snippet:
static ssize_t imx219_temp_show(struct device *dev, struct device_attribute *attr,
char *buf)
{
int err=0;
u8 dev_temp_val = 0;
struct camera_common_data *s_data = tc_dev2->s_data;
err = imx219_write_reg(s_data, IMX219_TEMP, 0x80);
if(err)
printk("error writing temp. reg\n");
imx219_read_reg(s_data, IMX219_TEMP, &dev_temp_val);
return sprintf(buf, "%d\n", dev_temp_val);
}
Any suggestion on the above issue. @ShaneCCC