4.1. PRU ICSS Industrial Drives User Guide

4.1.1. Introduction

PRU-ICSS Industrial Drives package is designed for the Sitara processor AM64x (with PRU-ICSS IP) to enable customers leverage Industrial Drives(position, current sense & control algorithm) capabilities


4.1.2. Release 02.00.00

Released January 2021


4.1.3. System Requirements

4.1.3.1. Supported Devices

  • AM64x GPEVM

4.1.3.2. Component Version

The following is a list of tools bundled into the CCS installer. If you need to install CCS, see the CCS installation section

Component Version
CCS 10.10.0

This release requires Sitara SDK.



4.1.4. Reference Documents


4.1.5. Directory Structure

|   |--- docs

|   |--- examples

|       |--- board

|           | --- common

|       |--- endat_diagnostic

|       |--- hdsl_diagnostic

|   |--- interfaces

|       |--- include

|               |--- firmware

|                   |--- am437x
|                   |--- am65xx

|       |--- endat_master

|               |--- doc

|               |--- driver

|               |--- firmware

|               |--- include

|               |--- projects

|                   |--- ccsproject_args

|       |--- hdsl_master

|               |--- doc

|               |--- firmware

|               |--- include

|               |--- projects

|                   |--- ccsproject_args

|       |--- tools

|           | --- bin2header

Note

Refer to install path to get updated view for any changes in directory structure


4.1.6. Generating Project files

Note

Unlike [legacy Industrial SDK], the CCS project files are not readily available in the protocol package installer. IA_SDK_HOME is no longer declared as a environmental variable. This is declared in projectCreate for each project. Remove any declaration of IA_SDK_HOME from the system environment before generating or building a project. The steps that are involved to generate CCS project files with the help of the Batch file or Shell script are as explained below.

4.1.6.1. Steps to generate Project files

  • Open Command/Shell Prompt and navigate to [INSTALL-DIR]/<interfaces | examples>/<interface name | example name>/projects
    • interface name can be endat_master, hdsl_master or tamagawa_receiver
    • example name can be motor_control
  • Run projectCreate_core_sdk.bat or projectCreate_core_sdk.sh
Usage format:
projectCreate_core_sdk.bat (on Windows)
./projectCreate_core_sdk.sh (on Linux)

Note:

#. Following variables used by script can be overridden at shell/command prompt (if all packages are installed in default directory, overriding is not required)

  • CCS_INSTALL_DIR - Set the path where the recommended version of CCS is installed in user machine(The path upto where folder ‘eclipse’ is located.)
  • CCS_WORKSPACE_LOC - Set the CCS workspace location. This folder will be created if it doesn’t exist already.
  • IA_SDK_HOME - Specify the IA_SDK_HOME based on the the directory where the industrial package is installed.
  • PDK_INSTALL_PATH - Set the path where PDK RTOS package is installed (Refer to default path in projectCreate_core_sdk.bat)
  • PROJECT_CREATE_DIR - Set the folder where the created project will be kept. User can import the projects from this directory to CCS
  • PROJECT_CREATE_OPTIONS_FILE_DIR - Specify the directory where the project create options files are kept. This folder contains the *.txt files which specify the project settings (linked files, predefined symbols, compiler and linker options for a specific project)
  1. Ensure that Code Composer Studio is not running when executing projectCreate_core_sdk.bat or projectCreate_core_sdk.sh
  2. If the project create is successful, the generated project files will be found in [INSTALL-DIR]/<interfaces | examples>/<interface name | example name>/projects/<project_name>_AM64x_r5f

4.1.6.2. More info

The projectCreate_core_sdk.bat or.sh utilizes the project arguments provides in [INSTALL-DIR]/<interfaces | examples>/<interface name | example name>/projects/ccsproject_args to generate the project file


4.1.7. Applications

Following ones can be created using project file creation method mentioned in the above section

4.1.7.1. EnDat diagnostic

Project directory: [INSTALL-DIR]/interfaces/endat_master/projects

