mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-05 23:49:00 +08:00
I2C2: Don't bother generating stop in case of ACK error, let the hard reset
deal with things as they are
This commit is contained in:
@@ -681,13 +681,6 @@ void i2c2_er_irq_handler(void) {
|
||||
if (I2C_GetITStatus(I2C2, I2C_IT_AF)) { /* Acknowledge failure */
|
||||
i2c2_errors.ack_fail_cnt++;
|
||||
I2C_ClearITPendingBit(I2C2, I2C_IT_AF);
|
||||
I2C_GenerateSTOP(I2C2, ENABLE);
|
||||
/* Make sure that the STOP bit is cleared by Hardware */
|
||||
static __IO uint8_t counter = 0;
|
||||
while ((I2C2->CR1&0x200) == 0x200) {
|
||||
counter++;
|
||||
if (counter > 100) break;
|
||||
}
|
||||
}
|
||||
if (I2C_GetITStatus(I2C2, I2C_IT_BERR)) { /* Misplaced Start or Stop condition */
|
||||
i2c2_errors.miss_start_stop_cnt++;
|
||||
|
||||
Reference in New Issue
Block a user