cancel
Showing results for 
Search instead for 
Did you mean: 

OV7670 not being recognized

LuizF_Ferro
Associate III

Hello,

I want to use an OV7670 camera with my STM32U585CIU6 MCU. I've done all connections but failed to identify the camera module with I2C. I have then removed the wiring and just kept the following connections: 3.3V supply, GND, SCL and SDA (pull-up resistors are already integrated in my board). I've been simply trying to identify my camera address, but still can't succeed and I would appreciate if someone could help me in understanding why. The I2C pins are properly assigned on CubeMX. For further information, this is the snippet I've been using to test the i2c addresses:

 

for (int i = 0; i < 128; i++) {
    if (I2C_TestDevice(i<<1) == HAL_OK) {
        printf("Device %x answered", i);
    }
}

 

Where I2C_TestDevice() is defined as

 

HAL_StatusTypeDef I2C_TestDevice(uint8_t address) {
	return HAL_I2C_IsDeviceReady(&hi2c1, address, 3, HAL_MAX_DELAY);
}

 

 My board has some other integrated devices, which responds correctly to this test:

PCA9535 (address 0x38): found

BME280 (address 0x6A): found

LSM6DSOX (address 0x76): found

Address 0x7E also found although I don't know exactly why.

 

I expected to get 0x42 for the camera, but I don't know where is the issue. The connections are stable, my I2C frequency is set to 100KHz. What could be wrong?

 

Sincerely,

Luiz

1 REPLY 1
LuizF_Ferro
Associate III

Update:


I have tested a LCD screen module with my board, and I obtained the expected i2c addresses. I've also tested the OV7670 with the PWDN/RESET connections to GND and 3.3V, respectively, but couldn't solve the issue. The problem seems to be somewhere in the camera, although I've tested with two OV7670s already. Could someone please help me?