For a long time, I was having a Rockbox USB problem with my 5G 30GB
iPod. If I plugged in USB while the hard drive was spinning, I would
often get full speed mode instead of the much faster high speed mode. If
I plugged in after the hard drive spun down, I would always get high
speed mode.
This was puzzling because it is an obvious and significant problem on a
popular target, yet nobody else seems to be having it.
Yesterday I finally created FS#12865 and investigated the problem. I
tracked it down to a workaround for FS#12303 which resets and
reinitializes the USB controller while the connection is being
established the first time, causing it all to restart from the
beginning. Depending on when this happens, it can lead to a full speed
connection or a high speed connection. Others found some Video iPods
require this workaround, but mine doesn't, and the workaround only
causes problems.
The proper fix for this would be a better solution for FS#12303, which
doesn't cause this problem. I cannot work on this by myself because my
iPod doesn't have the FS#12303 problem so I cannot test solutions. At
the moment, all I can do is offer some ideas.
Maybe electrical noise disrupts USB communication around the time when
USB charging is turned on, and it needs to be totally off while the
connection is being set up? USB power input capability on my iPod is
defective and disabled by cutting a connection on the board. Maybe
that's why I'm not seeing FS#12303. Another possibility is that some
GPIO pins for connecting USB data lines to the PCF ADC for charger
sensing are set incorrectly, leaving the ADC connected and degrading
signal quality. This wouldn't explain why my iPod is unaffected.
As a last resort, I think adding a sleep() before the USB controller
reset would allow the present workaround to stay in place without
triggering the problem. That's messy though, adding a workaround to a
workaround.
Best regards,
Boris