• Status Closed
  • Percent Complete
  • Task Type Patches
  • Category
  • Assigned To No-one
  • Operating System
  • Severity Low
  • Priority Very Low
  • Reported Version
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by lostlogic - 2006-01-15
Last edited by lostlogic - 2006-01-18

FS#2919 - H3x0 charge control and reporting

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.

* %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.

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).

Closed by  lostlogic
2006-01-18 22:32
Reason for closing:  Rejected
Anonymous Submitter commented on 2006-01-15 08:48

if this works, i'll kiss your toes. thank you!

Anonymous Submitter commented on 2006-01-15 15:06

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.

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

BR Robert

was controlling the wrong chip. drop this.


Available keyboard shortcuts


Task Details

Task Editing