diff --git a/components/hal/esp32/include/hal/i2c_ll.h b/components/hal/esp32/include/hal/i2c_ll.h index b451af7867..dcc24d803f 100644 --- a/components/hal/esp32/include/hal/i2c_ll.h +++ b/components/hal/esp32/include/hal/i2c_ll.h @@ -575,7 +575,9 @@ __attribute__((always_inline)) static inline void i2c_ll_read_rxfifo(i2c_dev_t *hw, uint8_t *ptr, uint8_t len) { for(int i = 0; i < len; i++) { - ptr[i] = HAL_FORCE_READ_U32_REG_FIELD(hw->fifo_data, data); + // Known issue that hardware read fifo will cause data lose, (fifo pointer jump over a random address) + // use `DPORT_REG_READ` can avoid this issue. + ptr[i] = DPORT_REG_READ((uint32_t)&hw->fifo_data); } }