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
3D Image Engineering, Motor Control, and SPI Master Host Adapter – Oh My!
Rena Ayeras

Jean-Pierre Sainfeld is a technical consultant and the founder and owner of First Link Consulting Services. The technical services include the integration of hardware and software. In this article, Jean-Pierre describes one of his interesting projects and why he chose the Aardvark I2C/SPI Host Adapter  to debug, tune, and validate a complex embedded system.

Motor Control Subsystem for Tracking with Lasers

The goal of this project was to develop a system to track moving targets. In the resultant design, a subsystem provided motor control for a Linux platform. The design included two motors and a set of mirrors. This combination of devices enabled projecting a laser beam to track a moving target.

About the Motor Controller

The motor controller was provided by TRINAMIC. After examining their large offering of motor control solutions, the TMC5130 cDriver was selected for its performance and cost-effectiveness. This device is an integrated motor driver and motion controller solution that can be used for 3D-printing, CCTV cameras, and other applications for automating equipment.

For this project, the motor controller interfaces to the host system via SPI protocols and is configured as an SPI slave.

About the Host System

The host system is a Linux embedded platform that was developed with the NXP i.MX 8M Plus processor. The hardware platform consists of a 1.8GHz Quad ARM Cortex-A53, and a real-time CPU 800MHz ARM Cortex-M7.  This platform was developed by using the Yocto build system, an open source for embedded Linux systems.

The SPI Hardware Platform

The SPI hardware platform has numerous configurable pin headers, which is normal for SPI communication. The pin headers include a selection of the GPIO pins that were used to control an SPI interface. This capability was provided via the device tree mechanism of Embedded Linux.

The SPI interface on this platform is ECSPI (Enhanced Configurable SPI).

The host platform is configured as an SPI master controller. Here is a summary of the ECSPI features that were implemented in this project:

  • Full-duplex synchronous serial interface
  • Master/Slave configurable
  • One native Chip Select (SS) signal
  • Transfer continuation function allows unlimited length data transfers
  • 32-bit wide by 64-entry FIFO for both transmit and receive data
  • Polarity and phase of the Chip Select (SS) and SPI Clock (SCLK) are configurable
  • Direct Memory Access (DMA) support
  • Various operating frequencies

For these reasons, the Aardvark I2C/SPI Host Adapter was selected as the most effective tool for this SPI project.

The Benefits of the Aardvark I2C/SPI Host Adapter

The Aardvark adapter was instrumental for debugging and validating the motor controller interface.

Most of the challenges of this project occurred on the host side – configuring the chip select GPIO signal to ensure the correct motor controller was selected. This was critical, as the motor controller affects the placement of the mirrors, which directs the laser beam to track the selected target.

The Total Phase documentation provided all the information to quickly start using the Aardvark adapter and fine-tune the operations with greater detail as needed, such as programming devices and creating API scripts. For many reasons, the Aardvark adapter was truly instrumental for accurately completing this project on a timely basis.

About Total Phase

Do you have a project that needs more control, analysis, programming, and other features?  Feel free to contact Total Phase with your questions, or request a demo that applies to your application.