From 9e4bcb21fcda937c831ba7e297ed5b94f5bd59ca Mon Sep 17 00:00:00 2001 From: "Kwabena W. Agyeman" Date: Sun, 14 Mar 2021 15:49:08 -0700 Subject: [PATCH] Make cambus reinit standard for all boards --- src/omv/ports/stm32/sensor.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/omv/ports/stm32/sensor.c b/src/omv/ports/stm32/sensor.c index 1fdbcb232..0aff1735b 100644 --- a/src/omv/ports/stm32/sensor.c +++ b/src/omv/ports/stm32/sensor.c @@ -234,11 +234,9 @@ void sensor_init0() { dcmi_abort(); - #if defined(PORTENTA) || defined(OPENMVPT) - // These boards use the same I2C bus for the sensor and - // user scripts. The I2C bus must be reinitialized on soft-reset. + // Always reinit cambus after soft reset which could have terminated the cambus in the middle + // of an I2C read/write. cambus_init(&sensor.bus, ISC_I2C_ID, ISC_I2C_SPEED); - #endif // Disable VSYNC IRQ and callback sensor_set_vsync_callback(NULL);