Video Common Controls don't seem to work when using 8bit registers and 8 bit data. #94967
-
Beta Was this translation helpful? Give feedback.
Replies: 11 comments 15 replies
-
So far in the drivers\video directories I only see a couple of places that use it:
The place that uses it in video_common.c is the function: video_modify_cci_reg which is only used within gc2145.c
Maybe best to stick with the functions that work? |
Beta Was this translation helpful? Give feedback.
-
Think you are going to turn out right but that implies there is something fundamentally wrong with video common for 8bit data/regs. Either that or I am doing it wrong. Right now I just want to see what would happen if I left reading the PID and resetting the camera as I2C reads/writes. What happens is the the rest of the driver works except for when I set vflip and hflp which uses:
you get errored out
Now if I comment out vflip and hflip in the sketch as a test of the other functions. Well camera show started
but no frames are grabed to display!!!! CONCLUSION: Stick with I2c commons when dealing with 8bit regs and 8 bit data |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Today decided to try to reading pid using standard 12c calls
to see what happens. However since I am also sending flip commands and as @KurtE pointed it, those commands use the read cci reg command through the modify_reg command flip threw an error
but you will still get a good image. ![]() |
Beta Was this translation helpful? Give feedback.
-
UPDATE:
at least using zephyr directly got a lot more info. Now if I try to do it the ov9565.c drive does it:
I get the exact same error message! |
Beta Was this translation helpful? Give feedback.
-
@mjs513, I read the whole thread. I think I understand that so far the two errors you've been facing is either reading the PID (very very read to the sensor) or the address 0xA which is the first one done right after performing the reset of the sensor via COM7. Is that correct ? |
Beta Was this translation helpful? Give feedback.
-
Considering that here cmd is equal to the PID register address (aka 0x0A), I do not understand how this would even compile or run ? Below is part of the code of video_read_cci_reg
So here, reg_addr = 0x0A I think, but from it, the function tries to figure out the register addr / data size as well as endianness. Considering that the bitfields are
basically they are all 0 since the reg_addr = 0x0A. So, the function should fail on the last 2 ASSERT shown above... Aka thoses:
Do you have __ASSERT disabled on your system ? |
Beta Was this translation helpful? Give feedback.
-
where:
Using the giga overlay didn't notice it was enabled or not so just added
and reran the app. Same error messages are received
|
Beta Was this translation helpful? Give feedback.
-
@josuah But as a quick and dirty test i decided to do a i2c_write_read command as a hack:
|
Beta Was this translation helpful? Give feedback.
-
@josuah
|
Beta Was this translation helpful? Give feedback.
-
Have no problem mixing and matching since using video_write_multireg_cci seems to be working no issue. However, when using video_modify_cci_reg has the same issue since it eventually calls video_read_cci_reg to modify the register. So at this point can I mix and match i2c commands with the video_common commands in the drivers espescially if we are merging the the ov7670 and the ov7675 drivers. The ov7675 does not seem to have this issue but going to retest again just to be sure. |
Beta Was this translation helpful? Give feedback.
Having a look again at the OV7670 driver, there is a comment within the driver which states:
Or, the video_read_cci_reg IS doing repeated start, aka the log below: