This is my source on putting OV2640 into standby:
opened 10:02PM - 12 Dec 19 UTC
closed 09:25AM - 11 Sep 21 UTC
no-issue-activity
Hello,
Has anyone been able to use the software power-down available on the O… V2640? When I send the command, I see a drop in power, but the sensor also locks the I2C SDA pin low until it is power-cycled.
The OV2640 datasheet claims "Executing a software power-down through the SCCB interface suspends internal circuit activity but does not halt the device. All register content is maintained in standby mode." That's exactly what I would like to do - configure the camera, put it in standby, then bring it out of standby and be able to use it immediately.
I added a set_sleep function to the ov2640.c driver:
```
static int set_sleep(sensor_t * sensor, int enable)
{
sensor->status.sleep = enable;
int ret = set_reg_bits(sensor, BANK_SENSOR, COM2, 4, 1, enable?1:0);
return ret;
}
```
When I call this function, I see my board current drop ~30mA (@5V input) which seems reasonable. However, watching the I2C SDA pin, I see it is being held low by the camera. This means I can't send a command to come out of standby. I also can't use any other I2C devices on the bus until a power cycle of the camera. Based on several I2C troubleshooting documents, I tried sending a series of SCL pulses to see if that would reset the camera with no luck.
At this point, entering software standby appears to be a one-way operation that has no advantage over the hardware PWDN signal since it in not reversible. I'd love to hear from anyone who has been able to use this feature and learn what I should do differently.
It doesn’t seem to work, although there might be some bit twiddling niceties that we’re missing.
That’s why I was interested in controlling the PWDN pin