Skip to content
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

Init AXP2101 from C code for T-Watch-S3 #9582

Merged
merged 6 commits into from
Sep 3, 2024

Conversation

bill88t
Copy link

@bill88t bill88t commented Aug 30, 2024

This skips the need to do the PMIC init for sane default usage.
Pending testing and consideration of which ldo's to enable on boot.

@bill88t bill88t marked this pull request as ready for review August 30, 2024 21:50
@bill88t
Copy link
Author

bill88t commented Aug 30, 2024

Ready to go. Tested by a different board revision and my own unit.
This ensures even on early revisions which lack AXP2101 default settings, everything will work out of the box and removes the need of having to configure pmic.

@bill88t bill88t marked this pull request as draft August 31, 2024 11:55
@bill88t bill88t marked this pull request as ready for review August 31, 2024 13:43
@bill88t
Copy link
Author

bill88t commented Aug 31, 2024

IMPORTANT! Some early engineering units have efuses that incorrectly attempt to charge the batteries to 4.35V.
Even on factory fw.

This last commit will forcefully set the charging target to be 4.2V as intended.

@RetiredWizard
Copy link

RetiredWizard commented Aug 31, 2024

I loaded this artifact and it runs my clock program fine, I didn't test any of the charging components but as far as I can see everything seems to be working as it should. (display, WiFi, speaker, touchscreen)

@bill88t
Copy link
Author

bill88t commented Aug 31, 2024

I'll get trickle charging in too, one moment.

@bill88t
Copy link
Author

bill88t commented Aug 31, 2024

Alright this is now ready to go, hopefully no more "discoveries".

Tested it, it now charges @ 500mA until it reaches approx 4.185V.
I'm not very knowledgeable in battery chemistry but I have a feeling I shouldn't permit full 4.2V charge.
Verified with a "Battery Doctor" and the pmic adc reading.

Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@tannewt tannewt merged commit 7cfd0fe into adafruit:main Sep 3, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants