The Tamagawa over UART application does the following:
Connect the Tamagawa encoder via RS-485 Half-Duplex EVM to the LaunchPad. The connections between the LaunchPad and RS-485 EVM:
UART RX Pin(UART3_RXD)->JMP1-R, UART TX Pin(UART3_TXD)->JMP4-D, GPIO Pin(GPIO62)->JMP3-DE
The Tamagawa over UART example runs on R5F and communicates with Tamagawa encoder using a UART instance. It presents the user with menu options to select a 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 UART LLD write API, the command is passed to the encoder. Once the command is sent, the encoder starts to respond, and the UART LLD read API reads this response. The response is stored in the Tamagawa interface structure, and the data integrity is verified by CRC calculation. If CRC verification passes, the result is presented to the user, otherwise a CRC failure message is displayed.
| 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 | am263px-lp |
| Example folder | examples/position_sense/tamagawa_diagnostic_over_soc_uart/am263px-lp/r5fss0-0_freertos |
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) | Receive following data: 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) | Receive following data: 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 | Encoder-ID | Receive following data: 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) | Receive following data: 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 | Transmit following data: Proper address of the EEPROM where you want to write Proper data that you want to write. Receive following data: 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 | Transmit following data: Proper address of the EEPROM that you want to read. Receive following data: Control Field for EEPROM Read command EEPROM address that was read from Data read from the EEPROM CRC value | CRC success with EDF, ADF, CF and CRC values printed in the terminal. |
| Data ID 7 | Reset-Error | This command is 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). | CRC success with ABS, SF, CF and CRC values printed in the terminal. |
| Data ID C | Reset - multiturn | This command is used to reset multi-turn data(ABM). | CRC success with ABS, SF, CF and CRC values printed in the terminal. |