ArduCAM SPI programmatic delays Mini 2MP Plus (OV2640) and others

  1. Where did you get the camera module(s)? UCtronics and ArduCAM direct

  2. Model number of the product(s)? Mini 2MP plus running on a 4MHz SPI clock frequency

  3. What hardware/platform were you working on? ESP32 with Platformio & Arduino IDE

  4. Instructions you have followed. (link/manual/etc.) OV2640 DS and Arducam library

  5. Problems you were having? Occasional miscolouration or incorrect JPG aspect ratio

  6. The dmesg log from your hardware?

  7. Troubleshooting attempts you’ve made? changes to programmatic timings

  8. What help do you need? clarification of library/example timings chosen

The initCAM function within the library sends a software reset to the module and then has a 100mS programmatic delay. The OV2640 DS however, says that a software reset takes less than 1mS. Is there any reason for the the longer delay?

Secondly, the examples for capture perform the SPI.transfer within a while loop whilst there is data remaining. In the supplied examples there is a 15 microsecond programmatic delay before transferring the next byte… again any reason for this?

Hello,

Q1:Is there any reason for the the longer delay?
A1:A delay of 100ms ensures that the camera registers are reset successfully. You can also try reducing this delay time and see if the camera works properly.
Q2:In the supplied examples there is a 15 microsecond programmatic delay before transferring the next byte… again any reason for this?
A2:15 microseconds is to prevent the serial port sending data rate too fast. When the serial port sending rate is too fast, the data may be disordered.