Xinyuan-LilyGO / LilyGo-LoRa-Series

LILYGO LoRa Series examples
678 stars 183 forks source link

AXP2101 Outputs #155

Closed StuartsProjects closed 5 months ago

StuartsProjects commented 7 months ago

I have a T-BEAM AXP2101 V2.1 with SX1262

There are examples for using the AXP2101, but I cannot find a clear list of what each of the AXP2101 channels actually controls on the T-Beam board.

I found this list of outputs defined;

/*
| CHIP            | AXP2101                                           |
| ------------  | ------------------------------------- |
| DC1             | 1.5-3.4V                                  /2A    |
| DC2             | 0.5-1.2V,1.22-1.54V                /2A    |
| DC3             | 0.5-1.2V,1.22-1.54V,1.6-3.4V  /2A    |
| DC4             | 0.5-1.2V,1.22-1.84V               /1.5A  |
| DC5             | 1.2V,1.4-3.7V                         /1A     |
| LDO1(VRTC) | 1.8V                                     /30mA  |
| ALDO1         | 0.5-3.5V                             /300mA |
| ALDO2         | 0.5-3.5V                             /300mA |
| ALDO3         | 0.5-3.5V                             /300mA |
| ALDO4         | 0.5-3.5V                             /300mA |
| BLDO1         | 0.5-3.5V                             /300mA |
| BLDO2         | 0.5-3.5V                             /300mA |
| DLDO1         | 0.5-3.3V/ 0.5-1.4V             /300mA |
| DLDO1         | 0.5-3.3V/ 0.5-1.4V             /300mA |
| CPUSLDO     | 0.5-1.4V                             /30mA  |
*/

And then these terms in the XPOWERslib;

XPOWERS_DCDC1:
XPOWERS_DCDC2:
XPOWERS_DCDC3:
XPOWERS_DCDC4:
XPOWERS_DCDC5:
XPOWERS_ALDO1:
XPOWERS_ALDO2:
XPOWERS_ALDO3:
XPOWERS_ALDO4:
XPOWERS_BLDO1:
XPOWERS_BLDO2:
XPOWERS_VBACKUP:
XPOWERS_CPULDO:

And all the names dont quite match.

So is there a list of what on the TBeam board is controlled by which channel on the AXP2101 ?

lewisxhe commented 7 months ago

https://github.com/Xinyuan-LilyGO/LilyGo-LoRa-Series/blob/508a4b9d3fd48779c2201e5eb9aadccfeded463c/examples/RadioLibExamples/SX1276/SX1276_Transmit_Interrupt/boards.h#L131

github-actions[bot] commented 6 months ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 5 months ago

This issue was closed because it has been inactive for 14 days since being marked as stale.

moshe-braner commented 5 months ago

Note, if you want your code to work on both the T-Beam v1.2 with AXP2101, and v1.1 with the AXP192, that the LDO outputs are named differently in the xpowerslib: ALDO2, ALDO3 in the AXP2101, and LDO2, LDO3 in the AXP192. If you use the wrong name there will be no error message, neither at compile time nor at runtime (there should be!), but those outputs will not be active (e.g., the LORA chip will not work).

I found this out after adapting code from "XPowersLibInterface_Example" to allow the choice of the AXP type to be done at runtime. Found that through that API a few functions are missing, e.g., PMU->enableButtonBatteryCharge();