Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FT232 UART device gets disconnected when an SPI device is run #35

Closed
skrishnamoorthy5287 opened this issue Aug 9, 2018 · 4 comments
Closed

Comments

@skrishnamoorthy5287
Copy link

Hello,

I'm using the library to try and talk to a device using SPI over a USB interface with a Raspberry Pi. Two other RS-232 to USB cables are connected to the USB port. When I run a simple code that establishes a connection and pulls data out of the SPI device, one of the the other two devices stops appearing in the /dev/ttyUSB* list and I can't communicate with it anymore. Is there any solution to this problem?

Thanks,

Siddharth

@l29ah
Copy link

l29ah commented Aug 9, 2018

Have you tried OpenIndex()?

@skrishnamoorthy5287
Copy link
Author

I believe the Open function essentially uses the OpenIndex function, right?

I have three devices connected to my RPi. If I do:
ls /dev/ttyUSB*

it shows me all three connected (USB0, USB1, USB2). Then I run a code which only implements:
spi=MPSSE(SPI0,ONE_HUNDRED_KHZ,MSB)

after which when I do ls /dev/ttyUSB* again, only USB0 and USB1 are shown. But if I do lsusb, I can still see all three devices there.

Quite confused by this behaviour.

Thank you for your help.

@l29ah
Copy link

l29ah commented Aug 9, 2018

Yes.
I've misinterpreted your question. Sure you'll lose one of the /dev/ttyUSB's since you're allocating the FTDI for SPI. You cannot use the same pins for both UART and SPI.

@skrishnamoorthy5287
Copy link
Author

Ah thank you. I was concerned it was kicking one of my devices off, but I looked in further and it looks like it first identifies itself as a UART device, that's why I see 3 USB connections, but once I set up the SPI it removes itself from the UART list.

Thank you for your guidance and sorry for the ignorance, first time using SPI over USB with other devices in there :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants