Devices on SPI bus
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2014-04-03 9:15 AM
Posted on April 03, 2014 at 18:15
Hello guys, I have a problem! I need to connect 4 devices on the discovery STM32VLDISCOVERY using SPI BUS. The problem is the following: the discovery has got 2 SPI interface: for SPI1, CS is PA4 (SPI1_NSS), for SPI2, CS is PB12 (SPI2_NSS).
So am I allowed to connect only 2 devices on my board? Is exsist a mode that allow me to connect 4 devices on the same SPI interface, ex. SPI1? Thank you very much, Matteo #spi #device #stm32f4 #discovery
Labels:
- Labels:
-
SPI
-
STM32F4 Series
This discussion is locked. Please start a new topic to ask your question.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2014-04-03 9:29 AM
Posted on April 03, 2014 at 18:29
You'd need to determine if the devices can function co-cooperatively (ie Hi-Z their output when CS is high), or not
You'd then be able to use ONE SPI bus, and have individual GPIO CS to each, your code would them need to arbitrate access between them. For example I could readily connect 3 SPI Serial Flash devices (http://www.macronix.com/en-us/Product/Pages/ProductDetail.aspx?PartNo=MX25L12835F
16MB) to ONE SPI bus on an STM32. All the SCLK, MISO, MOSI would be common, and the 3 CS would connect to a unique GPIO, and you'd manage that GPIO in software.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Up vote any posts that you find helpful, it shows what's working..
