Closed patfelst closed 2 years ago
I just tried the develop branch code, but the problem is still there. My program includes many othe libraries. Later today I will create a new project with only M5Unified to make sure they are isolated.
@patfelst As it turns out, removing Serial.begin(115200) will work.
In the recent update, Serial.begin has been included in the M5Unified.begin behavior. Therefore, you do not need to do the Serial.begin. (See HowToUse in examples).
Now, let me go one step further and explain. Until recently, Arduino core ESP32 has a bug in Serial.end() that causes problems with running PSRAM. And the way Serial.begin works is that if you have already begun, you call end and then begin.
This creates a situation where "calling Serial.begin twice will cause PSRAM to fail.
M5Canvas is set to use PSRAM by default. This means that when you call createSprite, M5Canvas will access PSRAM.
Therefore, a combination of these factors will cause this problem to occur.
Yes that fixed it - thanks. And my apologies. I've now had a look at HowToUse example, and will implement the M5 config structure as I need set the Core2 LED, 5V output power and internal RTC etc.
Hi there,
I have been developing on M5 Stack Core2 with this library for a couple of weeks now and all has been good! Yesterday I noticed that I was still on v0.0.1 so I upgraded to v0.0.3, however now the Core2 crashes during setup(). I have narrowed this down to the createSprite() call. I have tried to debug this but I quickly get lost in the M5GFX code.
Here is a shortened version of my code:
and here is the ESP32 exception decoder output (just core 1 output). If I'm reading this correctly, the problem seems to be related to a palette colour type, as per decoder lines 6 and 5.
I haven't tried the devlop branch to see if this fixes the problem yet. Please let me know if I've done something wrong, or what I can try to fix this. Thanks.