Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hwzlovedz/axp2101-pmic
AXP2101 Power management IC(AXP2101电源管理芯片)
https://github.com/hwzlovedz/axp2101-pmic
c cpp esp-idf esp32 esp32-s3 pmic
Last synced: about 1 month ago
JSON representation
AXP2101 Power management IC(AXP2101电源管理芯片)
- Host: GitHub
- URL: https://github.com/hwzlovedz/axp2101-pmic
- Owner: HwzLoveDz
- Created: 2024-08-15T19:42:14.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-08-15T19:54:18.000Z (3 months ago)
- Last Synced: 2024-09-29T15:14:39.919Z (about 2 months ago)
- Topics: c, cpp, esp-idf, esp32, esp32-s3, pmic
- Language: C++
- Homepage:
- Size: 71.3 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# AXP2101-PMIC
AXP2101 Power management IC(AXP2101电源管理芯片)### 硬件开源链接:https://oshwhub.com/mondraker/axp2101_2023-11-18_20-15-19
### 库来自: https://github.com/lewisxhe/XPowersLib
### 我只是把IDF工程独立出来并且整理编译了一遍,这里只是留个记录方便大家直接测试。
***
# XPowersLib Example
### PrerequisitesPlease put XPowersLib and esp-idf in the same level directory, after configuring the esp-idf environment variable, enter `XPowersLib/examples/ESP_IDF_Example` and run the idf.py command directly
### Configure the Project
Open the project configuration menu (`idf.py menuconfig`).
In the `XPowers Configuration` menu:
* Select the PMU Type in the `PMU_Type` option.
* In `PMU SCL GPIO Num` select the clock pin to connect to the PMU,the default is 22
* In `PMU SDAGPIO Num` select the data pin connected to the PMU,the default is 21
* Select the interrupt pin connected to the PMU in `PMU Interrupt Pin`, the default is 35## How to Use Example
Before project configuration and build, be sure to set the correct chip target using `idf.py set-target `.
### Build and Flash
Run `idf.py -p PORT flash monitor` to build, flash and monitor the project.
(To exit the serial monitor, type ``Ctrl-]``.)
See the [Getting Started Guide](https://docs.espressif.com/projects/esp-idf/en/latest/get-started/index.html) for full steps to configure and use ESP-IDF to build projects.
## Example Output
The output information is to configure the output voltage and enable status of the PMU
```
I (345) mian: I2C initialized successfully
I (355) AXP2101: Init PMU SUCCESS!
I (385) AXP2101: DCDC=======================================================================
I (385) AXP2101: DC1 :ENABLE Voltage:3300 mV
I (385) AXP2101: DC2 :DISABLE Voltage:900 mV
I (395) AXP2101: DC3 :ENABLE Voltage:3300 mV
I (395) AXP2101: DC4 :DISABLE Voltage:1100 mV
I (405) AXP2101: DC5 :DISABLE Voltage:1200 mV
I (405) AXP2101: ALDO=======================================================================
I (415) AXP2101: ALDO1:ENABLE Voltage:1800 mV
I (425) AXP2101: ALDO2:ENABLE Voltage:2800 mV
I (425) AXP2101: ALDO3:ENABLE Voltage:3300 mV
I (435) AXP2101: ALDO4:ENABLE Voltage:3000 mV
I (435) AXP2101: BLDO=======================================================================
I (445) AXP2101: BLDO1:ENABLE Voltage:3300 mV
```## Build process example
Assuming you don't have esp-idf yet
```
mkdir -p ~/esp
cd ~/esp
git clone --recursive https://github.com/espressif/esp-idf.git
git clone https://github.com/lewisxhe/XPowersLib.git
cd esp-idf
./install.sh
. ./export.sh
cd ..
cd XPowersLib/examples/ESP_IDF_Example
idf.py menuconfig
idf.py build
idf.py -b 921600 flash
idf.py monitor```