Confusing M5Core2 Initialization



  • Here is my INIT code in Arduino:
    M5.begin();
    M5.Lcd.print("IOT DEVICE MONITOR");
    WiFi.begin(ssid, pass); //connect to WiFi
    delay(2000);
    Serial.begin(115200);
    Serial.println("IOT DEVICE MONITOR");

    The response is:
    M5Core2 initializing...axp: vbus limit off
    axp: gpio1 init
    axp: gpio2 init
    axp: rtc battery charging enabled
    axp: esp32 power voltage was set to 3.35v
    axp: lcd backlight voltage was set to 2.80v
    axp: lcd logic and sdcard voltage preset to 3.3v
    axp: vibrator voltage preset to 2v
    touch: FT6336 ready (fw id 0x10 rel 1, lib 0x300E)
    OK

    The first M5.Lcd.print is displayed, then we go no further, stopping at the "OK" message after FT6336.
    About one in 10x it works correctly. What is missing here?



  • Hello @rmetzner49

    try without the extra Serial.begin(115200). By default Serial gets already initialized when the M5.begin() function is called. I've seen things go wrong before when Serial is initialized twice.

    Thanks
    Felix