markqvist / RNode_Firmware

RNode is an open, free and flexible digital radio interface with many uses
https://unsigned.io/rnode
GNU General Public License v3.0
173 stars 62 forks source link

Switch from old AXP202X_Library to new XPowersLib #53

Closed attermann closed 8 months ago

attermann commented 9 months ago

This PR adds support for the newer v1.2 T-Beam boards which use the new AXP2101 PMU in place of the AXP192 PMU used in v1.1 boards. This fixes the issue where the v1.2 board hangs on radio access, and reports failure to start radio on power-cycle.

I attempted to keep AXP192 support as close as possible to what it was previoulsy, and to implement new AXP2101 support as closely as possible to AXP192. Some features appear to be missing though in the AXP2101 implementation (eg battery and vbus current measurements). It also wasn't clear how to disable the OLED at the PMU on the AXP2101 so I left that out for now.

markqvist commented 9 months ago

Thanks, looking good! I'll merge this as soon as I am able to test it out on a bunch of T-Beams.

markqvist commented 9 months ago

Actually, just gonna merge this now. Did you try it on the old PMU as well, or could you only test it on AXP202X?

attermann commented 9 months ago

Unfortunately I only have v1.2 boards so I wasn't able to test on the older AXP192.

Erethon commented 9 months ago

I have a t-beam with an AXP192, so I checked out atermann's branch and compiled the firmware for it. It flashed successfully and rnsd is able to properly use the device and transmit packets. I haven't looked at the code at all, I can just confirm it seems to be backwards compatible in the real world ;)

markqvist commented 8 months ago

Thanks @Erethon! Good to hear!