Tracking down strange instability issues on Nexus 5/OPO

59 views
Skip to first unread message

James Warner

unread,
Dec 31, 2015, 5:53:38 PM12/31/15
to ioio-users
Having some odd troubles with the IOIO-OTG

Running HelloIOIO using latest software/firmware and Hello IOIO app - have an odd problem every few USB reconnects when using a Nexus 5. Every now and again when re-attaching the IOIO to the phone (IOIO remains powered) helloIOIO shows connected, disconnected, connected, disconnected in a loop. The next time you attach the IOIO -  nothing happens at all. The only way to get out of this "locked" IOIO state is to remove and reattach power to the IOIO (it will no longer show up on any phone, though it still charges whatever is connected).
When using an OneplusOne phone, it seems impossible to get it to break from a fresh reboot - but after disconnecting from the N5 - sometimes you can get it into the connect/disconnect loop to appear on the One plus one - and then it no longer functions (same behaviour as the N5) until power is cycled to the IOIO.

Any ideas - any logs I can gather?  I'm using the IOIO in open-accessory mode I believe. IOIO is set to Auto detect, and android pops up asking what app you want to use for this accessory...

Thanks,
James

James Warner

unread,
Dec 31, 2015, 5:57:08 PM12/31/15
to ioio-users
Apologies it's running in USB host mode - have also tried the switch set to H
Message has been deleted

James Warner

unread,
Jan 1, 2016, 11:54:14 AM1/1/16
to ioio-users
Also tested same behaviour is present in AOA mode

James Warner

unread,
Jan 6, 2016, 11:30:22 AM1/6/16
to ioio-users
Further troubleshooting has linked the instability to using USB fast charge - ( before anyone asks the voltage source is stable (and not supplied via the IOIO regulator)
Maybe not the IOIO at fault, but it would be good to enable the IOIO to auto recover when the connection does break - as once the IOIO goes into the failed state, it doesn't matter what phone you connect - it needs a power cycle

Ytai Ben-Tsvi

unread,
Jan 12, 2016, 6:30:28 PM1/12/16
to ioio-...@googlegroups.com
Sorry for taking long to respond and thanks for reporting the issue and looking into possible causes.
I believe I've seen this issue in the past on an N7, but wasn't able to reproduce. I'm interested in having this case diagnosed and fixed.
What did you mean exactly by "linked the instability to using USB fast charge"? And why/how did you bypass the IOIO on-board regulator?


On Wed, Jan 6, 2016 at 8:30 AM, James Warner <jamesw...@gmail.com> wrote:
Further troubleshooting has linked the instability to using USB fast charge - ( before anyone asks the voltage source is stable (and not supplied via the IOIO regulator)
Maybe not the IOIO at fault, but it would be good to enable the IOIO to auto recover when the connection does break - as once the IOIO goes into the failed state, it doesn't matter what phone you connect - it needs a power cycle

--
You received this message because you are subscribed to the Google Groups "ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ioio-users+...@googlegroups.com.
To post to this group, send email to ioio-...@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.

James Warner

unread,
Jan 13, 2016, 6:06:54 AM1/13/16
to ioio-users
No worries Ytai - thanks for the response -

Because it's an always on application (car dashboard) I need more than 500mA through the USB port as using full brightness/gps/data logging/GPU. With a fastcharge capable ROM I can enable USB fast charge (which gets about 600mA on the Nexus 5), and then I change a value on the phones charger chip via kernel value to change the fast charge current up to 900mA. This second value is reset every time a new USB device is detected - so I write the value every time the IOIO connects. This sometimes causes a USB data glitch which knocks the IOIO out, but the instability also seems present when using "normal" USB fast charge - just less prevalent. If i completely disable the USB fast charge, I cannot replicate the failure easily (but have still had occasional failures when testing for a day or so).  It seems to just be a glitch in android's USB comms that knocks out the IOIO, and perhaps I'm causing a glitch more often with the high current mode.

I use an OTG Y cable to supply 5V direct to phone - which avoids problems I've had when using the IOIO regulator (think it's the current limiting circuit which often sags below 5V, the charge rate is incredibly sensitive to voltage drop) The problem is present with the onboard reg too though

James

James Warner

unread,
Feb 23, 2016, 3:40:33 AM2/23/16
to ioio-users
Ytai - still struggling with this, it's the last piece in the project working!

Really keen to work with you to implement a watchdog reset in case the USB locks up at the IOIO end - I'm not skilled coding for PICs but happy to assist in any other way

James

Ytai Ben-Tsvi

unread,
Feb 23, 2016, 11:23:16 PM2/23/16
to ioio-...@googlegroups.com
Do you have an ability to scope the 5V rail and possibly the USB VBUS rail? Would be interesting to see whether the drops are possibly associated with voltage sags resulting from high current (either continuous or transient). Also, if you look at the schematic, you'll notice the resettable fuse F1, which adds some additional series resistance on the VBUS rail causing additional sagging. Really, the IOIO was designed with the standard 500mA in mind, but if you bypass (short) this fuse I see no reason why you shouldn't be able to exceed that. And I wouldn't recommend you to use an external regulator, unless you have an actual reason to believe that the on-board one is problematic. The current limiting circuit should not add significant ESR I believe (assuming the pot is fully-clockwise, of course).

--

James Warner

unread,
Feb 24, 2016, 4:11:52 PM2/24/16
to ioio-users
I have scoped with no significant voltage drop - besides the IOIO can enter this locked up state purely while left to it's own devices with no load changes

I'm using an external regulator because the Nexus 5 charge current is incredibly sensitive to voltage and needs just over 5v to maintain a charge. I supply this on the device side of the fuse to avoid the drop over that. (same glitch that occurs with onboard regulator anyway)
  • I've discovered the reason I see the problem more often with fast charge is fastcharge reconnects the USB host as it has to be run after a cable is connected - making for 2 chances to lock up the ioio each time instead of 1 - so for simplicity I'll continue all testing without fast charge.
  • Is there a way to see if the PIC itself has locked up? All I know is you can cycle the cable, and reboot the phone but the only fix after this situation is an IOIO reboot, so it's definitely a state that exists within the USB controller or PIC itself
  • Same behaviour on two N5s and two different IOIOs

James

James Warner

unread,
Feb 27, 2016, 3:53:20 PM2/27/16
to ioio-users
I see some others having similar problems, and I realise your schedule might not allow a complete usb rework - would it be possible to release a watchdog version of firmware as a temp fix that would reset the PIC if USB connection dropped or no data received for a few seconds? (The disconnects I'm seeing can't be solved with a cable replug or android cycle)
James
Reply all
Reply to author
Forward
0 new messages