So if anyone else stumbles upon this...
I had M5.powerbegin() in my code, and that will of course enable i2c, so that's the reason for my issues.
So if anyone else stumbles upon this...
I had M5.powerbegin() in my code, and that will of course enable i2c, so that's the reason for my issues.
Hi.
I am trying to use this as normal inputs.
I have a square wave signal input, and if the signal is present during boot I cannot read it.
If I boot with nothing connected, I can connect and it works like expected.
Is there some special behavior on this pins if they are high or low at boot?
Hi again.
I have experimented a lot now, my current power settings are as follows:
M5.Power.setPowerBoostOnOff(false); 	//Change the power on / off method. The power does not turn off when connected via USB. true=Press and hold to turn on / off. false=Turn on / off with two short presses.
M5.Power.setPowerBoostSet(true);		//Change the power on / off method true=ON / OFF in one short press. false=same as above
M5.Power.setPowerVin(true);				//When the power supply from USB etc. is cut off, Decide whether to turn on the power again.
M5.Power.setPowerBtnEn(true);			//Set whether to accept the power button.
M5.Power.setPowerBoostKeepOn(false); 	//Always output power. True= Always output power. False=not Always output power.
M5.Power.setAutoBootOnLoad(true);		//Set whether to automatically start when power consumption occurs
This lets me turn the M5 off/on with the power button with single click. However, it does NOT work if the USB HOST module is connected.
I can turn it off, but it never turns on again, until I connect usb to the M5core directly.
Use one 120ohm resistor in each end of the bus.
If unclear try google for "rs485 termination"
I have the same button #52 issue.
A small delay in the loop (ref comments in the issue) makes it a lot better, but I still experience it some times and need to keep that in account.
Mine only reboot if I try to turn it off by double click.
Is there a way to actually turn it off from software?
Hi.
I have a setup with M5Core with the USB host module and GO battery.
My issues are as follows:
I use M5.poweroff after a timeout, but does not seem like the usb module powers off.
There is a significant power drain somewhere.
When the battery is depleted the M5 will not start up again, even if I fully charge the GO.
Only way to wake it is to put power into the M5 USBC connector.
Does anyone have a suggestion?
I use the included PowerOFF example.
Deepsleep works fine.
Here it is, I use it unmodified.
As soon as I push btn A it reboots with the guru error.
#include <M5Stack.h>
// the setup routine runs once when M5Stack starts up
void setup(){
// initialize the M5Stack object
M5.begin();
/*
Power chip connected to gpio21, gpio22, I2C device
Set battery charging voltage and current
If used battery, please call this function in your project
*/
M5.Power.begin();
// Lcd display
M5.Lcd.println("This is software power off demo");
M5.Lcd.println("Press the button A to power off.");
}
// the loop routine runs over and over again forever
void loop() {
if(M5.BtnA.wasPressed()) {
M5.Power.powerOFF();
}
M5.update();
}
Even with the simple PowerOFF example included I get a Guru when I try to shut it down, resulting in automatic restart.
Same result if I run it on USB, the M5 (red) battery module or the Go Battery module.
Any suggestions?
Module: Core Basic
Error:
Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.
Core 1 register dump:
PC      : 0x400e2c28  PS      : 0x00060130  A0      : 0x800d3786  A1      : 0x3ffb1f30
A2      : 0x00000000  A3      : 0x3ffbf75c  A4      : 0x00000001  A5      : 0x0000001d
A6      : 0x00000000  A7      : 0x3ffb0060  A8      : 0x800e2e02  A9      : 0x3ffb1f10
A10     : 0x00000014  A11     : 0x0000001d  A12     : 0x00000001  A13     : 0x00000007
A14     : 0x00000020  A15     : 0x3ffb0060  SAR     : 0x00000005  EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000134  LBEG    : 0x4000c2e0  LEND    : 0x4000c2f6  LCOUNT  : 0x00000000
Backtrace: 0x400e2c28:0x3ffb1f30 0x400d3783:0x3ffb1f60 0x400d1136:0x3ffb1f90 0x400d7e5d:0x3ffb1fb0 0x40089819:0x3ffb1fd0
Rebooting...