Question from the Customer:
I have two Promira Serial Platforms; each has the SPI Active - Level 2 Application. How can I best communicate to multiple SPI slaves using separate SPI slave select (SS) signals?
Response from Technical Support:Thanks for your question! There are two ways you can communicate through the SS signals: Control Center Serial Software and Promira Software API. Following are summaries of what each application can do for you.
Communicate via Control Center Serial Software
The Control Center Serial Software in an easy-to-use GUI application that provides access to Promira platform functions. Here is a summary:
- Connect the Promira Serial Platform to the Control Center Software.
- At the top menu bar, select Adapter and then click Multi I/O SPI.
- In the Multi I/O SPI window, select the SSn for the desired slave. The number of displayed Slave Select lines is dependent on how many slaves the attached device can support. You can also select the desired Bitrate.
- Set the command and address values.
- There is large text box that for inserting the data you want to send.
- Transactions are displayed below in the Transaction Log.
For more information, please refer to the article Which Tool Should I Use to Have One SPI Master Control Multiple Chips on an SPI Bus?
For a more automated process, you can use commands via an XML script in Batch Mode. For more information, please refer to the Batch Mode section in the Control Center Serial Software User Manual.
Communicate via Promira Software API
If you need more customized control, we recommend using Promira Software API. Using the API, you can create a new script or modify one of our sample scripts, which you can then run from the command line.
For communicating with multiple SPI slaves via separate SPI SS signals, we recommend taking a look at the API examples: spi_file and spi_slave. Both use the Promira platform for SPI slave implementation. Here is a key component of both examples:
To configure the SS lines, use a bitmask: 1 corresponds to enable; 0 corresponds to disable. The command to use is ps_spi_enable_ss.
Enable SS Lines (ps_spi_enable_ss)u08 ss_enable);Enable select SS lines and disable GPIO lines.
ss_enable bitmask based on the 8 SS lines where 1 corresponds to enable and 0 to disable.
For more information, please refer to the API Documentation section from the Promira User Manual.
Additional resources that you may find helpful include the following:
- Promira Serial Platform System User Manual
- Promira Serial Platform I2C/SPI Active User Manual
- Control Center Serial Software User Manual.
- Which Tool Should I Use to Have One SPI Master Control Multiple Chips on an SPI Bus?
We hope this answers your question. Looking for more information? You can contact us and request a demo that applies to your application, as well as ask about our Total Phase products.