Github Boards Devices Community Docs Blog

M5Stack not working in low power mode 2

Having had delivery of a new M5Stack (never used one before) I thought I would try OMG 0.9.5 as BLE gateway on that instead of my ESP32 Dev board.

It seems to work fine in low power mode 0 but (not sure about low power mode 1 as I never got any readings from my LYWSD03MMC) and in low power mode 2 it just doesn’t behave at all - after building the 0.9.5 master with LOG_LEVEL_LCD set to LOG_LEVEL_NOTICE and LOG_TO_LCD false - this is what I see on the USB serial

/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/queue.c:1442 (xQueueGenericReceive)- assert failed!
abort() was called at PC 0x4008e6f9 on core 1

Backtrace: 0x4009261c:0x3ffcca50 0x4009284d:0x3ffcca70 0x4008e6f9:0x3ffcca90 0x400f4643:0x3ffccad0 0x400dafb0:0x3ffccaf0 0x400d27b8:0x3ffccb10 0x400d7b23:0x3ffccb30 0x400d82b4:0x3ffccb50 0x400d85d0:0x3ffccb90 0x400d8748:0x3ffccbc0 0x400d8794:0x3ffccbe0 0x400d880b:0x3ffcce30 0x401853ff:0x3ffcce50 0x400d9246:0x3ffcce70 0x400d8a2a:0x3ffcceb0 0x400f513d:0x3ffcced0 0x4008ea0d:0x3ffccef0

ets Jun 8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee

I had to erase and refalsh to recover.

I have also noticed that my TP Link router sees both the ESP32 Dev board and the M5Stack as ‘espressif’ in the list of connected devices where my RPi and Windows and most other devices show a hostname - although Windows and my RPI resolve the .local hostnames of them both correctly.


I got it working with the development branch and the following environment for info:

platform = ${com.esp32_platform}
board = m5stack-core-esp32
board_build.partitions = min_spiffs.csv
lib_deps =
build_flags =

#define LOG_TO_LCD false

As I had 0.9.5 working in low power mode 0 (running off mains PSU) I had not bothered to look at this again until today.

Having flashed 0.9.6 release version and carried out a few tests - so far lower power mode 0 works fine.

In low power mode 1 only seems to work when the M5Stack is powered from external source.

without external power it appears to get one lot of readings, just go into sleep mode and never wake up - the screen goes off, LWT in home/OpenMQTTGateway goes to offline (a few moments later) and even having left it for 30 minutes I do not get any sensor readings (I never noticed the screen come on).

Pressing the RED button wakes it up, it reads my sensors, publishess them to MQTT and it goes off again and that is it.

On setting to low power mode 2 (whilst using external power from RPI4 so I can see the USB console) the screen goes blank and the console shows rapid reboot cycles during which it seems to connect to the WiFi and MQTT and never achives anything else (even though I can see it read the MQTT config where I changed that to attempt to go back to lower power mode 1 or 0) - only a reflash gets it back to a working state.

Thanks for the info, I will take a look to this.

I reproduce the issue in low power mode 1.

Just for my curiosity what is the use case behind using the M5Stack with low power mode?