EnDat is a bidirectional interface for position encoders. During EnDat operation the EnDat master receives position information from the EnDat position encoder. The EnDat diagnostic application for SYS/BIOS demonstrates the EnDat master operation on the AM64x.

This application is controlled with a terminal interface using a serial over USB connection between the PC host and the EVM. Please connect a USB cable between the PC and the EVM. A serial terminal application (like teraterm/ hyperterminal/ minicom) is then run on the host. To configure, select the serial port corresponding to the port emulated over USB by the EVM. The host serial port should be configured to 115200 baud, no parity, 1 stop bit and no flow control. Connect EnDat encoder to AM64x EVM via TIDA-00179.

The EnDat driver provides a defined set of API’s to expose EnDat master interface. The diagnostic invokes these API’s to initialize EnDat, configure the host trigger mode, select between concurrent multi channel or single channel configuration, select the channel (channels in the case of concurrent multi channel configuration) and run the firmware. Once these steps are executed, the driver waits for the EnDat to be initialized. It then sets clock frequency to 200KHz (as propagation delay is not yet compensated) and obtains the encoder details including serial number, position resolution etc, and displays on the console. Based on the whether encoder is 2.2 or 2.1 type, it sets clock to either 8MHz or 1MHz respectively. While configuring clock, propagation delay is taken care using the automatically estimated propagation delay (user can override it too). In the case of concurrent multi channel configuration, if propagation delay between various channels are different, that too is automatically taken care.

Once initial setup is over, the diagnostic provides the user with a self explanatory menu. Two types of menu options are presented. One type (1-14) will send an EnDat command as per EnDat 2.2 specification. The other type (100-108) allows the user to configure clock frequency, various timing parameters, simulate motor control loop using 2.1 command as well as 2.2 command with safety (redundant position information), switch to continuous clock mode and monitor raw data. Concurrent multi channel configuration can work simultaneously for up-to three encoders with identical part number, all variants of 2.2 position commands as well as the 2.1 position command is supported and an additional option (109) to configure wire delay (useful when propagation delay in each channel is different) is available. Application by default, handles wire delay as required, the menu option provides a way to override it.

After the user selects an EnDat command, the diagnostic asks for more details to frame the command and performs a basic sanity check on the user entered values. Then the EnDat API is invoked to process the command. The received EnDat is processed & validated using the defined API’s. The result is then presented to the user.

Firmware sources are available @”interfaces\endat_master\firmware”, while documentations @”interfaces\endat_master\doc”.


4.1.7.2. Hiperface DSL diagnostic

Project directory: [INSTALL-DIR]/interfaces/hdsl_master/projects

This application is controlled with a terminal interface using a serial over USB connection between the PC host and the EVM. Please connect a USB cable between the PC and the EVM. A serial terminal application (like teraterm/ hyperterminal/ minicom) is then run on the host. To configure, select the serial port corresponding to the port emulated over USB by the EVM. The host serial port should be configured to 115200 baud, no parity, 1 stop bit and no flow control.

Connect the Hiperface DSL encoder to HDSL+/- signals available on header J7 or Sub-D15 connector Universal Digital Interface to Absolute Position Encoders Reference Design board

The firmware running on ICSS0-PRU1 provides a defined interface (refer to the documentations mentioned below for additional details). The HDSL diagnostic application interacts with the firmware interface. The application configures pinmux, configures ICSS clock to 225MHz, configure GPIO’s, initializes ICSS0-PRU1, ICSS0-IEP0 and IEP1(for SYNC mode support), loads lookup table for encoding/decoding of Hiperface data, loads the initialization section of PRU firmware & executes it. Firmware is split to three sections, initialization, datalink & transport. At startup, the application displays details about encoder & status. It then presents the user with menu options, based on the option selected, application communicates with HDSL interface and the result is presented to the user.

Firmware sources are available @”interfaces\hdsl_master\firmware”, while documentations @”interfaces\hdsl_master\doc”.


Note

A daughter board along with adapter card is required as in [2] <https://www.ti.com/tool/TIDA-00179>).




4.1.9. Archives

  • None


../../../_images/E2e2.jpg

For technical support please post your questions at http://e2e.ti.com