I am using the Promira Serial Platform with Promira Software API I2C/SPI Active. I’m looking to create a script (in Python) so that the SPI and GPIO commands occur in parallel; the GPIO toggles during SPI writes. Here is a summary of what I’m looking to do:
start gpio toggle;
submit spi write queue;
delay;
stop gpio toggling;
How can I make that work?
Response from Technical Support:Thanks for your question! You can toggle GPIOs in parallel while the SPI lines are toggling by using separate queues to execute GPIO and SPI commands.
To create a separate queue for GPIO:
To create a separate queue for SPI:
Here is a summary of what you could do:
The queue handles gpio_queue and spi_queue can be used to send commands in each queue.
For SPI and GPIO queue operations to perform simultaneously:
For more information about queuing and related commands, please refer to the Queue Overview and API Documentation sections in the Promira Serial Platform I2C/SPI Active User Manual. Also, functional API programs are provided with Promira Software API I2C/SPI Active, which can be used as is or modified as needed. For the operations you need, we suggest looking at spi_eeprom.py and modifying the commands for your specifications.
We hope this answers your question. Additional resources that you may find helpful include the following:
We hope this answers your question. Need more information? You can contact us at sales@totalphase.com, as well as request a demo that applies to your application, as well as ask questions about our Total Phase products.