Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => A20 => Topic started by: Croomch on March 25, 2015, 11:50:19 AM

Title: CSI error mesage on Lime A20
Post by: Croomch on March 25, 2015, 11:50:19 AM
Hi guys!

I am currently working on getting two ov7670 cameras interfaced to the A20 Lime via the two CSI.
But I am running into some error messages I cannot seem to fix.
These are, when I run the "dmesg" command:


[   71.264374] incomplete xfer (0x20)
[   71.270577] Error -70 on register write
[   71.278674] [CSI_ERR]chip found is not an ov7670 chip.
[   71.292963] [CSI_ERR]sensor initial error when csi open!
[   71.303186] [ccu-err] clk_enable: invalid handle
[   72.254459] incomplete xfer (0x20)
[   72.260655] Error -70 on register write
[   72.268757] [CSI_ERR]chip found is not an ov7670 chip.
[   72.278270] [CSI_ERR]sensor initial error when csi open!
[   73.234377] incomplete xfer (0x20)
[   73.240575] Error -70 on register write
[   73.248675] [CSI_ERR]chip found is not an ov7670 chip.
[   73.258184] [CSI_ERR]sensor initial error when csi open!


Does anyone know how to fix this?
I know that the xfer error suggests something is wrong with the .fex file, but I do not know what. I've tried every possible values I could think of...
The other errors seem a little strange to me as I have no clue what they suggest could be wrong...

I changed the .fex file to:


[camera_list_para]
camera_list_para_used = 1
ov7670 = 1
...

[csi0_para]
csi_used = 1
csi_mode = 0
csi_dev_qty = 1
csi_stby_mode = 1
csi_mname = ""
csi_twi_id = 0
csi_twi_addr = 0x42
csi_if = 0
csi_vflip = 0
csi_hflip = 1
csi_iovdd = ""
csi_avdd = ""
csi_dvdd = ""
csi_vol_iovdd = 2800
csi_vol_dvdd = ""
csi_vol_avdd = ""
csi_flash_pol = 1
csi_pck = port:PE00<3><default><default><default>
csi_ck = port:PE01<3><default><default><default>
csi_hsync = port:PE02<3><default><default><default>
csi_vsync = port:PE03<3><default><default><default>
csi_d0 = port:PE04<3><default><default><default>
csi_d1 = port:PE05<3><default><default><default>
csi_d2 = port:PE06<3><default><default><default>
csi_d3 = port:PE07<3><default><default><default>
csi_d4 = port:PE08<3><default><default><default>
csi_d5 = port:PE09<3><default><default><default>
csi_d6 = port:PE10<3><default><default><default>
csi_d7 = port:PE11<3><default><default><default>
csi_reset = port:PH13<1><default><default><0>
csi_power_en = ""
csi_stby = port:PH12<1><default><default><0>
csi_flash = ""
csi_af_en = ""

[csi1_para]
csi_used = 1
csi_mode = 0
csi_dev_qty = 1
csi_stby_mode = 1
csi_mname = ""
csi_twi_id = 1
csi_twi_addr = 0x42
csi_if = 0
csi_vflip = 0
csi_hflip = 1
csi_iovdd = ""
csi_avdd = ""
csi_dvdd = ""
csi_vol_iovdd = 2800
csi_vol_dvdd = ""
csi_vol_avdd = ""
csi_flash_pol = 1
csi_pck = port:PG00<3><default><default><default>
csi_ck = port:PG01<3><default><default><default>
csi_hsync = port:PG02<3><default><default><default>
csi_vsync = port:PG03<3><default><default><default>
csi_d0 = port:PG04<3><default><default><default>
csi_d1 = port:PG05<3><default><default><default>
csi_d2 = port:PG06<3><default><default><default>
csi_d3 = port:PG07<3><default><default><default>
csi_d4 = port:PG08<3><default><default><default>
csi_d5 = port:PG09<3><default><default><default>
csi_d6 = port:PG10<3><default><default><default>
csi_d7 = port:PG11<3><default><default><default>
csi_reset = port:PH13<1><default><default><0>
csi_power_en = ""
csi_stby = port:PH19<1><default><default><0>
csi_flash = ""
csi_af_en = ""


and I added the cameras to the /etc/modules file with the following:


ov7670
sun4i_csi0 i2c_addr=0x42 ccm="ov7670"
sun4i_csi1 i2c_addr=0x42 ccm="ov7670"


I also tried I to of different settings, without success.
Any help is appreciated as I am completely stuck at this point :P
Title: Re: CSI error mesage on Lime A20
Post by: lorenzo on August 22, 2015, 05:11:38 PM
Hi Croomch,

in the ov7670 datasheet  it's been reported that the address for write is 0x42 and for reading is the 0x43. Maybe there is something which is not correct with the i2c interface of the sensor.

Can you tell me what happens if you set the address to 0x43?

Thanks
Cheers
Lorenzo
Title: Re: CSI error mesage on Lime A20
Post by: unlauter on September 03, 2015, 05:02:30 AM
Quote from: lorenzo on August 22, 2015, 05:11:38 PM
Hi Croomch,

in the ov7670 datasheet  it's been reported that the address for write is 0x42 and for reading is the 0x43. Maybe there is something which is not correct with the i2c interface of the sensor.

Can you tell me what happens if you set the address to 0x43?

Thanks
Cheers
Lorenzo

This did not work for me, do you have another suggestion please??

To Croomch, this is wrong:
[csi1_para]
csi_used = 1
csi_mode = 0

Because according to:  http://linux-sunxi.org/Fex_Guide (http://linux-sunxi.org/Fex_Guide)

csi_used: 0 to enable; 1 to disable
Title: Re: CSI error mesage on Lime A20
Post by: JohnS on September 03, 2015, 09:59:00 AM
I think you've misunderstood the fex - you're quoting an error but see all the examples.

John
Title: Re: CSI error mesage on Lime A20
Post by: unlauter on September 03, 2015, 06:30:47 PM
Yea actually I was like  :o when I saw csi_used: 0 to enable; 1 to disable Because is the opposite in the rest of the FEX, is posible that documentation is wrong?

And Im still cant use my camera  :'(