Interesting Issues with Roborio SPI port

I have ran into a very interesting problem recently involving the spi communication feature on the roborio and was curious if anyone has had the same issue.

We are using pixy cameras and an SPI setup this year for vision tracking, and we currently have one pixy plugged into CS0 on the roborio and have code that gets values from that pixy. However, with the same wiring and the same code (except for switching the CS port number) we do not receive any information from the pixy when it is plugged into any other CS port. We ran into this issue when we tried hooking up two pixy cameras to two different ports. However, we took one pixy and tested it on all four pins individually, and with the same test we were only getting values through CS0 when we hooked up to it.

We’re thinking about communicating over usb with the second pixy if we can’t fix this issue, and quite honestly I’m at a lack of what I could do to solve it. This test has also been performed on two different roborios with the same result, which makes it even more interesting.

I would appreciate your thoughts. Is the roborio only supportive of one spi device? It would seem redundant to include the other CS ports if that was the case.

Make sure you updated your WPILib plugin. They recently addressed some issues with I2C and SPI. I didn’t look through the changes for SPI, but it’s possible your issue is resolved.

I saw that plugin update, and it was downloaded before the test. Besides, after looking at exactly what was in the update, all they did was fix a small memory leak by changing an array to a vector I think.