AM243x Motor Control SDK  09.01.00
Tamagawa Diagnostic

Note
Starting with MCU+ SDK version 08.05.00, the Tamagawa firmware and examples are based on EnDAT hardware interface from PRU-ICSSG.

Introduction

Tamagawa diagnostic application does below,

  • Configures pinmux, GPIO, UART, ICSS clock to 200MHz
  • Initializes ICSS0-PRU1
  • Loads the initialization section of PRU firmware & executes it

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/LP. 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.

The Tamagawa receiver firmware running on ICSS0-PRU1 provides a defined interface. The Tamagawa diagnostic application interacts with the Tamagawa receiver firmware interface. It then presents the user with menu options to select Data ID code (as defined by Tamagawa) to be sent to the encoder. The application collects the data entered by the user and configures the relevant interface. Then via the Tamagawa receiver interface, the command is triggered. Once the command completion is indicated by the interface, the status of the transaction is checked. If the Status indicates success, the result is presented to the user.

Important files and directory structure

Folder/Files Description
${SDK_INSTALL_PATH}/examples/position_sense/tamagawa_diagnostic
tamagawa_diagnostic.c Tamagawa diagnostic application
${SDK_INSTALL_PATH}/source/position_sense/tamagawa
firmware/ Folder containing TAMAGAWA PRU firmware sources.
driver/ Tamagawa diagnostic driver.

Supported Combinations

Parameter Value
CPU + OS r5fss0-0 freertos
ICSSG ICSSG0
PRU PRU1
Toolchain ti-arm-clang
Board am243x-evm (3 channel and 1 channel examples), am243x-lp (2 channel and 1 channel examples)
Example folder examples/position_sense/tamagawa_diagnostic

Steps to Run the Example

Hardware Prerequisites

Other than the basic EVM setup mentioned in EVM Setup , additional hardware required to run this demo is mentioned below

Note
For more design details of the TIDEP-01015 3 Axis Board, or Interface card connecting EVM and TIDEP-01015 3 Axis, please contact TI via E2E/FAE.

Hardware Prerequisities for Booster Pack

Hardware Setup

Hardware Setup for 3 channels on EVM

Tamagawa Encoder Hardware Setup for 3 channels

Hardware Setup(Using Booster Pack & AM243x-LP)

Hardware Setup of Booster Pack + LP for Tamagawa

Booster Pack Jumper Configuration

Designator ON/OFF Description
J11 OFF VSENSE/ISENSE select
J13 OFF VSENSE/ISENSE select
J17 Pin 1-2 Connected SDFM Clock Feedback Select
J18/J19 J18 OFF & J19 ON Axis 1: Encoder/Resolver Voltage Select
J20/J21 J20 ON & J21 OFF Axis 2: Encoder/Resolver Voltage Select
J22 OFF Axis 1: Manchester Encoding Select
J23 OFF Axis 2: Manchester Encoding Select
J24 OFF Axis 1: RS485/DSL MUX
J25 OFF Axis 2: RS485/DSL MUX
J26 OFF VSENSE/ISENSE Select
J27 ON 3WIRE/SDFM MUX
J28 OFF 3WIRE MUX

Build, load and run

  • When using CCS projects to build, import the CCS project and build it using the CCS project menu (see Using SDK with CCS Projects ).
  • When using makefiles to build, note the required combination and build using make command (see Using SDK with Makefiles )
  • Launch a CCS debug session and run the executable, see CCS Launch, Load and Run
  • Refer to UART terminal for user interface menu options.

Sample Output

Shown below is a sample output when the application is run:

Tamagawa Sample Output

Test Case Description

Data_ID Name Description Pass/fail Criteria
Data ID 0 Data readout (absolute position data) In this command we will receive: Absolute rotor position value in field name ABS.. Errors and warnings in field name SF(status field) CRC success with ABS, SF, CF and CRC values printed in the terminal.
Data ID 1 Data readout (multi-turn data) In this command we will receive data about: No. of rotor turns in field name ABM. Errors and warnings in field name SF(status field). CRC success with ABM, SF, CF and CRC values printed in the terminal.
Data ID 2 Endoder-ID In this command we will receive data about : Tamagawa encoder make-ID in ENID field . Errors and warnings in field name SF(status field) CRC success with ENID, SF, CF and CRC values printed in the terminal.
Data ID 3 Data readout(absolute+multiturn+encoder-ID) In this command we will receive : Absolute rotor position value in field name ABS. No. of rotor turns in field name ABM. Tamagawa encoder make-ID in ENID field . Errors and warnings in field name SF(status field) Other warnings in field name ALMC CRC success with ABS, ENID, ABM, ALMC, SF, CF and CRC values printed in the terminal.
Data ID 6 Writing to EEPROM In this command you provide : Proper address of the EEPROM where you want to write Proper data that you want to write.
As a response you recieve: Control Field for EEPROM Write command EEPROM address that you want to write to Data that you want to write to the EEPROM CRC value
CRC success with EDF, ADF, CF and CRC values printed in the terminal.
Data ID D Readout from EEPROM In this command you provide : Proper address of the EEPROM that you want to read.
As a response you recieve: Control Field for EEPROM Write command EEPROM address that you want to write to Data that you want to write to the EEPROM CRC value
CRC success with EDF, ADF, CF and CRC values printed in the terminal.
Data ID 7 Reset-Error This command used to reset errors. CRC success with ABS, SF, CF and CRC values printed in the terminal.
Data ID 8 Reset - absolute This command is used to reset absolute position data(ABS). In order to reset the ABS value, send this command 10 times and send Data ID 0. CRC success with ABS value set to 0 along with SF, CF and CRC values printed in the terminal.
Data ID C Reset - multiturn This command is used to reset multi-turn data(ABM). In order to reset the ABM value, send this command 10 times and send Data ID 1. CRC success with ABM value set to 0 along with SF, CF and CRC values printed in the terminal.