PropPlug reset on USB activity
TreeLab
Posts: 138
I have a SpinStudio board that is wired to the PC via the PropPlug. WHen I connect a USB drive (either a flash or a portable HDD) to another port the program running on the Prop seems to reset. I do not think it is a power issue since the PropPlug is working on a powered USB hub. THis machine is running XP Service Pack 2.
Is this a known behaviour, or is my hardware getting flakey (not the SpinStudio Brian : It is terrific!). Any suggestions for a fix?
Cheers!
Paul Rowntree
Is this a known behaviour, or is my hardware getting flakey (not the SpinStudio Brian : It is terrific!). Any suggestions for a fix?
Cheers!
Paul Rowntree
Comments
I think that sometimes, when you plug in a device that draws some power, there's surge that causes the USB hub to reset which causes the PC to have to go out and catalog what devices are still out there. That enumeration process resets the PropPlug (and other USB to serial adapters) and causes the brief loss of DTR (data terminal ready) which resets the Propeller (or Stamp).
Bobb Fwed,
You're not really supposed to connect a PropPlug or other external device to a "live" custom board unless you've designed for that circumstance. I would expect the Propeller to reset if you connect the PropPlug without the ground connecting first. That's why connectors designed for "live" insertion are designed so the grounds have to touch first.
It's not normally critical that my devices don't reset when I plug them in, but sometimes it is useful. I have a bit of a mickey mouse setup to hook my boards to the PorpPlug; I just use the three-wire servo cable to use for data and reset, and a separate wire for the ground. This allows me to attach the ground first (and separate) before the other connectors.
When you say, "You're not really supposed to connect a PropPlug or other external device to a 'live' custom board", it's not going to damage the plug is it?
I had not realized that devices could glitch the system even on other powered hubs, but your explanation makes sense.
To take this one step further, I had been planning to use Hanno's ViewPort (what a great program!) as the permanent front-end to my device, but that means keeping the high-speed PropPlug in place, and therefore being subject to these 'glitches' when another device is connected. Is there any way around this, short of putting a removable jumper on the DTR line for use during programming?
Cheers!
Paul Rowntree
I solved this problem by using a jumper in between the reset line and the FTDI IC.
My solution is to cut the track from the FTDI reset pin to the Propeller and install two jumper posts. Connect a removable jumper to the posts to program and then remove for runtime.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Caught in the PropWash
Cheers!
Paul Rowntree
Indeed, I changed the advanced port settings in Device Manager for the serial port in question - I disabled "Serial Enumerator" and enabled "Disable Modem Ctrl At Startup" and now plugging or unplugging another USB device from the PC, even a port on the same hub, no longer causes the propeller to reset! Not sure if those settings can be made programatically at runtime yet but I feel like this is some progress. Hope this helps somebody.
https://www.silabs.com/community/interface/knowledge-base.entry.html/2011/09/19/undesired_dtr_toggli-WOGD
The DTR pin toggling is due to a feature called 'serial enumeration' in Windows.
Whenever Windows discovers a COM port, it automatically opens the port and toggles the signals as part of a process to check if the COM port is connected to a serial mouse.
This is a legacy feature to support older serial mouse devices.