Freenove / Freenove_ESP32_WROVER_Board

Apply to FNK0060
Other
97 stars 38 forks source link

Cannot communicate with the ov2640 with Zephyr OS #11

Open francois36 opened 2 weeks ago

francois36 commented 2 weeks ago

Hello, i'm trying to use the freenove esp32 wrover board, with Zephyr Os.

Everything was perfect until i try to use the camera, i add it to the devicetree with :

&pinctrl {
    i2c_cam: i2c_cam {
        pinmux = <I2C0_SDA_GPIO21>,
             <I2C0_SCL_GPIO22>;
        bias-pull-up;
        drive-open-drain;
    };
};

&i2c0 {
    sda-gpios = <&gpio0 21 (GPIO_PULL_UP )>;
    scl-gpios = <&gpio0 22 (GPIO_PULL_UP )>;
    pinctrl-0 = <&i2c_cam>;
    pinctrl-names = "default";

    ov2640: ov2640@30 {
        compatible = "ovti,ov2640";
        status = "okay";
        reg = <0x30>;
    };
};

But when i launch the board i got the error in logs :

[00:00:01.562,000] <err> i2c_esp32: I2C transfer error: -116
[00:00:01.567,000] <err> i2c_esp32: I2C transfer error: -14
[00:00:01.572,000] <err> i2c_esp32: I2C transfer error: -14
[00:00:01.577,000] <err> video_ov2640: failed to write 0x1 to 0xff
[00:00:01.577,000] <err> i2c_esp32: I2C transfer error: -14
[00:00:01.582,000] <err> i2c_esp32: I2C transfer error: -14
[00:00:01.588,000] <err> i2c_esp32: I2C transfer error: -14
[00:00:01.593,000] <err> video_ov2640: failed to read 0xa register
[00:00:01.593,000] <err> i2c_esp32: I2C transfer error: -14
[00:00:01.598,000] <err> i2c_esp32: I2C transfer error: -14
[00:00:01.603,000] <err> i2c_esp32: I2C transfer error: -14
[00:00:01.608,000] <err> video_ov2640: failed to read 0xb register
[00:00:01.608,000] <err> video_ov2640: OV2640 not detected

Do you have any idea to solve this issue ? Am i doing something wrong in the devicetree ?

Thanks in advance

Zhentao-Lin commented 2 weeks ago

I'm sorry, I don't know what caused this. The module we use is provided by Le Xin official. Theoretically, if you can achieve it on other esp32 products, our products will certainly be able to achieve it. Because they all come from the same manufacturer. You can ask this question on Le Xin's github, and maybe they will know what caused this. I'm sorry that I can't solve your problem because of my lack of ability. https://github.com/espressif/arduino-esp32