Open Vinicius-FF opened 3 years ago
Bodmer's library doesn't blow chunks... I haven't used the Adafruit library since finding his improved version. https://github.com/Bodmer/TFT_eSPI
I'll give his libray a try, thanks for the reply @Tech-TX! Posted this issue because I managed to isolate the problem but couldn't find informations about it anywhere. Now if someone has the same problem, at least they can find this issue report, along with your recomendation of the library and maybe scratch their head for less time than I did...
Also, since it worked with with 2.7.4, maybe some bug or something no longer compatible, IDK.
Which version of Adafruit-GFX-Library are you running?
Version 1.10.10, the latest available on the Arduino IDE library manager, and IDE version 1.8.13. Will update to version 1.8.15, but I'm not sure that could be the issue. I'll report the result of the test with the 1.8.15 version of the Arduino IDE
@earlephilhower Can you explain how line 1333 of Adafruit_SPITFT.cpp
from version 1.10.10 of Adafruit_GFX_Library
can be a correct stack dump artifact, when the sources are:
1317 #if defined(ESP8266)
1318 do {
1319 uint32_t pixelsThisPass = len;
1320 if (pixelsThisPass > 50000)
1321 pixelsThisPass = 50000;
1322 len -= pixelsThisPass;
1323 yield(); // Periodic yield() on long fills
1324 while (pixelsThisPass--) {
1325 hwspi._spi->write(hi);
1326 hwspi._spi->write(lo);
1327 }
1328 } while (len);
1329 #else // !ESP8266
1330 while (len--) {
1331 #if defined(__AVR__)
1332 AVR_WRITESPI(hi);
1333 AVR_WRITESPI(lo);
1334 #elif defined(ESP32)
1335 hwspi._spi->write(hi);
1336 hwspi._spi->write(lo);
1337 #else
1338 hwspi._spi->transfer(hi);
1339 hwspi._spi->transfer(lo);
1340 #endif
1341 }
1342 #endif // end !ESP8266
I've given up on trusting in the stack dumps long ago :-(
@dok-net I have seen issues with line numbers if various line endings are mixed.
Anyway, this number of "50000" does seem rather "experimental based".
If the writing process is slightly lower, then you would hit the WDT timer.
Also I do remember to have seen changes to yield()
lately. Can it still be used to feed the dog?
@TD-er Runs off 3.0.1 forever:
void setup()
{
Serial.begin(74880);
delay(500);
}
void loop()
{
Serial.println();
Serial.println("yyield");
auto started = ESP.getCycleCount();
for (;;)
{
const auto now = ESP.getCycleCount();
if (now - started > ESP.getCpuFreqMHz() * 1000 * 1560)
{
yield();
started = ESP.getCycleCount();
}
}
}
Commenting out the yield();
, Soft WDT reset
Stack dump:
Error
0x40201068 esp_get_cycle_count
(inlined by) EspClass
:\Users\dok\Documents\Arduino\yyield/yyield.ino:11
0x40201274 loop_wrapper()
0x40100c29 cont_wrapper
Thanks good to know :)
@Vinicius-FF @TD-er Now, if either of you has the hardware and an actual sketch to trigger the WDT - I surmise it's not the constructor snippet from above alone - could you insert some timing reports into the section in question and find out if it's the 50000 that is at fault? This is all becoming rather theoretical now :-)
@dok-net I can try, I have the hardware. But I'm rather rusty in programming, and my knoledge is more on the hardware side of things. One thing I just recalled is that among the test I've made (was troubleshooting project that we made last year and it stopped working after programming the same code with the newer version of the core), is that I've tried disabling the watchdog and then it hit the hardware watchdog instead.
@Vinicius-FF At the least you can tinker with the 50000 and see if reducing that fixes the WDT issue.
Basic Infos
Platform
Settings in IDE
Problem Description
Soft WDT is triggered when using the Adafruit ST7735 and ST7789 Library (1.7.3, latest available on library manager) when using core 3.0.0 With core 2.7.4 it works fine.
Using a ST7735 display.
Decoding stack results:
MCVE Sketch
graphicstest example from the Adafruit ST7735 and ST7789 Library using this call:
Debug Messages