Rockbox

Tasklist

FS#2415 - Rockbox will switch between USB and Play modes

Attached to Project: Rockbox
Opened by Anonymous Submitter - Monday, 20 December 2004, 14:19 GMT
Last edited by Daniel Stenberg (bagder) - Wednesday, 09 March 2005, 10:43 GMT
Task Type Bugs
Category
Status Closed
Assigned To No-one
Operating System
Severity Low
Priority Normal
Reported Version Release 2.2
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

Device: FMR.

Rockbox will switch between USB and Play modes, this
happens on all power sources:
1. USB (as expected)
2. Power adapter
3. Battery

When using a battery (and not connected to the USB
port), the device MIGHT startup on playback mode,
though rarely.

On some cases, the device will switch betweens modes
again and again.

I have no idea if this matter has to do with the software
or not, I understand that there is a good chance this is
a pure hardware matter - but you guys are the masters.

Thanx!
This task depends upon

Closed by  Daniel Stenberg (bagder)
Wednesday, 09 March 2005, 10:43 GMT
Reason for closing:  Out of Date
Additional comments about closing:  Logged In: YES
user_id=1110

This report is very old and concerns a Rockbox version from eons ago.

Lots happen in the Rockbox all the time, and if you still have
problems with this matter I suggest you file a new entry.
Comment by Linus Nielsen Feltzing (linusnielsen) - Monday, 20 December 2004, 14:30 GMT

The obvious question is of course:

How does it behave when you run the original firmware?
Comment by Shai (shaig) - Tuesday, 21 December 2004, 01:32 GMT

Well, a very basic question indeed.

A few more facts:
1. I have Rockbox 2.2 flashed.
2. After messing arround with it, I did manage to reproduce
the problem when booting up with the original Archos
firmware.
3. The USB mode appears to always be the Rockbox one - as
I am not familiar with the details, I assume this behevior is by
design.

As I am not new to hardware and software development, I'd
be greatful if you could provide your insight on the matter:
How is the software triggeres to change modes? (It looks like
disk access/tiny voltage changes, trigger the problem)
Has anyone else had a similare issue?

Thanks again,
Shai.
Comment by Linus Nielsen Feltzing (linusnielsen) - Tuesday, 21 December 2004, 07:53 GMT

It sure sounds like a hardware problem. Maybe some ground
soldering joints are loose, or your battery doesn't connect
properly inside.
Comment by Shai (shaig) - Tuesday, 21 December 2004, 13:11 GMT

A good chance indeed, though I am rather corious about the
way the software gets triggered to switch the mode:
usb/play (interrupt/polling, is the decision done by software
or hardware).

I am sorry for the hassle and appriciate the response,
I also don't mind looking at the source code myself if you
could direct me to the coresponding file name. I assume this
is an interrupt based mechanism.

Comment by Linus Nielsen Feltzing (linusnielsen) - Tuesday, 21 December 2004, 13:23 GMT

Surprisingly enough, the usb detection is in usb.c, you
would want to look at the usb_detect() function.

The USB mode is detected by reading an analog input (AN1).
It is normally 3V (0x3ff), and Rockbox decides that it
should enter USB mode if it goes below 1.5V. On a normal,
working FM/V2 recorder it goes close to 0V when the USB is
inserted.

You could perform an experiment for me:

Go to Menu->Info->Debug->View I/O ports and give me all ANx
readings, with and without USB inserted. The USB mode isn't
detected when in the debug mode, so it's safe to insert the
cable .
Comment by Shai (shaig) - Tuesday, 21 December 2004, 14:04 GMT

Naturally, the fictive USB mode won't repeat (though I see
the power cord icon appear when not in debug).

No cable:
AN0: 0x3FE(-F), AN4: 0x009(-A),
AN1: 0x3FC(-F), AN5: 0x003(-5),
AN2: 0x003(-5), AN6: 0x1AB(-C),
AN3: 0x3FF(--), AN7: 0x000(-3),
Batt: 3.44(-46)V

With cable:
AN0: 0x3FF(--), AN4: 0x009(-A),
AN1: 0x010(-0F), AN5: 0x003(-4),
AN2: 0x000(-3), AN6: 0x1DE(-E1),
AN3: 0x3FF(--), AN7: 0x1D0(-3),
Batt: 3.92V (slowly rising as being charged)

I suspect that this info does not give the full picture, disk
usage is not simulated this way and does have an effect.

BTW, How many reads trigger the change? Is one low AN1
read enough to for Rockbox to switch?
Comment by Daniel Stenberg (bagder) - Wednesday, 09 March 2005, 10:43 GMT

This report is very old and concerns a Rockbox version from eons ago.

Lots happen in the Rockbox all the time, and if you still have
problems with this matter I suggest you file a new entry.

Loading...