Bring Up,camera of I2C equipment

Source: Internet
Author: User

1.OV PWDN is a high level of effective, that is, high electricity peacetime camera sleep, at this time I2C also do not work (with i2cdetect detection), in low electricity peacetime camera work;

2.i2cdetect is a very good tool, you use this work, do not care about the device's register address and data bit width, as long as the device to ensure the operating voltage and its mount to which a I2C controller, you can find the device, which can greatly improve the efficiency of the initial work.

3. Timing is very important, GT2005 timing and ov timing is not the same, the GT PWDN is low level effective, so work to the PWDN pull high. This step is the most important, only to ensure its working environment, to use i2cdetect detection device.

4. Able to detect equipment with i2cdetect, after you work on the bottom, at least know I can control this equipment, haha. Later you have to focus on the device address, register address bit wide, register data bit wide. At this point you should be able to make sure that you are using your own code to interact with the I2C device.

5. Finally you should be able to know how to configure the device's registers to make it work better and complete its mission. Haha, is to the device to send commands to control this device. Haha, a sense of achievement ....

Note:

1. Regarding the I2C resistance problem, the GT recommendation is 4.7k~10k, but the 2.2K on the board can also. I2C resistance can be roughly used: 1.5k,2.2k,4.7k. Too small can consume too much power, too large to affect speed. Online said, can not be less than 1K, can not be greater than 10K. Ha ha..

2.Makefile, kconfig, config file (depends on), and so on, to put their own driver can be compiled into the kernel

3.device and driver structure creation (to follow the Linux defined framework to create), camera this piece will refer to the V4L2 structure, the main reference *.h header file can be, in the kernel boot, The ability to load drivers (device and driver name to be the same) enables driver to invoke functions provided by device (as long as the structure is contained correctly, it can be tuned).

4.gpio_request (Gpio_pv4, "CA_PW"), GPIO_DIRECTION_OUTPU (Gpio_pv4, 1), Gpio_free (Gpio_pv4), after calling Gpio_free, The Gpio has been released, it is not the state you set up.

5. Files created under device will generate the SYS directory under the corresponding Sys/class directory, for example,/sys/class/i2c-dev/i2c-3/device/3-0030 corresponding to a device with a 0x30 address of I2C under number 3rd

6. At the time of Probe I2C adapter (I2C-XXX.C), the adapter (I2C or device) of i2c_add_numbered_adapter devices mounted under the I2c_add_adapter will be created, It will eventually be tuned to I2c_new_device (), which will determine whether the device's address is correct (i2c_check_client_addr_validity ()), and whether I2C's address has been registered (I2c_check_addr_busy ()), In other words, under a bus, there can be no more than two I2C devices with the same address.

7. When adding the I2C driver, call I2c_add_driver ()-I2c_register_driver (), which probe the driver of the I2C device and create probe class if the driver is unsuccessful. If you want to probe another driver with the same name, you can judge the result of the probe, and if it is wrong, call the I2c_del_driver () function to remove the drive so that the second driver can probe normally.

8. Circuit diagram: 0R is 0 euro, haha, the equivalent of a jumper. NC is not affixed to the meaning, that is, there are two schemes,/nc a scheme is not patch, haha ~

9. After verifying that the camera module does not work without MCLK, it also provides MCLK in addition to timing.

10.Camera Preview and camera working power are different.

In a product of the Bring up stage, Preview (800x600) normal, but the photo (1600x1200) is dead in there, by the Bulls pointing, suspected module power supply is insufficient, and with 320x240 photos no problem, more confirmed this point, Finally, the problem is positioned on the 2.8V Ldo, the Ldo maximum current is 50mA, which may be caused by this problem.

Here are the Ldo (low dropout linear regulator) detailed introduction: http://baike.baidu.com/view/1042146.htm


High-throughput platform under camera bring up document: Http://www.docin.com/p-36786859.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.