Author Topic: FTDI drivers totally crash my PC  (Read 35122 times)

0 Members and 1 Guest are viewing this topic.

Offline FungusTopic starter

  • Super Contributor
  • ***
  • Posts: 16677
  • Country: 00
FTDI drivers totally crash my PC
« on: November 04, 2014, 10:31:42 am »
I'm just working with one of those new ESP8266 Wifi modules. I've got it connected to an Arduino Mega along with an FTDI USB-to-serial adapter (which checks out as "Genuine FTDI") for debug output.

The module is on a little adapter I made with a 3.3V regulator, reset button and level shifting (it's all 3.3V).

Here's a picture of the setup:



Anyway, the problem: When I hit the reset button on the Wifi module my adapter my PC completely locks up. I have to hit the reset button to get it back again. If I use the official Arduino USB-to-Serial adapter (Mega16U2 based, see picture) then there's no problem at all. I can reset all day long.

I have no idea why it crashes. The FTDI adapter isn't connected directly to the Wifi module, it goes via the Arduino Mega. Is it a burst of radio waves from the Wifi Module trashing the FTDI chip? I dunno but all the Arduino stuff survives just fine. Even is it was that, there's no reason to lock up the PC.

FTDI's whining about their "quality" drivers that everybody else is 'stealing' from them? Pull the other one, it's got bells on it!

Yet another reason for me to not buy any more FTDI product.
 

Offline TheRevva

  • Regular Contributor
  • *
  • Posts: 87
Re: FTDI drivers totally crash my PC
« Reply #1 on: November 04, 2014, 11:09:12 am »
While I don't intend ever using an FTDI chip again, I'd suggest you look again at your own pic...
To my untrained eyes, you have several BEAUTIFUL antennae in that pic and, in combination with a bit of 'ground shift' due to cable resistance, could possibly even result in some SCR latchup.
OTOH, if your pic had shown a very well connected low impedance ground and shielded setup, I'd begin to get a wee bit more skeptical.
Furthermore, you haven't even shown us the PC that all this gear was supposedly hooked up to...
Any chance that there was a 'dangling antenna or two' involved that could have picked up say a 2.4GHz signal?

Quite some time ago I had a client who was a 'compulsive tinkerer'.  He regularly ran his desktop with the side cover off (despite it being 'ill advised' to have such an abnormal airflow).  Oh yeah, he'd also overclocked it to the max too...  His complaint - Every time he switched on the WiFi access point, his system would freeze.
When I told him to put the side back on, the 'problem' miraculously vanished... GO FIGURE!
(SOMETHING inside the case was picking up the 2.4GHz WiFi signal and causing mayhem.  It wasn't worth wasting my time to analyse WHAT was acting as the receiver though.  Given that it was an older FULL SIZE ATX MoBo, I'm willing to bet that several PCB traces were beautiful 1/4 wave and / or 1/2 wave antennae)
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: FTDI drivers totally crash my PC
« Reply #2 on: November 04, 2014, 11:11:27 am »
Quote
Yet another reason for me to not buy any more FTDI product.

It is always much easier to blame others.

It is always much more beneficial to you to not do that, however.
================================
https://dannyelectronics.wordpress.com/
 

Offline leppie

  • Frequent Contributor
  • **
  • Posts: 269
  • Country: za
Re: FTDI drivers totally crash my PC
« Reply #3 on: November 04, 2014, 11:24:42 am »
Seen and heard of these issues with some USB ports, mostly the 3.0 kind, but I have seen it on my PC acting weird on USB 2.0 ports too (was with STLink and AtMega U in my case).

Playing with different ports, I finally got it working without issue.
 

Offline retrolefty

  • Super Contributor
  • ***
  • Posts: 1648
  • Country: us
  • measurement changes behavior
Re: FTDI drivers totally crash my PC
« Reply #4 on: November 04, 2014, 12:15:38 pm »
Quote
Anyway, the problem: When I hit the reset button on the Wifi module my adapter my PC completely locks up. I have to hit the reset button to get it back again. If I use the official Arduino USB-to-Serial adapter (Mega16U2 based, see picture) then there's no problem at all. I can reset all day long.

I have no idea why it crashes. The FTDI adapter isn't connected directly to the Wifi module, it goes via the Arduino Mega. Is it a burst of radio waves from the Wifi Module trashing the FTDI chip? I dunno but all the Arduino stuff survives just fine. Even is it was that, there's no reason to lock up the PC.

 I see only two wires from the mega to the FTDI module, if send and receive wires, where is the required ground wire?

 

Offline nitro2k01

  • Frequent Contributor
  • **
  • Posts: 843
  • Country: 00
Re: FTDI drivers totally crash my PC
« Reply #5 on: November 04, 2014, 12:25:30 pm »
How are you powering the Aruino Mega? Does it have the same ground reference as the USB connection to the serial adapter, or is it powered from a wall wart or similar? Even if it's powered form the computer and you think "it shouldn't matter", have you tried connecting a ground wire between the Arduino and the serial adapter? Are there any series resistors or SMD ferrite beads on the serial lines on the FTDI adapter?
Whoa! How the hell did Dave know that Bob is my uncle? Amazing!
 

Offline FungusTopic starter

  • Super Contributor
  • ***
  • Posts: 16677
  • Country: 00
Re: FTDI drivers totally crash my PC
« Reply #6 on: November 04, 2014, 05:37:45 pm »
I see only two wires from the mega to the FTDI module, if send and receive wires, where is the required ground wire?

It's a desktop PC so all USB connectors are connected to mains ground.

(Yes, I've checked...I can buzz continuity between any ground on those boards and a mains socket on the other side of the room)

PS: Yes, I tried adding a ground wire, it made no difference.


How are you powering the Aruino Mega?

USB. I just disconnected it to put it on the bench to take a photo.


 

Offline FungusTopic starter

  • Super Contributor
  • ***
  • Posts: 16677
  • Country: 00
Re: FTDI drivers totally crash my PC
« Reply #7 on: November 04, 2014, 05:45:05 pm »
While I don't intend ever using an FTDI chip again, I'd suggest you look again at your own pic...
To my untrained eyes, you have several BEAUTIFUL antennae in that pic and, in combination with a bit of 'ground shift' due to cable resistance, could possibly even result in some SCR latchup.

(I did mention that as a possibility... haven't tried tinfoil yet)

It might be that but it doesn't explain why it only crashes when I press RESET.

I've tried moving the wires around so the FTDI adaptor is as far as possible from the WiFi. I covered the adapter with my hand. No difference.

Whatever: It shouldn't lock up my PC no matter what happens in the chip. There's definitely something wrong in FTDI's drivers if that can happen, and FTDI's defense for their actions was that their drivers were being (ab)used by other people.


 

Offline FungusTopic starter

  • Super Contributor
  • ***
  • Posts: 16677
  • Country: 00
Re: FTDI drivers totally crash my PC
« Reply #8 on: November 04, 2014, 05:50:05 pm »
Quote
Yet another reason for me to not buy any more FTDI product.

It is always much easier to blame others.

It is always much more beneficial to you to not do that, however.

Data point: In some situations a genuine FTDI crashes, kills host PC. A Mega16U2 doesn't.
 

Offline victor

  • Regular Contributor
  • *
  • Posts: 110
  • Country: 00
  • Boy who writes code and take things apart
    • vitim.us
Re: FTDI drivers totally crash my PC
« Reply #9 on: November 04, 2014, 11:57:06 pm »
Try to make it work without the driver intalled just as a dumb sub port see if it crashes
your body is limited, but not your mind
 

Online Monkeh

  • Super Contributor
  • ***
  • Posts: 7992
  • Country: gb
Re: FTDI drivers totally crash my PC
« Reply #10 on: November 05, 2014, 12:35:37 am »
I see only two wires from the mega to the FTDI module, if send and receive wires, where is the required ground wire?

It's a desktop PC so all USB connectors are connected to mains ground.

Ah, so you'll have everything take a multiple-meter-long ground path, great plan.

Try to make it work without the driver intalled just as a dumb sub port see if it crashes

You can't use it without a driver.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: FTDI drivers totally crash my PC
« Reply #11 on: November 05, 2014, 12:45:31 am »
Quote
Data point: In some situations a genuine FTDI crashes, kills host PC. A Mega16U2 doesn't.

Well, there are more data points on Elvis sightings.
================================
https://dannyelectronics.wordpress.com/
 

Offline FungusTopic starter

  • Super Contributor
  • ***
  • Posts: 16677
  • Country: 00
Re: FTDI drivers totally crash my PC
« Reply #12 on: November 05, 2014, 09:05:45 am »
It's a desktop PC so all USB connectors are connected to mains ground.

Ah, so you'll have everything take a multiple-meter-long ground path, great plan.

Weird. I was always told the 'star' formation was the best...

PS: As already noted, it crashes with a GND wire as well.


Quote
Data point: In some situations a genuine FTDI crashes, kills host PC. A Mega16U2 doesn't.

Well, there are more data points on Elvis sightings.

But none of those can show you photo ID.
 

Offline Electr0nicus

  • Regular Contributor
  • *
  • Posts: 131
  • Country: at
Re: FTDI drivers totally crash my PC
« Reply #13 on: November 05, 2014, 11:02:09 am »
I would've bet everything, that the missing ground wire from the FTDI board to the Arduino, would have been the problem. But as you said, it made no difference. Maybe you can try to hook your setup up to a laptop, if you have one. If it then works with the FTDI board, it's either a weird sort of grounding problem (because most Laptops aren't mains earth referenced), or the problem only affects your desktop PC.

Another thing i can think of is, that pushing the reset button creates some sort of spike on the power supply rail. Which then maybe affects the RS232 Driver inside the AVR and locks up the FTDI Chip and it's driver, locking up your PC.

Do you own a scope? Then you could try probing around what's going on on the RS232 lines power supply rail(s).

I don't think that it's RF influence from the WIFI. As the RF power should be 0 when the module is in reset. Try holding down the reset button for a long time f.e. 10 seconds and see if the PC locks up during that time, or only when you release the button, and therefore when the WIFI module starts transmitting.

Also a detailed Schematic of the Addon- Board you have made would be helpful, as the the cause of the problem isn't that obvious.
It would also be good to know the type of WIFI module used, maybe you can give us a link to a datasheet.
With the informations you have given us up to now, our help is more guessing than real actual help.

Cheers Gregor.
 

Offline sunnyhighway

  • Frequent Contributor
  • **
  • Posts: 276
  • Country: nl
Re: FTDI drivers totally crash my PC
« Reply #14 on: November 05, 2014, 11:09:08 am »
It might be that but it doesn't explain why it only crashes when I press RESET.
.
.
.
It shouldn't lock up my PC no matter what happens in the chip.

Crashing and locking up are two different things.
Could you elaborate on how it manifest itself on your computer? ( BSOD, kernel-panic, unresponsive application, mouse-pointer freezes, etc ? )
 

Offline FungusTopic starter

  • Super Contributor
  • ***
  • Posts: 16677
  • Country: 00
Re: FTDI drivers totally crash my PC
« Reply #15 on: November 05, 2014, 12:53:26 pm »
Crashing and locking up are two different things.
Could you elaborate on how it manifest itself on your computer? ( BSOD, kernel-panic, unresponsive application, mouse-pointer freezes, etc ? )

It locks up.

Mouse cursor freezes, caps lock key doesn't make the keyboard light change, video stops playing.

 

Offline HackedFridgeMagnet

  • Super Contributor
  • ***
  • Posts: 2028
  • Country: au
Re: FTDI drivers totally crash my PC
« Reply #16 on: November 05, 2014, 01:09:59 pm »
Reinstall the driver.

Are you sure it is an FTDI chip?
What brand of adapter is it? Sparkfun?
Are the LEDs blinking?
Check with an oscilloscope, and/or USB sniffer.

Work out is it the the wired connection or data that is causing the problem or the proximity of the wireless.

Yes give it a ground connection cable.
 

Offline FungusTopic starter

  • Super Contributor
  • ***
  • Posts: 16677
  • Country: 00
Re: FTDI drivers totally crash my PC
« Reply #17 on: November 05, 2014, 01:19:20 pm »
I would've bet everything, that the missing ground wire from the FTDI board to the Arduino, would have been the problem. But as you said, it made no difference.

There's a very solid ground connection between them. You can argue about the length of it, but it's there.

PS: That very length is also isolating the power supply of the FTDI chip. Any droop/spike in the Arduino/WiFi power is a long way from the FTDI chip. The only wires leading to the FTDI chip are RX/TX.

Also a detailed Schematic of the Addon- Board you have made would be helpful, as the the cause of the problem isn't that obvious.

See below. It's just an LDO and voltage divider for the 3.3V module.

The reset switch isn't on there because I added it after I drew the schematic. It's just a switch between the RESET pin and GND.

It would also be good to know the type of WIFI module used

http://www.electrodragon.com/w/Wi07c


We can go around in circles finding the cause but I fail to see how it's relevant to the FTDI driver locking up my PC.

I should be able to drive a nail through the FTDI chip and the worst that happens on the PC end is that the USB's power fuse kicks in and shuts off the 5V supply to that USB port.
« Last Edit: November 05, 2014, 01:25:07 pm by Fungus »
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: FTDI drivers totally crash my PC
« Reply #18 on: November 05, 2014, 01:54:37 pm »
Quote
I fail to see how it's relevant to the FTDI driver locking up my PC.

I think the others are saying that you have not established that the FTDI driver crashed/locked up your PC.

================================
https://dannyelectronics.wordpress.com/
 

Offline FungusTopic starter

  • Super Contributor
  • ***
  • Posts: 16677
  • Country: 00
Re: FTDI drivers totally crash my PC
« Reply #19 on: November 05, 2014, 02:15:39 pm »
Quote
I fail to see how it's relevant to the FTDI driver locking up my PC.

I think the others are saying that you have not established that the FTDI driver crashed/locked up your PC.

a) What else could make the PC lock up like that?
b) Why would substituting the other USB to Serial adapter make the problem vanish?
 

Online Monkeh

  • Super Contributor
  • ***
  • Posts: 7992
  • Country: gb
Re: FTDI drivers totally crash my PC
« Reply #20 on: November 05, 2014, 02:32:21 pm »
a) What else could make the PC lock up like that?

A hardware fault no driver can handle.

Quote
b) Why would substituting the other USB to Serial adapter make the problem vanish?

