diff options
Diffstat (limited to 'src/fsm')
-rw-r--r-- | src/fsm/i2c.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fsm/i2c.c b/src/fsm/i2c.c index 133d740..687f7be 100644 --- a/src/fsm/i2c.c +++ b/src/fsm/i2c.c @@ -76,8 +76,6 @@ static void i2c_recover_from_lockup(void) GPIO_SetBits(GPIOB, GPIOB_PIN_SDA | GPIOB_PIN_SCL); vTaskDelay(delay); - I2C_SoftwareResetCmd(I2Cx, ENABLE); - for (int i = 0; i < 10; i++) { GPIO_ResetBits(GPIOB, GPIOB_PIN_SCL); vTaskDelay(delay); @@ -85,6 +83,8 @@ static void i2c_recover_from_lockup(void) vTaskDelay(delay); } + I2C_SoftwareResetCmd(I2Cx, DISABLE); + i2c_device_init(); } |