peter
peter

Reputation: 117

Writing to two SPI devices on the same SPI bus screws the output

I have two devices connected to the same SPI bus on a Raspberry Pi. Both devices use the same custom device driver, which exposes them as two separate miscellaneous devices in user space, supporting simple register write operations.

In my user-space program, I open both device files and perform IOCTL operations on them. However, I observe an issue:

When I perform 1000 writes to the first device, followed immediately by a few writes to the second device, the second device seems to receive values intended for the first device, despite using separate chip select (CS) pins. In the device driver, SPI writes are performed using spi_sync().

Questions:

Upvotes: 0

Views: 18

Answers (0)

Related Questions