Created
December 16, 2013 19:14
-
-
Save pamaury/7992611 to your computer and use it in GitHub Desktop.
Interactive session with hwstub_shell to enable battery charging manually
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> HW.LRADC.CTRL0.SFTRST.clr() | |
> HW.LRADC.CTRL0.CLKGATE.clr() | |
> HW.LRADC.DELAYn[0].TRIGGER_LRADCS.write(0x80) | |
> HW.LRADC.DELAYn[0].TRIGGER_DELAYS.write(0x1) | |
> HW.LRADC.DELAYn[0].DELAY.write(200) | |
> HW.LRADC.DELAYn[0].KICK.set() | |
> HW.LRADC.CONVERSION.AUTOMATIC.set() | |
> HW.LRADC.CONVERSION.SCALE_FACTOR.write("LI_ION") | |
> print(HW.LRADC.CONVERSION.SCALED_BATT_VOLTAGE.read()) -- will write battery voltage / 8 | |
498 | |
> HW.POWER.CHARGE.STOP_ILIMIT.write(1) | |
> HW.POWER.CHARGE.BATTCHRG_I.write(0x10) | |
> HW.POWER.CHARGE.PWD_BATTCHRG.clr() | |
> HW.POWER.DCDC4P2.ENABLE_4P2.write(1) | |
> HW.POWER['5VCTRL'].PWD_CHARGE_4P2.clr() | |
> HW.POWER['5VCTRL'].CHARGE_4P2_ILIMIT.write(0x10) | |
> print(HW.POWER.STS.CHRGSTS.read()) -- should print 1 if charging | |
1 | |
> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment