• Status Closed
  • Percent Complete
  • Task Type Bugs
  • Category Battery/Charging
  • Assigned To No-one
  • Operating System iPod 4G Color
  • Severity Low
  • Priority Very Low
  • Reported Version Daily build (which?)
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by Jakub Matoušek - 2009-02-18
Last edited by Boris Gjenero - 2009-04-19

FS#9926 - System -> rockboxinfo shows Battery: Charging even if I run on battery

In daily build r20040 the System → rockboxinfo shows Battery: Charging even if I run on battery

Indicators in statusbar and wps display correct non-charging icon

Closed by  Boris Gjenero
2009-04-19 22:22
Reason for closing:  Fixed
Additional comments about closing:  

Fixed in r20752

Jakub Matoušek commented on 2009-02-18 17:31

With Release 3.1 it displays correctly battery level and estimated time left

Jakub Matoušek commented on 2009-02-21 15:02

This happens since r19872: “Make sure ‘Battery: Charging’ is displayed in the info screen when charging no matter the algorithm (Archos Recorder still specially handled). Have screen refresh itself at 1HZ if CONFIG_CHARGING”

Boris Gjenero commented on 2009-02-21 21:58

It works on my 5G 30GB. I guess the bit being tested in charging_state() in firmware/target/arm/ipod/power-ipod.c is incorrect on 4G iPods. Note how other bits are at different locations on different iPods. Someone needs to find how to detect if a 4G iPod is charging. “View I/O ports” in the debug menu may help. Note that other bits report presence of FireWire and USB power.

Jakub Matoušek commented on 2009-02-28 20:22

On iPod Color the GPIO D changes from F0 to F8 when charger is connected

Boris Gjenero commented on 2009-02-28 22:11

GPIOD_INPUT_VAL & 8 just detects voltage at the USB +5V input. This does not mean that the battery is charging. It might be full or hardware might not be configured properly (see  FS#8802 ). To properly implement charging_state() you need some way to know that the battery is charging.

BTW I wonder why this bit isn’t being used. It was used at one point, eg.

Boris Gjenero commented on 2009-03-23 06:09

I think I found the “charging” bit for Photo and Colour iPods: GPO32 & 1. It seems like the word at 0×70000088 may be a latching input for GPO32 bits; the OF writes a 0 and then reads to check if the bit is set.

For other iPods the code still checks GPIOB_INPUT_VAL & 0×01. That should at least be valid for 4G mono, 5/5.5G, 2G Mini and 1G Nano. It might still be wrong for some other iPods.

Alex Meyer commented on 2009-03-25 21:52

The patch seems to work.
Perhaps someone should add this bug to the 3.2 release notes.

Ali Amir commented on 2009-03-26 00:59

I can verify the patch solves the problem, and I agree it should be listed as a known issue.

Boris Gjenero commented on 2009-03-28 06:30

Thanks for testing. Just to confirm: With the patch, do you see “battery: charging” when the battery is actually charging? Does it go back to displaying remaining time when the battery is full or external power is removed?

I see that 1G and 2G iPods use GPIOB_OUTPUT_VAL & 0×01 to enable and disable the wheel. The same pin cannot be used as an input, so those iPods must also use a different pin.

I don’t have wiki access. I’ll see what I can do about getting it added to the release notes tomorrow.

Jakub Matoušek commented on 2009-04-01 07:11

Great work Boris



Available keyboard shortcuts


Task Details

Task Editing