Tamagawa over uart application does below,
Connect the Tamagawa encoder via RS-485 Half-Duplex EVM to Am263x-LP. The connections between AM263x LP and RS-485
UART RX Pin(UART1_RXD)->JMP1-R, UART TX Pin(UART1_TXD)->JMP4-D, GPIO Pin(GPIO62)->JM3-DE
The tamagawa over uart example runs on R5 and communicates with tamagawa encoder by UART1. It 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 command. Then via the UART1 write API, the command is passed to encoder. Once the command is sent, the encoder starts to respond, and UART1 read API starts to read this response. Response is stored in the tamagawa interface, the status of the transaction is check by CRC calculation. If the status indicates success, the result is presented to the user otherwise print CRC failure.
Folder/Files | Description |
---|---|
${SDK_INSTALL_PATH}/examples/position_sense/tamagawa_diagnostic_over_soc_uart | |
uart_tamagawa.c | Tamagawa UART application |
${SDK_INSTALL_PATH}/source/position_sense/tamagawa_over_soc_uart | |
include/ | Folder containing tamagawa interface file. |
driver/ | Tamagawa uart driver |
Parameter | Value |
---|---|
CPU + OS | r5fss0-0 freertos |
Toolchain | ti-arm-clang |
Board | am263x-lp |
Example folder | examples/position_sense/tamagawa_diagnostic_over_soc_uart |
Shown below is a sample output when the application is run:
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 used to reset absolute position data(ABS) | CRC success with ABS, SF, CF and CRC values printed in the terminal. |
Data ID C | Reset- multiturn | This command used to reset multi-turn data(ABM) | CRC success with ABS, SF, CF and CRC values printed in the terminal. |