@mdevel1 the problem is AXP Address 0x34 is not responding. Because of that, M5.Axp interface can't connect (and can't power-up screen).
M5.Axp use Wire1 as I2C to communicate on ports 21 and 22, as described in https://github.com/m5stack/M5StickC/blob/master/src/AXP192.cpp.
Because of that, any commands as Wire1.beginTransmission, result in error. The M5.Axp, use Write1Byte to send information (and is not validating if was successful, because of that, I haven't any log).
void AXP192::Write1Byte( uint8_t Addr , uint8_t Data )
The I2C Axp Address (0x34) isn't ready in one of my M5Stick-C. If you have any idea, please let me know -- I'm really trying anything to get AXP fully functional again, because I can't see anything (in display) without Axp.
In my code above, you will see a test in endTransmission as mencioned to test the result.
Thank you by all your attention. Please let me know if you have any idea.
I just experimented with how to solve the problem.
(1) I disconnect the base of M5Stack Fire (it is labeled M5GO) and uploaded the same program many times (until the Fire became "hot condition"). It seemed OK.
(2) I docked the Fire to the original base and uploaded the same program many times and again the issue appeared.
At least in this stage, I can conclude (without knowing the reason) that the base of the M5Stack Fire (M5GO) may be the cause of the problem. The other possibility is that by disconnecting the base, no power is supplied to the core so that everything is reset and things go to normal. I do not know.
please, could you help me? What is M5.powerOFF() doing inside? I am using the esp-idf for my projects with M5Stack and I want Power off from software, but I can only deinitialize all of my routines and turn off display. And when I want to powr on again after power button, then the device turn off first.
@ckuehnel said in M5stack basic core battery power on issue (ip5306 strange power management):
Here is a working code example:
Test of IP5306 functions
// initialize the M5Stack object
Wire.begin(); // required to access IP5306
M5.Lcd.printf("IP5306 Function Test\r\n");
M5.Lcd.printf("No communication with IP5306 chip");
uint8_t bat = M5.Power.getBatteryLevel();
if (M5.Power.isCharging()) M5.Lcd.printf("Battery is charging\r\n");
else M5.Lcd.printf("Battery is not charging\r\n");
M5.Lcd.printf("Battery Level %d", bat);
M5.Lcd.progressBar(0, 220, 360, 20, bat);
Hi, doesn't compile for me!!!
this is the arduino IDE output:
Arduino: 1.8.7 (Mac OS X), Board: "M5Stack-Core-ESP32, QIO, 80MHz, Default, 921600, None"
Build options changed, rebuilding all
/Users/AD/Documents/Arduino/libraries/M5Stack/src/utility/Power.cpp: In member function 'void POWER::powerOFF()':
/Users/AD/Documents/Arduino/libraries/M5Stack/src/utility/Power.cpp:361:28: error: 'gpio_deep_sleep_hold_dis' was not declared in this scope
Multiple libraries were found for "SPI.h"
Not used: /Users/AD/Documents/Arduino/libraries/SPI
Multiple libraries were found for "SD.h"
Not used: /Users/AD/Documents/Arduino/libraries/SD
Not used: /private/var/folders/f3/0kf10ljj6sj4q4twsw_vtxrw0000gn/T/AppTranslocation/395E70C5-F1F6-4076-AA11-9C132A2C6ACF/d/Arduino 1.8.7.app/Contents/Java/libraries/SD
exit status 1
Error compiling for board M5Stack-Core-ESP32.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Hi @heybin !
What do you want to show us with the picture: flickering due to problems with contacts?
Do you know what the meaning is of:
flashing? ( = 1s on > 1s off > 1s on > and so on: charging?)
What I noticed so far:
a) USB charging cable connected to M5GO CHG Base and M5GO CHG Base attached to M5GO Base: LED is flashing and obviously charging
b) M5GO disconnected from M5GO Base: LED = ON for 30 seconds , than OFF, but FIRE is still on and operational (Power from internal Lipo Battery?)
c) M5GO CHG Base attached to M5GO Base, but no power on USB-Cable: same behaviour as item b) above. (Power from internal Lipo battery AND/OR CHG Base Battery?)
For a) and b) so far, I didn't test, for how long the FIRE stays ON.
If it's not connecting to the device, what errors do you see? Paste your command line output here and maybe I can help further.
One other custom I did for ampy... I created the file ~/.ampy with these contents:
# Example .ampy file
# Please fill in your own port, baud rate, and delay
# Fix for macOS users' "Could not enter raw repl"; try 2.0 and lower from there:
If you create that file, you will not have to pass the port and baud rate options when running the ampy command. This is the standard way to run ampy when you don't have the .ampy file created.
world101$ ampy -p /dev/tty.SLAB_USBtoUART -b 115200 ls
Also, I was mistaken on the the v1.2.3 firmware with the beeps disabled by default. I just flashed one of my cores with the M5Burner and the beeps are there. I must have been running a custom firmware before.
How about this example code?