cesanta / mongoose-os

Mongoose OS - an IoT Firmware Development Framework. Supported microcontrollers: ESP32, ESP8266, CC3220, CC3200, STM32F4, STM32L4, STM32F7. Amazon AWS IoT, Microsoft Azure, Google IoT Core integrated. Code in C or JavaScript.
https://mongoose-os.com
Other
2.51k stars 429 forks source link

ESP-IDF 4.2 update #565

Open rojer opened 3 years ago

nliviu commented 3 years ago

It looks like there is a problem with I2C:

[Dec 28 21:37:42.284] esp32_main.c:65         ESP-IDF 4.2-r1
...
[Dec 28 21:37:43.635] esp32_i2c_master.c:402  I2C0 init ok (SDA: 21, SCL: 22, freq: 100000)
...
[Dec 28 21:37:44.228] mgos_bh1750.c:150       Could not set mtime
[Dec 28 21:37:44.232] mgos_bh1750.c:99        Failed to init BH1750 @ 0x23

The error is issued after a mgos_i2c_write. https://github.com/mongoose-os-libs/bh1750/blob/f77905d448ebcfe2eea4e3fb4ebf66d1e21b4e70/src/mgos_bh1750.c#L149-L152

rojer commented 3 years ago

@nliviu thanks for reporting, fixed by https://github.com/mongoose-os-libs/i2c/commit/d01074bf3c125449d87c508ea1a5bfa27c03c9d9

kzyapkov commented 3 years ago

ESP32-PICO-D2 needs CONFIG_FLASHMODE_DIO=y appended to ESP_IDF_SDKCONFIG_OPTS, specifying the mode in --esp-flash-params isn't enough. This was not the case with IDF v3.2.

Edit: appears to be a manifestation of https://github.com/espressif/esp-idf/issues/6191