I2C SPI USB CAN eSPI Cable Testing View All Quick Start Guides User Manuals Software Downloads Knowledge Base Videos Case Studies App Notes White Papers Sales Support About Us
Products Blog Sales Support Contact Search
How Can I Configure the GPIO Pull-Up Resistors When I Have the Aardvark I2C/SPI Host Adapter in GPIO Mode?
Rena Ayeras

An abstract drawing of "wrenching" (configuring an application.

Image by Clker-Free-Vector-Images from Pixabay

 

Question from the Customer:

I have the Aardvark I2C/SPI Host Adapter connected to the Level Shifter Board. I want to monitor the GPIO pull-up on a scope to confirm that I can control the pins in GPIO mode.

Here is my setup:

  • On the Level Shifter Board, Target1 is connected to a slave device to check read/write in I2C
  • Target2 is connected to the 10-pin split cable bundle.
  • To monitor the GPIO pull-up, pin 5 is connected to a scope.

However, I do not see any pull-ups and I am not sure what is wrong. I am using Aardvark Software API. Can you provide details about using API for enabling the GPIO mode with the Aardvark adapter?

Response from Technical Support:

Thanks for your questions! The pull-up resistors can be configured with the software API as well as the Control Center Serial Software, both of which can be downloaded for free. We will go over how the GPIO pins work, following by information about using the API or Control Center Serial Software with pull-up resistors.

How GPIO Pull-Ups Work

The Aardvark GPIO mode has 6 GPIO signals: GPIO SCL signal pin 1, GPIO SDA signal pin 3, GPIO MISO signal pin 5, GPIO SCK signal pin 7, GPIO MOSI signal pin 8, and GPIO SS signal pin 9.

  • The Aardvark GPIO mode can configure the GPIO signals as inputs or as outputs.
  • When a GPIO bit is configured as input, the signal pull-up can be enabled or disabled.
  • If GPIO bit is configured as output, and the value 1 is writing to that bit, then the signal will be 1 logic.
  • If GPIO bit is configured as output, and the value 0 is written to that bit, then the signal will be 0 logic.
  • If GPIO bit is configured as input, and logic 1 is supplied to the signal, then the bit is read logic 1.
  • If GPIO bit is configured as input, and logic 0 is supplied to the signal, then the bit is read logic 0.

Configuring Pull-Ups with API

The API has many advantages such as writing scripts for customized setups, production runs, and storing very large data files. The API command aa_gpio_pullup can be called to activate or deactivate GPIO pull-up resistors. Here are other commands that may be useful for your setup:

  • aa_gpio_direction controls the direction of the signal, input or output
  • aa_gpio_get returns the current value of the GPIO input

For more information about these and other GPIO related API commands, please refer to the GPIO Interface section of the Aardvark I2C/SPI Host Adapter User Manual.

Configuring Pull-Ups with GUI

The Control Center Serial Software supports full control of the Aardvark adapter and includes a This application provides an immediate view of results and an easy way to quickly change the commands, which can help troubleshoot problems. You can also automate tasks with XML batch scripts.

Examples of the Control Center Serial Software features are shown below.

GPIO Signal Status:

Example of viewing GPIO signal status with Control Center Serial Software

XML Script in Batch Mode: Example of XML batch script in Control Center Serial Software

We hope this answers your questions. Additional resources that you may find helpful include the following:

If you want more information, feel free to contact us with your questions, or request a demo that applies to your application.