-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add M5Stack Core2 #7854
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add M5Stack Core2 #7854
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like the AXP192 is used on on the M5 Stick C as well. Is this just the same code, or close? Could you refactor so that the code is in a common place, say in a couple of files in ports/espressif
, in a directory or not?
The AXP192 is used in several M5Stack products:
Each of these devices use some AXP192 LDO/GPIO lines in the same way but other lines in different ways. For example all board use DCDC1 for MCU_VDD but only on Core2 LDO3 drive the vibration motors. I think it would be nice also to create a custom "pmic" module exposed to python for each of these board. The pmic module then can user the AXP192 functions to control LDOs and GPIOs. For example the pmic module of M5Stack Core2 will expose a public property to set the vibration motor instensity. Internally it use the AXP192 module to set LDO3 voltage. It will be convenient to have the pmic module built in the circuitpython firmware, it will control all the board devices: lcd backlight, microphone power supply, speaker power supply, etc.. I'm a very newbby to CircuitPython development. What it would the best way to create the pmic custom module for each board. A c module? Something else? |
@CDarius could the AXP code just be written as a CircuitPython library? I don't know how low-level it needs to be. For instance, if a non-espressif board had an AXP192 attached, or the AXP192 were on a breakout, would you just want a library? There are examples of port-specific modules, such as |
@dhalbert Yes it could be written as CircuitPython python library, AXP192 is just an I2C device with some register that handler LDOs and GPIOs. |
Could you explain this in more detail? What makes that necessary compared with just initializing them in |
The AXP192 is a power management IC, it handle the board power supply from different sources (battery, usb, m-bus) and power the different on board devices. For example on Core2 the For your reference the Core2 schematics |
Thanks, got it. So adjusting the power management in, say, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Add baord M5Stack Core2