I’m working with an SPI device where I need to change modes between sample and setup. I’m using the Aardvark I2C/SPI Host Adapter. How do I change the clock polarity (CPOL) and clock phase and CPHA?
Response from Technical Support:Thanks for your question! You can easily change the clock polarity with the Control Center Serial Software. For a more customized application, you can use the Aardvark Software API. The figure below shows the variations that you can set:
Control Center Serial Software provides an easy GUI for setting up the clock polarity and clock phase, as well as the bitrate and bit order as shown below.For more information, please refer to the SPI section of the Control Center Serial Software User Manual.
Aardvark Software API supports many platforms and programming languages, and is provided with many examples that can be used as-is or customized for your application. Here is the API command for configuring clock polarity and clock phase, as well as bit order:The command: Configure (aa_spi_configure)
For additional information, please refer to API Documentation.
Additional resources that you may find helpful include the following:
We hope this answers your question. Want more information? You can contact us and request a demo that applies to your application, as well as ask about our Total Phase products.