2025-12-03 11:17 PM
Hello.
I am using a custom image sensor board controlled by an STM32H7 MCU.
The image sensor is AR0134, and the I2C peripheral clock source for the MCU is set to 100 MHz (standard I2C bus speed is configured via timing registers).
There is one strange problem when the image sensor board is connected to the main control board (with the STM32H7 mounted).
1. I built a total of 30 identical MCU control boards.
2. The same firmware is programmed into all boards.
3. About 11 of these boards show problems when configuring the AR0134 registers over I2C.
- The MCU configures the sensor by writing to its registers over I2C.
- During testing, the same image sensor board is reused; only the MCU control board is swapped.
- With the same firmware and the same sensor board, some MCU boards configure the registers correctly, but on the problematic boards, when the registers are written and then read back, the values are all 0.
- Occasionally, on these problematic boards, if the power is turned off for a long time and then turned on again, the configuration suddenly succeeds.
- When configuration is successful, the power supply current is about 0.071 A, but in the failure case it is about 0.054 A, so there is a clear current difference.
Has anyone seen similar intermittent I2C configuration issues with STM32H7 and AR0134 (or similar CMOS image sensors)?
Any ideas on additional checks, measurements, or design points to verify would be very helpful.
Thank you.
2025-12-04 12:02 AM
> The image sensor is AR0134, and the I2C peripheral clock source for the MCU is set to 100 MHz (standard I2C bus speed is configured via timing registers).
The MCU core clock is not so relevant here, but I2C bus speed (and mode) much more so.
It seems the slave device DS, calling the bus interface "TWI", does not support high speed.
... on the problematic boards, when the registers are written and then read back, the values are all 0.
Have you tried to capture the bus signals with a scope / logic analyser, and compare it to a working part ?
- Occasionally, on these problematic boards, if the power is turned off for a long time and then turned on again, the configuration suddenly succeeds.
Which would suggest a temperature influence.
Which probably means your signal timing is probably at a limit.
2025-12-04 12:14 AM
When measured on the oscilloscope, on the boards that work correctly the MCU I2C write produces continuous clock pulses, but on the problem boards only about 8–9 clock pulses appear.
2025-12-04 12:47 AM
> When measured on the oscilloscope, on the boards that work correctly the MCU I2C write produces continuous clock pulses, but on the problem boards only about 8–9 clock pulses appear.
I think you need to dig deeper here.
9 clock cycles constitute a proper byte transmission, 8 clock cycles do not.
Probably the slave device does not acknowledge the transmission in these cases.