M5Paper crashing on EPD.Clear, or SPIFFs.begin
-
Hello,
I started working on M5Paper in the summer, had fun, got my project more or less working. Then life got in the way, I got a new computer, I moved house.
Now I've finally opened it up again. Installed the driver and Arduino IDE (2.0.3, previously I was using 1.8) on my new computer (Macbook M1, previously on Intel Macbook); installed the M5Stack board manager, installed the M5EPD library; compiled my program, uploaded it.
Serial monitor just showed repeated
M5EPD initializing...OK M5EPD initializing...OK M5EPD initializing...OK
... etc
I added a few more lines of debugging,
Serial.println("\n\n------- begin ----"); M5.begin(); Serial.println("------- SetRotation ----"); M5.EPD.SetRotation(90); Serial.println("------- Clear ----"); M5.EPD.Clear(true);
now I get repeated
------- begin ---- M5EPD initializing...OK ------- SetRotation ---- ------- Clear ---- ------- begin ---- M5EPD initializing...OK ------- SetRotation ---- ------- Clear ----
... etc
- in other words, it's crashing in
M5.EPD.Clear(true);
.
If I comment out the call to M5.EPD.Clear, then I get as far as the next debugging statement, but the next call, to
SPIFFS.begin
, also crashes.Finally I created a new sketch, and copied the 'Hello World' code from https://docs.m5stack.com/en/quick_start/m5paper/arduino into it. Uploaded that, and back to the minimal output:
M5EPD initializing...OK M5EPD initializing...OK M5EPD initializing...OK
... etc
Can anyone suggest what might be going on here? Is there a problem with the 2.0.3 IDE? Do I need to update firmware to account for some updated libraries?
Thanks in advance for any help you can give.
- in other words, it's crashing in
-
-
Hi @felmue,
Thank you as ever for your helpful assistance.
It's taken me a while to get back to this and make progress.
By starting again with the basic sketch at https://github.com/m5stack/M5Unified/blob/master/examples/Basic/Displays/Displays.ino, using the M5unified and M5gfx libraries, I am at last able to build a non-crashing sketch again with the M5Paper, using either Arduino 2 IDE or the Arduino 1.8 IDE.
However, although the
SPIFFS.begin
call no longer crashes, it returns an error. (And apparently the ESP32 Sketch Data Upload is not available in the Arduino 2 IDE, and for some reason I am unable to install it on the Arduino 1.8 IDE on this machine, although I was able to on the previous machine.)And I am sad to lose all the functions from the M5Paper library, which I am not clear to what extent they are replicated in the M5gfx library; or the RTC functions etc.
Can you help me understand: from the remarks on this thread https://community.m5stack.com/topic/4891/m5paper-won-t-execute-loaded-programs/10 that you pointed me to, is there a simple fix that I can use to continue using M5EPD? Either by commenting out the lines mentioned in GT911.cpp (and presumably recompiling the library?); or by simply reverting to an earlier version of the Arduino libraries?
Thanks again for your help.
-
Hello @Hamnet
correct, to continue to use M5EPD you either need to revert to Arduino 1.8 IDE (which worked for you in the past). Or you can try to comment out the lines mentioned in GT911.cpp and use Arduino IDE 2.x. The latter I tried myself and worked for me.
Thanks
Felix