Programming specs for ArduCam OV2640 (I2C, SPI, timing, etc...)?

I have an ArduCam SPI camera based on 2MP OV2640 (e.g. which I’m porting to a new microcontroller (ATSAMV71). I’ve cobbled together a series of low-level I2C and SPI commands that are good enough to capture a JPEG image.

But I have two issues:

  • It only works when I insert delays between certain operations, anywhere between 1mS and 100mS. The values of the delays were complete guesses – I twiddled delay values until things worked. I cannot release production code based on complete guesses.
  • I’ve only been able to make it work for 320 x 240 JPEG, but what I really want is 96 x 96 YUV. I have a block of un-commented address / values pairs to support 96 x 96 YUV, but after asserting the FIFO_START_MASK in the ARDUCHIP_FIFO register, the FIFO_DONE flag in ARDUCHIP_REG never gets set.

What I really need is the programming spec for the camera, including I2C and SPI commands and timing (setup and hold) for each command. Where can I find this?