Closed GoogleCodeExporter closed 8 years ago
I have an FT232H as well and your code runs fine for me, with or without the
Write (Ubuntu 10.04, 32-bit). Since you say Read doesn't work without a Write,
please define "not working", and describe how do you know it's not working.
I've attached a modified version of your code that completely comments out the
Write and adds a printf to display the first byte of data read for each
iteration of your loop. Running this on my machine results in the following
output (I didn't have anything connected to the FT232H):
Read OK [ 0xFF ]
Read OK [ 0xFF ]
Read OK [ 0xFF ]
Read OK [ 0xFF ]
Read OK [ 0xFF ]
Read OK [ 0xFF ]
Read OK [ 0xFF ]
Read OK [ 0xFF ]
Read OK [ 0xFF ]
Read OK [ 0xFF ]
Read OK [ 0xFF ]
Read OK [ 0xFF ]
Read OK [ 0xFF ]
...
I further confirmed that the clock line was active during these reads by
attaching a 'scope to it.
As for the detaching of the device, I expect this is normal behavior for your
machine. The Linux 3.0 kernel (IIRC, 11.04 uses one of the 3.x kernels), added
support for the FT232H in the ftdi_sio driver. In order for libftdi (which
libmpsse uses) to take control of the device, it must detach the ftdi_sio
driver (the device can't be a serial port and an SPI interface at the same
time). So as soon as you call MPSSE, you should see it detach; it should have
nothing to do with Read/Write/Transfer.
Original comment by heffne...@gmail.com
on 19 Jul 2012 at 3:23
Attachments:
Any word on this?
Original comment by heffne...@gmail.com
on 25 Jul 2012 at 12:13
thanks for the reply and apologies for the delay. I just started to work on the
issue again.
In short, The issue is not reproducible. Before reporting it, I tried to reboot
the machine and restarting the slave, also verified the wiring multiple times.
The effect that I was seeing, is that the code would hang and output nothing,
the last that I'd see would be the unregister message in the kernellog. To get
it back to run again I would have to replug the usb cable.
I'm seeing another issue but I'll open a different ticket for that. thanks
again.
Original comment by zieg...@einklickdruck.de
on 25 Jul 2012 at 3:51
Was your b.c code hanging with no output, or was my modified version hanging
with no output? You wouldn't get any output from your code, as it wasn't
printing anything to screen. Your code reads quite a lot of data (734MB), so if
you weren't printing anything to screen it would appear to 'hang' for some time
even if it was functioning properly.
Original comment by heffne...@gmail.com
on 25 Jul 2012 at 8:44
Original comment by heffne...@gmail.com
on 20 Aug 2012 at 11:53
Original issue reported on code.google.com by
zieg...@einklickdruck.de
on 18 Jul 2012 at 6:42Attachments: