Skip to content

Commit ee6d13f

Browse files
committed
fix for i2c rx buffer OVF; the same as Upstream PR espressif#4342
1 parent 8817e53 commit ee6d13f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Diff for: cores/esp32/esp32-hal-i2c.c

+8
Original file line numberDiff line numberDiff line change
@@ -949,6 +949,14 @@ static void IRAM_ATTR i2c_isr_handler_default(void* arg)
949949
activeInt&=~I2C_TXFIFO_EMPTY_INT_ST;
950950
}
951951

952+
if(activeInt & I2C_RXFIFO_OVF_INT_ST) {
953+
emptyRxFifo(p_i2c);
954+
p_i2c->dev->int_clr.rx_fifo_full=1;
955+
p_i2c->dev->int_ena.rx_fifo_full=1; //why?
956+
957+
activeInt &=~I2C_RXFIFO_OVF_INT_ST;
958+
}
959+
952960
if(activeInt & I2C_RXFIFO_FULL_INT_ST) {
953961
emptyRxFifo(p_i2c);
954962
p_i2c->dev->int_clr.rx_fifo_full=1;

0 commit comments

Comments
 (0)