Closed martin072 closed 4 years ago
I have that VL53L0X sensor and have seen bad initialization code for it in some demo code (while... without yield) that may cause WDTs. However, that's your app or the 3rd party library for the sensor, and not the Wire library at fault. Nothing in the I2C library is causing it.
At a glance, I see ReadRangeContinuousBlah() has a while loop without yield. It's pretty obvious. Closing due to not a core issue.
Many thanks for the quick responses. Will dig a bit further
Many thanks for the quick responses. Will dig a bit further
Martin072, I was trying to setup my ESP12F with OLED1306 and VL53L0X to i2c. I had similar issue (ie. Soft WDT reset, Exception (4) and exactly same stack strace you have posted above). I added delay/yield in the VL53L0X.cpp file in various places with the hint from stacktraces. Then started getting WDT reset issue at Adafruit_SSD1306::display() Stack trace: display() -> TwoWire::endTransmission->Adafruit_SSD1306::ssd1306_commandList->Twi::writeTo->Twi::write_byte->Twi::busywait
Atlast I used another Library for SSD1306 as provided by in this example Create a height measuring device by combining ESP8266, VL53L0X, and MPU6050...It started working without any issue.
I know its been long for this reply. But thought it will help if someone search for this issue and lands into this page.
Basic Infos
Platform
Settings in IDE
Problem Description
I have a system that utilises 2 VL53L0X sensors. This works fine for the majority of time, but after around 20 hours till 2 days (varying), the ESP resets due to Software a WDT, I've managed to do a stack trace, and this is the result:
This is the function that reads the sensors (initiated from the main loop):
As you can see as last desperate measure, I alternate the reading of the sensors, where as before I just read both sensors after each other. But even this approach still gives the WDT resets.
Any one an approach on this one?