Olimex ESP32-POE I2C Support

Hi,

Is anyone there using Olimex’s ESP32 and I2C with successful result ?
In ESP32-POE documentation, I2C-SDA and I2C-SCL are on GPIO13 and 16.
GPIO Map
See my config :

esphome:
  name: devicename
  platform: ESP32
  board: esp32-poe
wifi:
  ssid: '<redacted>'
  password: '<redacted>'
ota:
  safe_mode: True
  password: '<redacted>'
mdns:
  disabled: true
mqtt:
  broker: '<redacted>'
logger:
  level: DEBUG
i2c:
  sda: GPIO13
  scl: GPIO16
  scan: true
  id: bus_a

I am trying to scan I2C device, but when device is plugged on GPIOs ESP32 stucks at boot :

[12:52:50][I][logger:243]: Log initialized
[12:52:50][C][ota:461]: There have been 7 suspected unsuccessful boot attempts.
[12:52:50][D][esp32.preferences:114]: Saving preferences to flash...
[12:52:50][I][app:029]: Running through setup()...
[12:52:50][I][i2c.arduino:161]: Performing I2C bus recovery
[12:52:55]E (10217) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
[12:52:55]E (10217) task_wdt:  - loopTask (CPU 1)
[12:52:55]E (10217) task_wdt: Tasks currently running:
[12:52:55]E (10217) task_wdt: CPU 0: IDLE0
[12:52:55]E (10217) task_wdt: CPU 1: IDLE1
[12:52:55]E (10217) task_wdt: Aborting.
[12:52:55]abort() was called at PC 0x40140448 on core 0
[12:52:55]
[12:52:55]ELF file SHA256: 0000000000000000
[12:52:55]
[12:52:55]Backtrace: 0x400890f0:0x3ffbf870 0x4008936d:0x3ffbf890 0x40140448:0x3ffbf8b0 0x40087791:0x3ffbf8d0 0x401567a7:0x3ffbc160 0x40141d53:0x3ffbc180 0x4008bb3d:0x3ffbc1a0 0x4008a37e:0x3ffbc1c0
WARNING Found stack trace! Trying to decode it
WARNING Decoded 0x400890f0: invoke_abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c:715
WARNING Decoded 0x4008936d: abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c:715
WARNING Decoded 0x40140448: task_wdt_isr at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/task_wdt.c:252
WARNING Decoded 0x40087791: _xt_lowint1 at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/xtensa_vectors.S:1154
WARNING Decoded 0x401567a7: esp_pm_impl_waiti at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/pm_esp32.c:492
WARNING Decoded 0x40141d53: esp_vApplicationIdleHook at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/freertos_hooks.c:108
WARNING Decoded 0x4008bb3d: prvIdleTask at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/tasks.c:3507
WARNING Decoded 0x4008a37e: vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c:355 (discriminator 1)
[12:52:56]
[12:52:56]Rebooting...
[12:52:56]ets Jun  8 2016 00:22:57
[12:52:56]
[12:52:56]rst:0xc (SW_CPU_RESET),boot:0x1b (SPI_FAST_FLASH_BOOT)
[12:52:56]configsip: 0, SPIWP:0xee
[12:52:56]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[12:52:56]mode:DIO, clock div:2
[12:52:56]load:0x3fff0018,len:4
[12:52:56]load:0x3fff001c,len:1044
[12:52:56]load:0x40078000,len:10124
[12:52:56]load:0x40080400,len:5828
[12:52:56]entry 0x400806a8

After unplugging I2C device of GPIOs, ESP32 boots !

Same code on a generic NodeMCU 8266 works well…

Does anyone have something to help me ?

Thanks,

KNSR

Yup. Working ok here with a PM sensor. Your config seems fine.

What device are you using? Have you tried a different one?

All good here too weth BME680 and as @crlogic looks code good at my eyes ! Can you share whole code ? as it’s useless what you posted and also wiring you did :wink:

Code used here:

substitutions:
  friendly_name: olimex

esphome:
  name: $friendly_name

esp32:
  board: esp32dev
  framework:
    type: arduino

logger:

web_server:

ota:

ethernet:
  type: LAN8720
  mdc_pin: GPIO23
  mdio_pin: GPIO18
  clk_mode: GPIO17_OUT
  phy_addr: 0
  power_pin: GPIO12

api:
  reboot_timeout: 10min

i2c:
  sda: GPIO13
  scl: GPIO16
  scan: True

font:
  - file: "UbuntuMono-R.ttf"
    id: my_font
    size: 40

display:
  - platform: ssd1306_i2c
    model: "SSD1306 128x64"
    address: 0x3C
    lambda: |-
      if (id(temp).has_state()) {
        it.printf(125, 1, id(my_font), TextAlign::TOP_RIGHT , "%.1f°", id(temp).state);
      }

sensor:
  - platform: uptime
    name: $friendly_name Uptime
    filters:
      - lambda: return x / 60.0;
    unit_of_measurement: minutes
  - platform: bme680
    temperature:
      name: "BME680 Temperature"
      id: temp
      oversampling: 16x
    pressure:
      name: "BME680 Pressure"
    humidity:
      name: "BME680 Humidity"
      id: hum
    gas_resistance:
      name: "BME680 Gas Resistance"
      id: g_res
    address: 0x77
    update_interval: 60s
    #comp_gas = log(R_gas[ohm]) + 0.04 log(Ohm)/%rh * hum[%rh]
  - platform: template
    name: "BME680 IAQ"
    id: IAQ
    unit_of_measurement: IAQ
    lambda: 'return log(id(g_res).state) + 0.04 *  id(hum).state;'

I am using BMP380, and I try with a PCF8575 with same result.

Here is code for BMP380 config :

sensor:
  - platform: bme280
    temperature:
      name: "Temperature"
      oversampling: 16x
    pressure:
      name: "Pressure"
    humidity:
      name: "Humidity"
    address: 0x80
    update_interval: 60s

And wiring :

Just to be sure, I am looking for an other I2C device in my messy stock :smiley:

Since you provide an address. Having you tested removing the scan from I2c startup?

Guys … sorry to have bothering you here !
But I have just found my error, I was not plugging wires on the good side of the board…

Shame on me, I clearly need to buy a rubber duck :joy: