To Run SPI Tests at a Higher Speed, How Do I Set Up Ethernet Connectivity and the Async Queue for the Promira Serial Platform?
Question from the Customer:
I am using the Promira Serial Platform to run tests and evaluations on the SPI bus of my application. I would like to do some benchmark testing over the Ethernet port. I have a few questions about the setup:
- For connecting to the Promira platform over Ethernet, do I use a switch or connect directly to the computer?
- How is power supplied when using the Ethernet port? (I know that USB is self-powered over the port.)
- If your answer is PoE (Power over Ethernet), do I need a specific Ethernet cable? It seems there are multiple standards for PoE.
Lastly, to run tests at higher speeds, some of these tests will require an async queue - can you provide an example to do that?
Response from Technical Support:
The Promira platform has two main options for connectivity: Ethernet over USB and Ethernet. When using the USB port, power is supplied through USB, as you mentioned above. When using the Ethernet port, you can draw power from the USB port on your PC or using the wall-to-USB power adapter from the Promira Ethernet Kit. Here are instructions for both Ethernet and USB connectivity:
- For transferring data over Ethernet - connect the Promira Ethernet connector to the computer (or switch) and the Promira USB connector to the computer USB connector. In this case the USB is plugged in simply to supply power.
- For USB over Ethernet connectivity - connect the Promira USB connector to the computer USB connector for transferring data and to supply the power.
Figure 1: Promira Serial Platform Ports
For the async queue, you can use Promira Software API. The following API example exhibits SPI transfer with the Promira queue mechanism, which you can modify for your system requirements:
- Call ps_queue_create to create a queue, and specify the queue type (PS_MODULE_ID_SPI_ACTIVE).
- Call ps_queue_clear to clear the queue.
- Call ps_queue_spi_bitrate to add a command to the queue to set the SPI bitrate.
- Call ps_spi_master_ss_polarity to add a command to the queue to change the output polarity on the SS line.
- Call ps_queue_spi_write to add a command to the queue, so data will be sent across the SPI bus.
- Repeat steps 3-5 as many times as desired.
- Call ps_queue_submit to send the accumulated commands across the SPI bus.
- Call ps_collect_resp to collect the response of one command from a previously submitted synchronous shift queue with the associated collect handle.
- Call ps_collect_spi_write to collect the response of SPI write if the return value of PS_SPI_CMD_WRITE.
- Repeat step 8 until you receive from the function ps_queue_submit the return value PS_APP_NO_MORE_TO_COLLECT.
- Call ps_queue_destroy to destroy the queue.
For additional information about API, please refer to section 5 of the Promira Serial Platform User Manual. For additional information about queuing data and commands, please refer to section 5.5.3 You can download more Promira API examples from our site.
Additional resources that you may find helpful include the following:
We hope this answers your question. If you have other questions about our host adapters or other Total Phase products, feel free to email us at sales@totalphase.com, or if you already own one of our devices and have a technical question, please submit a request for technical support.