11 years, 2 months ago.

SPI shared between two or more devices.

If I was to connect up two or more devices using different drivers to the same SPI, would I need to coordinate the use of the SPI using a mutex or similar? I'm thinking of an LCD screen and SD card where the devices could be accessed from different threads. Most of these devices such as the NOKIA6610 and the standard SD card already have drivers written, but I don't know if they would assume exclusive use of the SPI or if there are any other interface setting issues I need to be aware of.

Thanks for your help. David.

1 Answer

11 years, 2 months ago.

Yes, these generally won't have mutexes in place, and if different threads want to use the same SPI hardware you need to add mutexes.