We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2443878 commit 78d1667Copy full SHA for 78d1667
ports/stm32/i2cslave.c
@@ -94,6 +94,9 @@ void i2c_slave_irq_handler(i2c_slave_t *i2c) {
94
i2c->ISR = I2C_ISR_TXE;
95
i2c->ICR = I2C_ICR_ADDRCF;
96
i2c_slave_process_addr_match(i2c, (i2c->ISR >> I2C_ISR_DIR_Pos) & 1);
97
+ // Re-read ISR in case i2c_slave_process_addr_match() took some time
98
+ // to process and TXIS/RXNE was set in the meantime.
99
+ isr = i2c->ISR;
100
}
101
if (isr & I2C_ISR_TXIS) {
102
// This callback must call i2c_slave_write_byte.
0 commit comments