-
Notifications
You must be signed in to change notification settings - Fork 642
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LEDc configuration error and camera_probe failed #66
Comments
there was a change in ledc driver that is used to drive the clock to work with the current version a one line of code needs to be added into xclk.c
put in in the block bellow
you will find the the file in yourproject/components/esp32-camera/driver/xclk.c use of the APB clock was assumed in previous commit to ledc.c and now it needs to be explicitly set |
Thanks @mirronelli, i already figured it out though (while i used LEDC_AUTO_CLK). Strange thing is, if i ran the ledc initialization snippet (whitout setting the clock source) from the app-main it didn't give any error at all. Moreover, while this solution solves the duty cycle - frequency error, in my case it still hangs in "skip_frame()" function, thowing a timeout error. I found out this occurred because the VSYNC pin wasn't actually clocking, even though it was correctly initialized. I solved it by moving the pheripheral enable command at the end of the function, after the parameters assignment:
The other issue i found (the one that caused error 0x20004), which is however related to the circuit, is that camera wasn't responding to i2c commands, thus preventing the software to recognize the correct model. ESP32-CAM board has camera PWDN pin tied to GND (so camera is always powered) while camera RST is passively deasserted a little time afte 3.3V supply is started. However, GPIO32 controls the power supply enable of the camera by means of a transistor. Thus, if GPIO32 is not set low before calling camera_init(), the camera is powered down and cannot reply to i2c commands of course. This solved the issue:
|
Hello, sorry to bother you guys, now i am writing a driver code of the ov2640 with esp32cam, but actually i have no idea and donnot know how to start and i have found that there is few material about writing a driver code from scratch, I wondering whether you have some experience or have some useful tutorial material, can you share them with me ? Many thanks ! @masterd89 @mirronelli |
// Select camera model @jxyxg I think.. this problem could be solved easily by only changing these comments like that. |
This issue appears to be stale. Please close it if its no longer valid. |
In my case I had to comment
|
|
ola eu também tenho este problema , em que parte do código é que eu devo colocar este novo código que colocou aqui em cima. |
Hello there,
i have an issue with ESP32-CAM module with OV2640:
E (1582) ledc: requested frequency and duty resolution can not be achieved, try reducing freq_hz or duty_resolution. div_param=3
E (1592) camera_xclk: ledc_timer_config failed, rc=ffffffff
I (1602) sccb: pin_sda 26 pin_scl 27
I (1602) gpio: GPIO[32]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
E (1662) camera: Detected camera not supported.
E (1662) camera: Camera probe failed with error 0x20004
E (1662) app_camera: Camera init failed with error 0x20004
I've tried everything: enable/disable all camera module support and hw I2C from menuconfig, tried with 3 different unit and different cameras. Tried custom firmware and examples firmware, examined the code and the pin configuration, different USB to serial boards, powering the boards with external PSU.....and yet i still get that error.
I also updated esp-idf framework by deleting and re cloning the repo. No luck with that also.
Any idea?
Thanks,
D
The text was updated successfully, but these errors were encountered: