USB stability

Testing and development of Megasquirt 3

Moderators: jsmcortina, muythaibxr

Post Reply
jsmcortina
Site Admin
Posts: 39587
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

USB stability

Post by jsmcortina »

I am having mixed results with the FTDI serial.

On the bench it works great.
Once on the car it was ok.
Twice on the car it disconnects for no apparent reason and then Windows says it is an unrecognised USB device.

How is everyone else getting on?

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
LT401Vette
Super MS/Extra'er
Posts: 12697
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: USB stability

Post by LT401Vette »

I haven't tried it yet. But I will. I still need to get another board to put one in my car for real world testing.
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
jsmcortina
Site Admin
Posts: 39587
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: USB stability

Post by jsmcortina »

We all need to hammer MS3 with real-world in-car testing.. We can learn so much and make this a great product before release.

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
LT401Vette
Super MS/Extra'er
Posts: 12697
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: USB stability

Post by LT401Vette »

I hear you... When ever I make it out to using my software in the actual car I find more problems or things I want to change in 20 minutes than I will in weeks of coding and bench testing.
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
jsmcortina
Site Admin
Posts: 39587
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: USB stability

Post by jsmcortina »

Since those "problems" I had backed out to using my external USB-serial cable.

But... that isn't testing our hardware!

So, today I was back on the FTDI link (no mods.)
I loaded code, tuned and datalogged without any problems. Although I was only driving for 15-20 minutes.

I _think_ the problems I had the other day were related to a fouled plug and misfires causing spark energy to get back into the Megasquirt. At present I have 4 x VB921 in the case connected to the CPU via 330R resistors. So there's a risk of ground noise and direct noise to the CPU port pins in the case of a miss.

A question on the layout - is it best to have the FTDI powered from both the Megasquirt and USB? Might it be better to use USB power only or ? Just a thought.

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
jsmcortina
Site Admin
Posts: 39587
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: USB stability

Post by jsmcortina »

While I've been using the USB ok on the car, I have had another two instances of USB oddities on the bench with Linux.

What happened both times is that the device was working earlier and was registered as /dev/ttyUSB0.
I had TS open (locking that port.)
I then powered down the MS3. Once for a split second, the other time for a number of hours.

When I powered back up Linux tried to re-initialise the device, but TS was locking USB0, so it created /dev/ttyUSB1

Now (as before) even with unplugging the USB cable and exiting TS, ttyUSB0 is "broken" and the kernel keeps creating USB1 until next reboot.

This is possibly a kernel driver issue, but also how is the power cycling causing a USB reset?

Is it possible that the diode providing power to the FT232RL from the MS3 5V power supply is part of the problem?

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
jsmcortina
Site Admin
Posts: 39587
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: USB stability

Post by jsmcortina »

Looks like it is a problem with my PC hardware or a Linux driver problem:
Kernel oops kills /dev/ttyUSB0
kernel wrote:ftdi_sio: ftdi_tiocmget Could not get modem status of device - err: -71
ftdi_sio: ftdi_tiocmget Could not get modem status of device - err: -71
ftdi_sio: ftdi_tiocmget Could not get modem status of device - err: -71
ftdi_sio: ftdi_tiocmget Could not get modem status of device - err: -71
hub 4-0:1.0: port 1 disabled by hub (EMI?), re-enabling...
usb 4-1: USB disconnect, address 2
ftdi_sio: ftdi_tiocmget Could not get modem status of device - err: -19
ftdi_sio: ftdi_tiocmget Could not get modem status of device - err: -19
ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0
ftdi_sio 4-1:1.0: device disconnected
BUG: unable to handle kernel NULL pointer dereference at 00000088
IP: [<c041b934>] __ticket_spin_lock+0x9/0x19
*pde = 00000000
Oops: 0002 [#1] SMP
.....
Then it reconnects on /dev/ttyUSB1
kernel wrote:EIP: [<c041b934>] __ticket_spin_lock+0x9/0x19 SS:ESP 0068:e24e9ea4
---[ end trace fb1a65e81a0d2135 ]---
usb 4-1: new full speed USB device using uhci_hcd and address 3
usb 4-1: configuration #1 chosen from 1 choice
ftdi_sio 4-1:1.0: FTDI USB Serial Device converter detected
ftdi_sio: Detected FT232RL
usb 4-1: FTDI USB Serial Device converter now attached to ttyUSB1
usb 4-1: New USB device found, idVendor=0403, idProduct=6001
usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 4-1: Product: FT232R USB UART
usb 4-1: Manufacturer: FTDI
usb 4-1: SerialNumber: A5002z2X
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
jsmcortina
Site Admin
Posts: 39587
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: USB stability

Post by jsmcortina »

I have the MS3 powered from my bench power supply.

Just turning my bench power supply on and off (mains switch) often causes the USB driver to crash.

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
Tjabo
Master MS/Extra'er
Posts: 846
Joined: Sat Nov 05, 2005 7:36 pm

Re: USB stability

Post by Tjabo »

Sorry James, I didn't see this thread until just now.

I haven't had any problems with the USB since the initial couple of issues getting up and running, so I have nothing to add. . . I guess that's good!

I do have a question or two about the stepper motor driver code testing, so I'll post that in an appropriate thread.

Thad
--'98 Dodge Neon ACR Turbo - MS3 beta test car - Sold
--'97 BMW 540i/6spd - Single Front/Top Mount Turbo 550+ HP - MS3+MS3X V3.0 - Sold but ripping in Vegas
--'97 BMW 328i 5.3 L33/TH400 Swapped drift car - MS3+MS3X V3.0 Full Sequential - Turbos And Radiator In the Trunk 9.6@144 on a 1.55 60ft
UnaClocker
Super MS/Extra'er
Posts: 1933
Joined: Fri May 07, 2004 12:59 pm
Location: Tacoma, WA
Contact:

Re: USB stability

Post by UnaClocker »

So the USB-serial adapter chip is powered from the MS, rather than from the computer's USB jack? Seems like it should be the other way around.
Brian
'84 Dodge Rampage
muythaibxr
Site Admin
Posts: 8228
Joined: Thu Oct 14, 2004 12:48 pm

Re: USB stability

Post by muythaibxr »

The USB to serial chip IS powered from the PC. Not sure what is going on with James' MS3. Mine have not had any issues.

Ken
Megasquirt is not for use on pollution controlled vehicles. Any advice I give is for off road use only.
Tjabo
Master MS/Extra'er
Posts: 846
Joined: Sat Nov 05, 2005 7:36 pm

Re: USB stability

Post by Tjabo »

Mine is too (just confirming to rule out a bad run or whatever).
--'98 Dodge Neon ACR Turbo - MS3 beta test car - Sold
--'97 BMW 540i/6spd - Single Front/Top Mount Turbo 550+ HP - MS3+MS3X V3.0 - Sold but ripping in Vegas
--'97 BMW 328i 5.3 L33/TH400 Swapped drift car - MS3+MS3X V3.0 Full Sequential - Turbos And Radiator In the Trunk 9.6@144 on a 1.55 60ft
LT401Vette
Super MS/Extra'er
Posts: 12697
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: USB stability

Post by LT401Vette »

I have been running the usb almost exclusively, but all on the bench, so no real world testing.
But, My wife is taking the kids and going to the beach for a few days with her mom.... So That seems like the perfect time to put the MS3 in the Vette and get some real world testing :)

I want to leave my MS1 in tact too so I can still do real world testing of MS1 stuff, so need to see if i can gather up what i need to get the circuits I need on one of my 3.57's.
I should just need:
- Tach Circuit
- Fan relay circuit
- NOS on
- NOS detect
- 4 igniters

I might get lazy and use the v3 in the car, then i just need to move the 1 igniter pin... But I really should keep the MS1 in tact....
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
jsmcortina
Site Admin
Posts: 39587
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: USB stability

Post by jsmcortina »

Phil, this is a good upgrade question. Might be worth posting as a new topic for future reference.

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
Post Reply