Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Rockbox Ports are now being developed for various digital audio players!

+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  How does charger detection get to the WPS?
« previous next »
  • Print
Pages: [1]

Author Topic: How does charger detection get to the WPS?  (Read 4279 times)

Offline yapper

  • Rockbox Expert
  • Member
  • *
  • Posts: 794
How does charger detection get to the WPS?
« on: August 16, 2008, 09:34:19 AM »
On the 2G iPod, the charger connection doesn't appear to be detected. It was (still is?) a problem on the 4G (FS#5826 - no "charger status" in iPod 4g Gray) too.

I've worked out the GPIO inputs to monitor to detect external power, but I don't know what mechanism is used to pass this info to the WPS to allow the charger status to be displayed.

Can someone offer some pointers?
Logged
G2 iPod 20GB / Sansa c240 v1 + 2GB microSD / Sansa c250 v1 / Sansa e250 v1 + 8GB microSDHC / Sansa Fuze v2 + 32GB microSDHC

Offline mcuelenaere

  • Developer
  • Member
  • *
  • Posts: 392
Re: How does charger detection get to the WPS?
« Reply #1 on: August 16, 2008, 11:39:38 AM »
Try firmware/target/arm/ipod/power-ipod.c
Logged

Offline yapper

  • Rockbox Expert
  • Member
  • *
  • Posts: 794
Re: How does charger detection get to the WPS?
« Reply #2 on: August 17, 2008, 11:11:08 AM »
Thanks for that. I've now got charger detection showing on the 2G WPS.

I also had to change config-ipod1g2g.h to #define CONFIG_CHARGING, but I'm not sure if CHARGING_MONITOR or CHARGING_SIMPLE is also required. Currently I'm using CHARGING_MONITOR.

What I can't find is a way to detect 'charging in progress' - again any pointers welcomed!  :)
Logged
G2 iPod 20GB / Sansa c240 v1 + 2GB microSD / Sansa c250 v1 / Sansa e250 v1 + 8GB microSDHC / Sansa Fuze v2 + 32GB microSDHC

Offline mcuelenaere

  • Developer
  • Member
  • *
  • Posts: 392
Re: How does charger detection get to the WPS?
« Reply #3 on: August 17, 2008, 11:13:23 AM »
Quote from: yapper on August 17, 2008, 11:11:08 AM
...
What I can't find is a way to detect 'charging in progress' - again any pointers welcomed!  :)
Did you already try 'bool charging_state(void)' in the same file?

BTW if you get it working, don't forget to post a patch in the Flyspray tracker so it can be committed to SVN.
Logged

Offline yapper

  • Rockbox Expert
  • Member
  • *
  • Posts: 794
Re: How does charger detection get to the WPS?
« Reply #4 on: August 17, 2008, 12:20:03 PM »
Quote from: mcuelenaere on August 17, 2008, 11:13:23 AM
Did you already try 'bool charging_state(void)' in the same file?
Yes - I can force the 'charging' indication to appear on the WPS.
GPIOB bits 6 and 7, and GPIOC bit 7 all seem to indicate charger connected, but I can't see which GPIO bit indicates 'charging'.

Quote from: mcuelenaere on August 17, 2008, 11:13:23 AM
BTW if you get it working, don't forget to post a patch in the Flyspray tracker so it can be committed to SVN.
Sure - I will.
Logged
G2 iPod 20GB / Sansa c240 v1 + 2GB microSD / Sansa c250 v1 / Sansa e250 v1 + 8GB microSDHC / Sansa Fuze v2 + 32GB microSDHC

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: How does charger detection get to the WPS?
« Reply #5 on: August 17, 2008, 12:28:20 PM »
Isn't charging handled by the PCF50605 chip on the 2G?  I assume you'd get the status of that over I2C.
Logged

Offline yapper

  • Rockbox Expert
  • Member
  • *
  • Posts: 794
Re: How does charger detection get to the WPS?
« Reply #6 on: August 17, 2008, 12:38:51 PM »
I think that is true of the 3G, but the 1G (and 2g?) apparently uses an LTC1731, which has a simple active low 'charging' IO pin.

http://electronicdesign.com/Articles/Index.cfm?AD=1&ArticleID=9500&pg=2

EDIT: The patch for detection of charger connection is here: http://www.rockbox.org/tracker/task/9295
« Last Edit: August 17, 2008, 09:04:35 PM by yapper »
Logged
G2 iPod 20GB / Sansa c240 v1 + 2GB microSD / Sansa c250 v1 / Sansa e250 v1 + 8GB microSDHC / Sansa Fuze v2 + 32GB microSDHC

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  How does charger detection get to the WPS?
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.073 seconds with 14 queries.