Rockbox

Tasklist

FS#2919 - H3x0 charge control and reporting

Attached to Project: Rockbox
Opened by Brandon Low (lostlogic) - Sunday, 15 January 2006, 05:42 GMT
Last edited by Brandon Low (lostlogic) - Wednesday, 18 January 2006, 22:32 GMT
Task Type Patches
Category
Status Closed
Assigned To No-one
Operating System
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

This patch is a little bit rough around the edges still.

That said, it works. On charger insertion, the power
management thread sets the pcf50606 to the desired
state (automatic charge), and goes to sleep. If after
1 minute, the charge current is below the
qualification/precharge current (the battery is full)
it deactivates the charger, otherwise, it lets it
charge until it's full, and either the hardware or the
software will deactivate it at that point.

Features:
* %bc added to WPS for whether the charger is charging
(only on targets that support this).
* Faster battery level updates (simple change, very
low cost, move the battery_status_update from the
power_thread ot the power_thread_sleep, we read the ADC
here any way which is the slower operation)
* Don't read the GPIO for every statusbar or WPS
update to check charger status, just read it from the
variable that's updated in the powermgmt.c anyway.
* New debug menu option to monitor the status of the
battery charger registers.

Roughness:
The #ifdef and names of defines could use some work.
I'm not entirely consistent throughout with them, and
it might be better to define something in the
pcf50606.h that tells things how to behave instead of
doing it in the config-h300.h. I need rockbox
developer input on that part (or they can just fix it
to their liking in the patch before applying).
This task depends upon

Closed by  Brandon Low (lostlogic)
Wednesday, 18 January 2006, 22:32 GMT
Reason for closing:  Rejected
Comment by Anonymous Submitter - Sunday, 15 January 2006, 08:48 GMT

if this works, i'll kiss your toes. thank you!
Comment by Anonymous Submitter - Sunday, 15 January 2006, 15:06 GMT

Doesn't quite work right yet. I just noticed a bug in it.
Shuts off charging too early sometimes so the battery
doesn't end up fully charged. Working on it.
Comment by Rob2222 (rob2222) - Sunday, 15 January 2006, 22:22 GMT

A option "no internal battery charge when AC connected"
would be fine for the external battery pack. So the player
only gets the power required for playback from the battery
and doesnt waste energy for loading the internal battery.

Dont know if a option in preferences is better or a key
combination.

BR Robert
Comment by Brandon Low (lostlogic) - Wednesday, 18 January 2006, 22:32 GMT

was controlling the wrong chip. drop this.

Loading...