Greetings,

I've been playing with controlling a bq2415x battery charger chip on I2C on a 
custom OMAP4 board. In USB/OTG charging mode the code currently monitors the 
charger chip in a loop to which I added a msleep(2000) call.

I did that thinking that since battery parameters don't change very fast I'd 
slow things down and save power. But it doesn't seem to. That delay ends up in 
an ARMv7/omap-common/timer.c function that is a full-speed read/compare loop 
targeting a CPU timer register. It seems to leave precious little USB power for 
the battery.

Is there any way to make use of the ARM idle instruction and, I assume, an 
interrupt from a timer?

I don't want anything complicated but *something* that would help reduce the 
power being wasted by the _udelay() routine would be nice. If there is I'd like 
to find a way to apply it to the interactive console so sitting at a u-boot 
prompt (instead of in _udelay()) would also not suck power like crazy.

Any ideas?

Is there some solution perhaps on one of the other architectures?

-Mike

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to