Because you're changing the equation.

Stop 'working' on the assumption that a broken driver is the problem and find out what the problem actually is.
 

Offline sunnyhighway

  • Frequent Contributor
  • **
  • Posts: 276
  • Country: nl
Re: FTDI drivers totally crash my PC
« Reply #21 on: November 05, 2014, 02:34:24 pm »
Crashing and locking up are two different things.
Could you elaborate on how it manifest itself on your computer? ( BSOD, kernel-panic, unresponsive application, mouse-pointer freezes, etc ? )

It locks up.

Mouse cursor freezes, caps lock key doesn't make the keyboard light change, video stops playing.

I assume your mouse and keyboard are both connected to a USB port as well.
USB ports don't work on HW interrupts but are always polled. Therefore it takes only 1 USB driver to behave badly in order to make all others suffer from it.


There is a way to proof the driver is at fault (unfortunately you can't proof the opposite this way).
 - Do whatever is needed to freeze the computer.
 - Disconnect the USB devices one by one until the keyboard and/or mouse become responsive again.
 - Now you have found the culprit.
 

Offline nitro2k01

  • Frequent Contributor
  • **
  • Posts: 843
  • Country: 00
Re: FTDI drivers totally crash my PC
« Reply #22 on: November 05, 2014, 02:42:00 pm »
Let me spell out how to troubleshoot for you:

Is it only the mouse and keyboard that are frozen, or everything? Try for example playing a video and press the reset button and see if the video freezes too. Maybe only USB communication is disturbed, causing the mouse and keyboard to stop working, (if they are connected over USB) but not the whole computer to freeze. Check for this even if the mouse and keyboard are not connected over USB. (Every different thing you try is another data point which may or may not turn out to be relevant.)

Similarly, check that you're not shorting or near shorting +5V to ground when pressing the reset button, for example due to an incorrect pullup, or that the reset pin is connected directly to +5V, either on your board by mistake, or on the wireless transmitter PCB. Again, this may cause the USB rail in the computer to shut off temporarily so the mouse and keyboard stop working. This particular scenario doesn't make much sense since it should freeze the computer regardless of the serial adapter,  but check for it anyway.

Otherwise, do the following start with your original setup, with all the wires hooked up. First confirm that you're still getting the freeze. Then try disconnecting one wire at a time and note if the problem stops occurring. Note which wire you removed to make it work. Plug it back in and try the other wires one by one, and also note if any other of the wires can cause the problem to go away. If all that fails try systematically disconnecting two wires at a time etc. 4 wires = 4 bits = 16 combinations in total.

Do you have any application running on the PC side for communicating with the device? If so, does the problem still happen if you're not running this program? If you have task manager open, which does the CPU usage spike when you press the reset button?
« Last Edit: November 05, 2014, 07:18:22 pm by nitro2k01 »
Whoa! How the hell did Dave know that Bob is my uncle? Amazing!
 

Offline Richard Crowley

  • Super Contributor
  • ***
  • Posts: 4317
  • Country: us
  • KJ7YLK
Re: FTDI drivers totally crash my PC
« Reply #23 on: November 05, 2014, 02:43:07 pm »
The fact that you HAVE a "solid ground connection" IS the problem.
You should NOT have a "solid ground connection" except from the FTDI board.
It sounds like you have a ground loop in your lash-up.
You couldn't have a "solid ground connection" in what we see in the photograph, so the problem lies elsewhere.
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8517
  • Country: us
    • SiliconValleyGarage
Re: FTDI drivers totally crash my PC
« Reply #24 on: November 05, 2014, 03:22:14 pm »
I see only two wires from the mega to the FTDI module, if send and receive wires, where is the required ground wire?

It's a desktop PC so all USB connectors are connected to mains ground.

sure ... for dc ...


Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf