Esp32s2 I2C error

Hello All,

I am using esp32s2 and I am getting "Guru Meditation Error: Core 0 panic'ed (Interrupt wdt timeout on CPU0). "

This is screenshot of backtrace.
I am using I2C Scanner code. when I comment Wire.endTransmission then Guru Meditation error doen't came. I think there is some error in Wire.end Transmission.

There is a bug related to the i2c scanner in 2.0.0-rc1 due to problems when writing 0 length transmissions.

The fix is committed.

Unfortunately that fix is not available through the board manager releases, and the download of the development release is complicated.

I would recommend that for now, you modify the core file on your computer and save the change implemented in the commit.

The modified file in esp32-hal-i2c.c will wind up looking like this

i2c_err_t i2cWrite(i2c_t * i2c, uint16_t address, uint8_t* buff, uint16_t size, bool sendStop, uint16_t timeOutMillis){
	esp_err_t ret = ESP_OK;
    i2c_cmd_handle_t cmd = i2c_cmd_link_create();
    i2c_master_write_byte(cmd, (address << 1) | I2C_MASTER_WRITE, ACK_CHECK_EN);
	if(size)//add this
	  i2c_master_write(cmd, buff, size, ACK_CHECK_EN);
    //if send stop?
    ret = i2c_master_cmd_begin(i2c->num, cmd, timeOutMillis / portTICK_RATE_MS);
    return ret;

Another alternative is to go back to 2.0.0 alpha1 which I recall did run the i2c scanner correctly.

1 Like

@cattledog I changed the i2cwrite code in 2.0.0-rc1 but it didn't work. Then I installed 2.0.0 alpha1 but it also not work.

Are you using the scanner with the custom board as mentioned in your previous thread?

I'm not certain what additional assistance I can offer.

I have used an ESP32S2( Unexpected Maker Feather S2) tosuccessfully run the standard scanner with both the modified version of 2.0.0-rc and the original 2.0.0 alpha1. The fix was also verified for the commit by me-no-dev who is an employee of Espressif Systems.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.