meshtastic / firmware

Meshtastic device firmware
https://meshtastic.org
GNU General Public License v3.0
3.54k stars 879 forks source link

[Bug]: BME680 crashes library due to invalid readings #2928

Closed KodinLanewave closed 1 year ago

KodinLanewave commented 1 year ago

Category

Hardware Compatibility

Hardware

Other

Firmware Version

2.2.11

Description

Utilizing a BME680 (2 of same brand, 1 of another brand) modules hooked to 2nd i2C port on a Station G1, I'm getting crashes and boot-looping when the firmware tries to initialize the BME68x library. Same error number in all cases, and only occurs when the BME680 is plugged in with correct wiring and telemetry is turned on in firmware configuration. Upon disconnecting the sensor from the i2c port, the system operates normally, without any BME readings. Let me know if you need me to do further tests.

Modules I have tried: Waveshare BME680 board (2 separate units) CJMCU-680 (purple PCB with sensor at small protrusion near end of board)

Relevant log output

INFO  | ??:??:?? 11 [EnvironmentTelemetryModule] Environment Telemetry: Initializing
ERROR | ??:??:?? 11 [EnvironmentTelemetryModule] begin BME68X code: -2
Guru Meditation Error: Core  1 panic'ed (StoreProhibited). Exception was unhandled.

Core  1 register dump:
PC      : 0x40203417  PS      : 0x00060030  A0      : 0x80202918  A1      : 0x3ffd93f0
A2      : 0x00000900  A3      : 0x3f40d570  A4      : 0x000007b6  A5      : 0x3ffccb18
A6      : 0x00001000  A7      : 0x00000000  A8      : 0x00000000  A9      : 0x00000000
A10     : 0x3ffd948c  A11     : 0x00000000  A12     : 0x00000000  A13     : 0x00000001
A14     : 0x00060420  A15     : 0x00000001  SAR     : 0x00000004  EXCCAUSE: 0x0000001d
EXCVADDR: 0x00000900  LBEG    : 0x40094d9d  LEND    : 0x40094dad  LCOUNT  : 0xffffffff

Backtrace: 0x40203414:0x3ffd93f0 0x40202915:0x3ffd9430 0x40109b41:0x3ffd9450 0x400f8427:0x3ffd9470 0x400f7d7e:0x3ffd94c0 0x400d5f9e:0x3ffd94e0 0x40103d49:0x3ffd9500 0x400e1538:0x3ffd9530 0x4013f135:0x3ffd9550

ELF file SHA256: 505cd8c9af2ab28b

E (15817) esp_core_dump_flash: Core dump flash config is corrupted! CRC=0x7bd5c66f instead of 0x0
Rebooting...
ets Jul 29 2019 12:21:46

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:13192
load:0x40080400,len:3028
entry 0x400805e4
E (853) esp_core_dump_flash: No core dum?????????found!
E (853) esp_core_dump_flash: No core dump partition found!
[    12][D][esp32-hal-cpu.c:244] setCpuFrequencyMhz(): PLL: 480 / 2 = 240 Mhz, APB: 80000000 Hz
E (581) psram: PSRAM ID read error: 0xffffffff
[    20][W][esp32-hal-psram.c:71] psramInit(): PSRAM init failed!
WARNING file:mesh_interface.py _sendToRadio line:681 Not sending packet because protocol use is disabled by noProto
INFO  | ??:??:?? 0
KodinLanewave commented 1 year ago

Never mind, fixed in 2.2.13 Alpha. Looks like the issue was with the secondary i2c bus initialization.

See: https://github.com/meshtastic/firmware/pull/2891