Pull request #24: am64x/am243x: EnDat: Update documentation

Merge in PINDSW/motor_control_sdk from a0502729_PINDSW-6687_EnDat_Documentation to next

* commit '800d9c5a4d12e4a3204c29c838161b35857d4923':
  am64x/am243x: Endat: Update documentation
  am64x/am243x: EnDat: Enable long time test run
This commit is contained in:
Achala Ram 2023-09-12 14:40:19 -05:00 committed by Pratheesh Gangadhar TK
commit c35b23f9aa
7 changed files with 467 additions and 188 deletions

View File

@ -369,10 +369,21 @@ earlier SDKs.
<th> Additional Remarks <th> Additional Remarks
</tr> </tr>
<tr> <tr>
<td> Position Sense EnDat
<td> \ref endat_init
<td> Added api parameter
<td> void* pruss_iep
</tr>
<tr>
<td> Position Sense EnDat
<td> Structure: endat_priv
<td> Added variables: pruss_iep, cmp3, cmp5 and cmp6
<td> <td>
<td> </tr>
<td> <tr>
<td> Position Sense EnDat
<td> Structure: cmd_supplement
<td> Added variables: cmp3, cmp5 and cmp6
<td> <td>
</tr> </tr>
</table> </table>

View File

@ -62,7 +62,7 @@ Following section describes the Example implementation of EnDat on ARM(R5F).
<th>Folder/Files <th>Folder/Files
<th>Description <th>Description
</tr> </tr>
<tr><td colspan="2" bgcolor=#F0F0F0> ${SDK_INSTALL_PATH}/examples/motor_control/endat_diagnostic</td></tr> <tr><td colspan="2" bgcolor=#F0F0F0> ${SDK_INSTALL_PATH}/examples/position_sense/endat_diagnostic</td></tr>
<tr> <tr>
<td>endat_diagnostic.c</td> <td>endat_diagnostic.c</td>
<td>EnDAT diagnostic application</td> <td>EnDAT diagnostic application</td>
@ -86,7 +86,7 @@ Following section describes the Example implementation of EnDat on ARM(R5F).
---------------|----------- ---------------|-----------
CPU + OS | r5fss0-0 freertos CPU + OS | r5fss0-0 freertos
ICSSG | ICSSG0 ICSSG | ICSSG0
PRU | PRU1 PRU | PRU1, TXPRU1 and RTUPRU1
Toolchain | ti-arm-clang Toolchain | ti-arm-clang
Board | @VAR_BOARD_NAME_LOWER Board | @VAR_BOARD_NAME_LOWER
Example folder | examples/motorcontrol/endat_example Example folder | examples/motorcontrol/endat_example
@ -99,7 +99,7 @@ Following section describes the Example implementation of EnDat on ARM(R5F).
---------------|----------- ---------------|-----------
CPU + OS | r5fss0-0 freertos CPU + OS | r5fss0-0 freertos
ICSSG | ICSSG0 ICSSG | ICSSG0
PRU | PRU1 PRU | PRU1, TXPRU1 and RTUPRU1
Toolchain | ti-arm-clang Toolchain | ti-arm-clang
Board | @VAR_BOARD_NAME_LOWER, @VAR_LP_BOARD_NAME_LOWER Board | @VAR_BOARD_NAME_LOWER, @VAR_LP_BOARD_NAME_LOWER
Example folder | examples/motorcontrol/endat_example Example folder | examples/motorcontrol/endat_example
@ -121,7 +121,7 @@ Other than the basic EVM setup mentioned in \htmllink{@VAR_MCU_SDK_DOCS_PATH/EVM
- EnDat encoder - EnDat encoder
- AM243x-LP board - AM243x-LP board
- BP-AM2BLDCSERVO - BP-AM2BLDCSERVO, https://www.ti.com/tool/BP-AM2BLDCSERVO
\endcond \endcond
## Hardware Setup ## Hardware Setup
@ -222,389 +222,571 @@ Shown below is a sample output when the application is run:
<table> <table>
<tr> <tr>
<th style="width:4%">S.No</th>
<th>Test detail <th>Test detail
<th>Steps <th>Steps
<th>Pass/fail crieteria <th>Pass/fail crieteria
</tr> </tr>
<tr> <tr>
<td>To check position value</td> <td style="text-align: center">1.</td>
<td style="text-align: center">To check position value</td>
<td>1. Enter 1 to select "Encoder send position values"</td> <td>1. Enter 1 to select "Encoder send position values"</td>
<td>Crc success </td> <td style="text-align: center">CRC success </td>
</tr> </tr>
<tr> <tr>
<td>To receive encoder's operating parameters(error messege)</td> <td rowspan="4" style="text-align: center">2.</td>
<td rowspan="4" style="text-align: center">To receive encoder's operating parameters (Error Message)</td>
<td>1. Enter 2 to select "Selection of memory area"</td> <td>1. Enter 2 to select "Selection of memory area"</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td></td>
<td>2. Enter "B9" in MRS code to select "Operating parameters"</td> <td>2. Enter "B9" in MRS code to select "Operating parameters"</td>
<td>Crc success </td> <td style="text-align: center">CRC success </td>
</tr> </tr>
<tr> <tr>
<td></td>
<td>3. Enter 4 to select "Encoder to send parameter"</td> <td>3. Enter 4 to select "Encoder to send parameter"</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td></td> <td>4. Enter 00 in "parameter address" for selecting "Error message"</td>
<td>4. Enter 0 in "parameter address" for selecting "Error message"</td> <td style="text-align: center">CRC success </td>
<td>Crc success </td>
</tr> </tr>
<tr> <tr>
<td>To receive encoder's manufacture parameters for Endat 2.2</td> <td rowspan="4" style="text-align: center">3.</td>
<td rowspan="4" style="text-align: center">To receive encoder's operating parameters (Warning message)</td>
<td>1. Enter 2 to select "Selection of memory area"</td> <td>1. Enter 2 to select "Selection of memory area"</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td></td> <td>2. Enter "B9" in MRS code to select "Operating parameters"</td>
<td>2. Enter "BD" in MRS code to select "Parameters of encoder manufacturer for Endat 2.2"</td> <td style="text-align: center">CRC success </td>
<td>Crc success </td>
</tr> </tr>
<tr> <tr>
<td></td>
<td>3. Enter 4 to select "Encoder to send parameter"</td> <td>3. Enter 4 to select "Encoder to send parameter"</td>
<td>Crc success </td>
</tr>
<tr>
<td></td> <td></td>
<td>4. Enter 0 in "parameter address" for selecting "Status of additional info"</td>
<td>Crc success </td>
</tr> </tr>
<tr> <tr>
<td>To set values to encoder's operating parameters (error message)</td> <td>4. Enter 01 in "parameter address" for selecting "Error message"</td>
<td style="text-align: center">CRC success </td>
</tr>
<tr>
<td rowspan="4" style="text-align: center">4.</td>
<td rowspan="4" style="text-align: center">To receive encoder's manufacture parameters for Endat 2.2</td>
<td>1. Enter 2 to select "Selection of memory area"</td>
<td></td>
</tr>
<tr>
<td>2. Enter "BD" in MRS code to select "Parameters of encoder manufacturer for Endat 2.2"</td>
<td style="text-align: center">CRC success </td>
</tr>
<tr>
<td>3. Enter 4 to select "Encoder to send parameter"</td>
<td style="text-align: center">CRC success </td>
</tr>
<tr>
<td>4. Enter 0 in "parameter address" for selecting "Status of additional info 1"</td>
<td style="text-align: center">CRC success </td>
</tr>
<tr>
<td rowspan="5" style="text-align: center">5.</td>
<td rowspan="5" style="text-align: center">To set values to encoder's operating parameters (Clear error message)</td>
<td>1. Enter 2 to select "Selection of memory area"</td> <td>1. Enter 2 to select "Selection of memory area"</td>
<td> </td> <td> </td>
</tr> </tr>
<tr> <tr>
<td></td>
<td>2. Enter "B9" in MRS code to select "Operating parameters"</td> <td>2. Enter "B9" in MRS code to select "Operating parameters"</td>
<td>Crc success </td> <td style="text-align: center">CRC success </td>
</tr> </tr>
<tr> <tr>
<td></td>
<td>3. Enter 3 to select "Encoder to receive parameter"</td> <td>3. Enter 3 to select "Encoder to receive parameter"</td>
<td> </td> <td> </td>
</tr> </tr>
<tr> <tr>
<td></td>
<td>4. Enter 0 in "parameter address" for selecting "Error message"</td> <td>4. Enter 0 in "parameter address" for selecting "Error message"</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td></td>
<td>5. Enter 0 in "parameter value" for seting value in " Error message"</td> <td>5. Enter 0 in "parameter value" for seting value in " Error message"</td>
<td>Crc success </td> <td style="text-align: center">CRC success </td>
</tr> </tr>
<tr> <tr>
<td>To set values to encoder's manufacturing parameters for Endat 2.2(Status of additional info)</td> <td rowspan="5" style="text-align: center">6.</td>
<td rowspan="5" style="text-align: center">To set values to encoder's operating parameters (Clear warning message)</td>
<td>1. Enter 2 to select "Selection of memory area"</td> <td>1. Enter 2 to select "Selection of memory area"</td>
<td></td> <td> </td>
</tr> </tr>
<tr> <tr>
<td></td> <td>2. Enter "B9" in MRS code to select "Operating parameters"</td>
<td>2. Enter "BD" in MRS code to select "Parameters of encoder manufacturer for Endat 2.2"</td> <td style="text-align: center">CRC success </td>
<td>Crc success </td>
</tr> </tr>
<tr> <tr>
<td></td>
<td>3. Enter 3 to select "Encoder to receive parameter"</td> <td>3. Enter 3 to select "Encoder to receive parameter"</td>
<td> </td>
</tr>
<tr>
<td>4. Enter 01 in "parameter address" for selecting "Error message"</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td></td> <td>5. Enter 0 in "parameter value" for seting value in " Error message"</td>
<td>4. Enter 0 in "parameter address" for selecting "Status of additional info"</td> <td style="text-align: center">CRC success </td>
</tr>
<tr>
<td rowspan="8" style="text-align: center">7.</td>
<td rowspan="8" style="text-align: center">To set values to encoder's manufacturing parameters for Endat 2.2(Status of additional info)</td>
<td>1. Enter 9 to select "Encoder send position values + Additional Information(s) and Selection of memory area"</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td></td> <td>2. Enter "45" in MRS code to select "Parameters of encoder manufacturer for Endat 2.2"</td>
<td>5. Enter 0 in "parameter value" for seting value in " Status of additional info"</td> <td style="text-align: center">CRC success </td>
<td>Crc success </td>
</tr> </tr>
<tr> <tr>
<td>To reset encoder</td> <td>3. Enter 9 to select "Encoder send position values + Additional Information(s) and Selection of memory area"</td>
<td style="text-align: center">CRC success </td>
</tr>
<tr>
<td>4. Enter "BD" in MRS code to select "Memory parameter (LSB)" of Additional Information 1</td>
<td style="text-align: center">CRC success </td>
</tr>
<tr>
<td>5. Enter 10 to select "Encoder send position values + Additional Information(s) and receive parameter"</td>
<td></td>
</tr>
<tr>
<td>6. Enter 0 in "parameter address" for selecting "Status of additional info"</td>
<td></td>
</tr>
<tr>
<td>7. Enter 1235 (or any 2 byte value) in "parameter value" for seting value in " Status of additional info"</td>
<td style="text-align: center">CRC success </td>
</tr>
<tr>
<td>8. Enter 8 to select "Encoder send position values + Additional Information(s)"<br>&emsp; <b>Note: Write is not permenant. When read again using Command 11, encoder will return the default value</b></td>
<td style="text-align: center">Values followed by 0x45 represents last byte of the data received by encoder<br> Crc success </td>
</tr>
<tr>
<td style="text-align: center">8.</td>
<td style="text-align: center">To reset encoder</td>
<td>1. Enter 5 to select "Encoder receive reset"</td> <td>1. Enter 5 to select "Encoder receive reset"</td>
<td>Crc success </td> <td style="text-align: center">CRC success </td>
</tr> </tr>
<tr> <tr>
<td>To receive test values from encoder with port address "0"</td> <td rowspan="3" style="text-align: center">9.</td>
<td rowspan="3" style="text-align: center">To receive test values from encoder with port address "0"</td>
<td>1. Enter 7 to select "Encoder receive test command"</td> <td>1. Enter 7 to select "Encoder receive test command"</td>
<td> </td> <td> </td>
</tr> </tr>
<tr> <tr>
<td></td>
<td>2. Enter 0 in "enter port address" </td> <td>2. Enter 0 in "enter port address" </td>
<td> </td> <td> </td>
</tr> </tr>
<tr> <tr>
<td></td>
<td>3. Enter 6 to select "Encoder send test values"</td> <td>3. Enter 6 to select "Encoder send test values"</td>
<td>Crc success </td> <td style="text-align: center">CRC success </td>
</tr> </tr>
<tr> <tr>
<td>To receive test values from encoder with port address "E" </td> <td rowspan="3" style="text-align: center">10.</td>
<td rowspan="3" style="text-align: center">To receive test values from encoder with port address "E" </td>
<td>1. Enter 7 to select "Encoder receive test command"</td> <td>1. Enter 7 to select "Encoder receive test command"</td>
<td> </td> <td> </td>
</tr> </tr>
<tr> <tr>
<td></td>
<td>2. Enter "E" in "enter port address" </td> <td>2. Enter "E" in "enter port address" </td>
<td> </td> <td> </td>
</tr> </tr>
<tr> <tr>
<td></td>
<td>3. Enter 6 to select "Encoder send test values"</td> <td>3. Enter 6 to select "Encoder send test values"</td>
<td>Crc success </td> <td style="text-align: center">CRC success </td>
</tr> </tr>
<tr> <tr>
<td>To check position value with aditional info.</td> <td rowspan="5" style="text-align: center">11.</td>
<td>1. Enter 8 to select "Encoder send position values + AI(s)"</td> <td rowspan="5" style="text-align: center">To check position value with aditional info.</td>
<td>Crc success </td> <td>1. Enter 9 to select "Encoder send position values + Additional Information(s) and Selection of memory area"</td>
<td style="text-align: center">CRC success </td>
</tr> </tr>
<tr> <tr>
<td>To receive encoder's operating parameters(error messege) <td>2. Enter "47" in MRS code to select "Acknowledge MRS code" of Additional Information 1</td>
<td style="text-align: center">CRC success </td>
</tr>
<tr>
<td>3. Enter 9 to select "Encoder send position values + Additional Information(s) and Selection of memory area"</td>
<td> </td>
</tr>
<tr>
<td>4. Enter "56" in MRS code to select "Asynchronous Position value word 1 LSB" of Additional Information 2</td>
<td style="text-align: center">CRC success </td>
</tr>
<tr>
<td>5. Enter 8 to select "Encoder send position values + Additional Information(s)"</td>
<td style="text-align: center">CRC success </td>
</tr>
<tr>
<td rowspan="7" style="text-align: center">12.</td>
<td rowspan="7" style="text-align: center">To receive encoder's operating parameters(error messege)
+receive position value with additional info +receive position value with additional info
</td> </td>
<td>1. Enter 9 to select "Encoder send position values + AI(s) and Selection of memory area"</td> <td>1. Enter 9 to select "Encoder send position values + Additional Information(s) and Selection of memory area"</td>
<td> </td> <td> </td>
</tr> </tr>
<tr> <tr>
<td></td> <td>2. Enter "45" in MRS code to select "Memory parameter (LSB)" of Additional Information 1</td>
<td>2. Enter "B9" in MRS code to select "Operating parameters"</td> <td style="text-align: center">CRC success </td>
<td>Crc success </td>
</tr> </tr>
<tr> <tr>
<td></td> <td>3. Enter 9 to select "Encoder send position values + Additional Information(s) and Selection of memory area"</td>
<td>3. Enter 11 to select "Encoder send position values + AI(s) and send parameter"</td>
<td> </td> <td> </td>
</tr> </tr>
<tr> <tr>
<td></td> <td>4. Enter "B9" in MRS code to select "Operating parameters"</td>
<td>4. Enter 0 in "parameter address" for selecting "Error message"</td> <td style="text-align: center">CRC success </td>
<td>Crc success</td>
</tr> </tr>
<tr> <tr>
<td>To receive encoder's manufacture parameters <td>5. Enter 11 to select "Encoder send position values + Additional Information(s) and send parameter"</td>
<td> </td>
</tr>
<tr>
<td>6. Enter 0 in "parameter address" for selecting "Error message"</td>
<td style="text-align: center">CRC success</td>
</tr>
<tr>
<td>7. Enter 8 to select "Encoder send position values + Additional Information(s)"</td>
<td style="text-align: center">CRC success</td>
</tr>
<tr>
<td rowspan="7" style="text-align: center">13.</td>
<td rowspan="7" style="text-align: center">To receive encoder's manufacture parameters
for Endat 2.2 +receive position value with additional info for Endat 2.2 +receive position value with additional info
<td>1. Enter 9 to select "Encoder send position values + AI(s) and Selection of memory area"</td> <td>1. Enter 9 to select "Encoder send position values + Additional Information(s) and Selection of memory area"</td>
<td> </td> <td> </td>
</tr> </tr>
<tr> <tr>
<td></td> <td>2. Enter "45" in MRS code to select "Memory parameter (LSB)" of Additional Information 1</td>
<td>2. Enter "BD" in MRS code to select "Parameters of encoder manufacturer for Endat 2.2"</td> <td style="text-align: center">CRC success </td>
<td>Crc success </td>
</tr> </tr>
<tr> <tr>
<td></td> <td>3. Enter 9 to select "Encoder send position values + Additional Information(s) and Selection of memory area"</td>
<td>3. Enter 11 to select "Encoder send position values + AI(s) and send parameter"</td>
<td> </td> <td> </td>
</tr> </tr>
<tr> <tr>
<td></td> <td>4. Enter "BD" in MRS code to select "Parameters of encoder manufacturer for Endat 2.2"</td>
<td>4. Enter 0 in "parameter address" for selecting "Status of additional info"</td> <td style="text-align: center">CRC success </td>
<td>Crc success</td>
</tr> </tr>
<tr> <tr>
<td>To set values to encoder's operating parameters (error message) <td>5. Enter 11 to select "Encoder send position values + Additional Information(s) and send parameter"</td>
<td> </td>
</tr>
<tr>
<td>6. Enter 0 in "parameter address" for selecting "Status of additional info 1"</td>
<td> </td>
</tr>
<tr>
<td>7. Enter 8 to select "Encoder send position values + Additional Information(s)"</td>
<td style="text-align: center">CRC success</td>
</tr>
<tr>
<td rowspan="5" style="text-align: center">14.</td>
<td rowspan="5" style="text-align: center">To acknowledge MRS code for Endat 2.2
<td>1. Enter 9 to select "Encoder send position values + Additional Information(s) and Selection of memory area"</td>
<td> </td>
</tr>
<tr>
<td>2. Enter "47" in MRS code to select "Acknowledge MRS code" of Additional Information 1</td>
<td style="text-align: center">CRC success </td>
</tr>
<tr>
<td>3. Enter 9 to select "Encoder send position values + Additional Information(s) and Selection of memory area</td>
<td> </td>
</tr>
<tr>
<td>4. Enter "BD" or any other valid MRS code </td>
<td style="text-align: center">CRC success </td>
</tr>
<tr>
<td>5. Enter 8 to select "Encoder send position values + Additional Information(s)"</td>
<td style="text-align: center">Additional Information 1:0x47bd00<br>&emsp;&emsp;&emsp;&emsp;(for MRS code = BD) </td>
</tr>
<tr>
<td rowspan="5" style="text-align: center">15.</td>
<td rowspan="5" style="text-align: center">To set values to encoder's operating parameters (error message)
+receive position value with additional info +receive position value with additional info
<td>1. Enter 9 to select "Encoder send position values + AI(s) and Selection of memory area"</td> <td>1. Enter 9 to select "Encoder send position values + Additional Information(s) and Selection of memory area"</td>
<td> </td> <td> </td>
</tr> </tr>
<tr> <tr>
<td></td>
<td>2. Enter "B9" in MRS code to select "Operating parameters"</td> <td>2. Enter "B9" in MRS code to select "Operating parameters"</td>
<td>Crc success </td> <td style="text-align: center">CRC success </td>
</tr> </tr>
<tr> <tr>
<td></td> <td>3. Enter 10 to select "Encoder send position values + Additional Information(s) and receive parameter"</td>
<td>3. Enter 10 to select "Encoder send position values + AI(s) and receive parameter"</td>
<td> </td> <td> </td>
</tr> </tr>
<tr> <tr>
<td></td>
<td>4. Enter 0 in "parameter address" for selecting "Error message"</td> <td>4. Enter 0 in "parameter address" for selecting "Error message"</td>
<td> </td> <td> </td>
</tr> </tr>
<tr> <tr>
<td></td> <td>5. Enter 0 in "parameter value" for seting value in "Error message"</td>
<td>5. Enter 0 in "parameter value" for seting value in " Error message"</td> <td style="text-align: center">CRC success</td>
<td>Crc success</td>
</tr> </tr>
<tr> <tr>
<td>To set values to encoder's manufacturing parameters for Endat 2.2(Status of additional info) <td rowspan="5" style="text-align: center">16.</td>
<td rowspan="5" style="text-align: center">To set values to encoder's manufacturing parameters for Endat 2.2(Status of additional info)
+receive position value with additional info +receive position value with additional info
</td> </td>
<td>1. Enter 9 to select "Encoder send position values + AI(s) and Selection of memory area"</td> <td>1. Enter 9 to select "Encoder send position values + Additional Information(s) and Selection of memory area"</td>
<td> </td> <td> </td>
</tr> </tr>
<tr> <tr>
<td></td>
<td>2. Enter "BD" in MRS code to select "Parameters of encoder manufacturer for Endat 2.2"</td> <td>2. Enter "BD" in MRS code to select "Parameters of encoder manufacturer for Endat 2.2"</td>
<td>Crc success </td> <td style="text-align: center">CRC success </td>
</tr> </tr>
<tr> <tr>
<td></td> <td>3. Enter 10 to select "Encoder send position values + Additional Information(s) and receive parameter"</td>
<td>3. Enter 10 to select "Encoder send position values + AI(s) and receive parameter"</td>
<td> </td> <td> </td>
</tr> </tr>
<tr> <tr>
<td></td>
<td>4. Enter 0 in "parameter address" for selecting "Status of additional info"</td> <td>4. Enter 0 in "parameter address" for selecting "Status of additional info"</td>
<td> </td> <td> </td>
</tr> </tr>
<tr> <tr>
<td></td>
<td>5. Enter 0 in "parameter value" for seting value in " Status of additional info"</td> <td>5. Enter 0 in "parameter value" for seting value in " Status of additional info"</td>
<td>Crc success</td> <td style="text-align: center">CRC success</td>
</tr> </tr>
<tr> <tr>
<td>To reset encoder +receive position value with additional info</td> <td rowspan="7" style="text-align: center">17.</td>
<td>1. Enter 12 to select "Encoder send position values + AI(s) and receive error reset"</td> <td rowspan="7" style="text-align: center">To receive encoder's OEM (Original Equipment Manufacturer) data </td>
<td>Crc success </td> <td>1. Enter 9 to select "Encoder send position values + Additional Information(s) and Selection of memory area"</td>
</tr>
<tr>
<td></td>
<td>1. Enter 14 to select "Encoder receive communication command"</td>
<td>Crc success </td>
</tr>
<tr>
<td></td>
<td>2. Enter ______in "enter encoder address" </td>
<td>Crc success </td>
</tr>
<tr>
<td></td>
<td>3. Enter _____ in "instruction hex value"</td>
<td>Crc success </td>
</tr>
<tr>
<td></td>
<td>1. Enter 14 to select "Encoder receive communication command"</td>
<td>Crc success </td>
</tr>
<tr>
<td></td>
<td>2. Enter ______in "enter encoder address" </td>
<td>Crc success </td>
</tr>
<tr>
<td></td>
<td>3. Enter _____ in "instruction hex value"</td>
<td>Crc success </td>
</tr>
<tr>
<td>Configure Clock </td>
<td>1. Enter 100 to select "configure clock"</td>
<td>Crc success(Tested up to 8MHz)</td>
</tr>
<tr>
<td></td>
<td>2. Enter ___ for clock frequency(in Hz)</td>
<td> </td> <td> </td>
</tr> </tr>
<tr> <tr>
<td>Simulate motor control 2.1 position loop</td> <td>2. Enter "45" in MRS code to select "Memory parameter (LSB)" of Additional Information 1</td>
<td style="text-align: center">CRC success </td>
</tr>
<tr>
<td>3. Enter 9 to select "Encoder send position values + Additional Information(s) and Selection of memory area"</td>
<td> </td>
</tr>
<tr>
<td>4. Enter A9 (or AB or AD) in MRS code to select the OEM memory</td>
<td style="text-align: center">CRC success </td>
</tr>
<tr>
<td>5. Enter 11 to select "Encoder send position values + Additional Information(s) and send parameter"</td>
<td> </td>
</tr>
<tr>
<td>6. Enter 40 in "parameter address" </td>
<td> </td>
</tr>
<tr>
<td>7. Enter 8 to select "Encoder send position values + Additional Information(s)"</td>
<td style="text-align: center">CRC success</td>
</tr>
<tr>
<td rowspan="5" style="text-align: center">18.</td>
<td rowspan="5" style="text-align: center">To set values in OEM memory area </td>
<td>1. Enter 9 to select "Encoder send position values + Additional Information(s) and Selection of memory area"</td>
<td> </td>
</tr>
<tr>
<td>2. Enter "A9" in MRS code to select "Operating parameters"</td>
<td style="text-align: center">CRC success </td>
</tr>
<tr>
<td>3. Enter 10 to select "Encoder send position values + Additional Information(s) and receive parameter"</td>
<td> </td>
</tr>
<tr>
<td>4. Enter 40 in "parameter address" </td>
<td> </td>
</tr>
<tr>
<td>5. Enter E9 in "parameter value"</td>
<td style="text-align: center">CRC success</td>
</tr>
<tr>
<td rowspan="7" style="text-align: center">19.</td>
<td rowspan="7" style="text-align: center">To reset encoder +receive position value with additional info</td>
<td>1. Enter 12 to select "Encoder send position values + Additional Information(s) and receive error reset"</td>
<td style="text-align: center">CRC success </td>
</tr>
<tr>
<td>1. Enter 14 to select "Encoder receive communication command"</td>
<td style="text-align: center">CRC success </td>
</tr>
<tr>
<td>2. Enter ______in "enter encoder address" </td>
<td style="text-align: center">CRC success </td>
</tr>
<tr>
<td>3. Enter _____ in "instruction hex value"</td>
<td style="text-align: center">CRC success </td>
</tr>
<tr>
<td>1. Enter 14 to select "Encoder receive communication command"</td>
<td style="text-align: center">CRC success </td>
</tr>
<tr>
<td>2. Enter ______in "enter encoder address" </td>
<td style="text-align: center">CRC success </td>
</tr>
<tr>
<td>3. Enter _____ in "instruction hex value"</td>
<td style="text-align: center">CRC success </td>
</tr>
<tr>
<td rowspan="2" style="text-align: center">20.</td>
<td rowspan="2" style="text-align: center">Configure Clock </td>
<td>1. Enter 100 to select "configure clock"</td>
<td> </td>
</tr>
<tr>
<td>2. Enter ___ for clock frequency(in Hz)</td>
<td style="text-align: center">CRC success(Tested up to 8MHz)</td>
</tr>
<tr>
<td rowspan="3" style="text-align: center">21.</td>
<td rowspan="3" style="text-align: center">Simulate motor control 2.1 position loop</td>
<td>1. Enter 101 to select "Simulate motor control 2.1 position loop"</td> <td>1. Enter 101 to select "Simulate motor control 2.1 position loop"</td>
<td> </td> <td> </td>
</tr> </tr>
<tr> <tr>
<td></td>
<td>2. Enter 10000 to select "clock frequency"</td> <td>2. Enter 10000 to select "clock frequency"</td>
<td> </td> <td> </td>
</tr> </tr>
<tr> <tr>
<td></td>
<td>3. Rotate the rotor of motor and see the changes in Position value on UART</td> <td>3. Rotate the rotor of motor and see the changes in Position value on UART</td>
<td>Position Values are changing when rotor moves </td> <td style="text-align: center">Position Values are changing when rotor moves </td>
</tr> </tr>
<tr> <tr>
<td>Toggle raw data display</td> <td rowspan="2" style="text-align: center">22.</td>
<td rowspan="2" style="text-align: center">Toggle raw data display</td>
<td>1. Enter 102 to select "Toggle raw data display"</td> <td>1. Enter 102 to select "Toggle raw data display"</td>
<td> </td> <td> </td>
</tr> </tr>
<tr> <tr>
<td></td>
<td>2. Enter 1 to select "Encoder send position value"</td> <td>2. Enter 1 to select "Encoder send position value"</td>
<td>raw data can be displayed </td> <td style="text-align: center">raw data can be displayed </td>
</tr> </tr>
<tr> <tr>
<td>Configure TST delay</td> <td style="text-align: center">23.</td>
<td style="text-align: center">Configure TST delay</td>
<td></td> <td></td>
<td> </td> <td> </td>
</tr> </tr>
<tr> <tr>
<td>Start continous mode</td> <td rowspan="2" style="text-align: center">24.</td>
<td>1. Enter 104 to select "Start continous mode"</td> <td rowspan="2" style="text-align: center">Start continuous mode</td>
<td>1. Enter 104 to select "Start continuous mode"</td>
<td> </td> <td> </td>
</tr> </tr>
<tr> <tr>
<td></td>
<td>2. Rotate the rotor of motor and see the changes in Position value on UART</td> <td>2. Rotate the rotor of motor and see the changes in Position value on UART</td>
<td>Position Values are changing when rotor moves </td> <td style="text-align: center">Position Values are changing when rotor moves </td>
</tr> </tr>
<tr> <tr>
<td>Configure rx arm counter</td> <td rowspan="3" style="text-align: center">25.</td>
<td rowspan="3" style="text-align: center">Configure rx arm counter</td>
<td>1. Enter 105 to select "Configure rx arm counter" </td> <td>1. Enter 105 to select "Configure rx arm counter" </td>
<td> </td> <td> </td>
</tr> </tr>
<tr> <tr>
<td></td>
<td>2. Enter 0 to select channel 0(only for multi channel configuration) </td> <td>2. Enter 0 to select channel 0(only for multi channel configuration) </td>
<td> </td> <td> </td>
</tr> </tr>
<tr> <tr>
<td></td>
<td>3. Enter ___ to "select time in ns"</td> <td>3. Enter ___ to "select time in ns"</td>
<td> </td> <td> </td>
</tr> </tr>
<tr> <tr>
<td>configure rx clock disable time</td> <td rowspan="3" style="text-align: center">26.</td>
<td rowspan="3" style="text-align: center">configure rx clock disable time</td>
<td>1. Enter 106 to select "configure rx clock disable time"</td> <td>1. Enter 106 to select "configure rx clock disable time"</td>
<td> </td> <td> </td>
</tr> </tr>
<tr> <tr>
<td></td>
<td>2. Enter 0 to select channel 0(only for multi channel configuration)</td> <td>2. Enter 0 to select channel 0(only for multi channel configuration)</td>
<td> </td> <td> </td>
</tr> </tr>
<tr> <tr>
<td></td>
<td>3. Enter ___ to "select time in ns"</td> <td>3. Enter ___ to "select time in ns"</td>
<td> </td> <td> </td>
</tr> </tr>
<tr> <tr>
<td>Simulate motor control 2.2 position loop(safety)</td> <td rowspan="3" style="text-align: center">27.</td>
<td rowspan="3" style="text-align: center">Simulate motor control 2.2 position loop(safety)</td>
<td>1. Enter 107 to select "Simulate motor control 2.2 position loop"</td> <td>1. Enter 107 to select "Simulate motor control 2.2 position loop"</td>
<td> </td> <td> </td>
</tr> </tr>
<tr> <tr>
<td></td> <td>2. Enter 10000 to select "clock frequency"</td>
<td>3. Enter 10000 to select "clock frequency"</td>
<td> </td> <td> </td>
</tr> </tr>
<tr> <tr>
<td></td> <td>3. Rotate the rotor of motor and see the changes in Position value on UART</td>
<td>4. Rotate the rotor of motor and see the changes in Position value on UART</td> <td style="text-align: center">Position Values are changing when rotor moves </td>
<td>Position Values are changing when rotor moves </td>
</tr> </tr>
<tr> <tr>
<td>Configure propogation delay(td)</td> <td rowspan="2" style="text-align: center">28.</td>
<td rowspan="2" style="text-align: center">Configure propogation delay(td)</td>
<td>1. Enter 108 to select configure propagation delay </td> <td>1. Enter 108 to select configure propagation delay </td>
<td> </td> <td> </td>
</tr> </tr>
<tr> <tr>
<td></td>
<td>2. Enter 0 to select channel 0(only for multi channel configuration)</td> <td>2. Enter 0 to select channel 0(only for multi channel configuration)</td>
<td> </td> <td> </td>
</tr> </tr>
<tr> <tr>
<td>To read Recovery Time</td> <td rowspan="5" style="text-align: center">29.</td>
<td>1. Enter 8 to select "Encoder send position values + AI(s)" </td> <td rowspan="5" style="text-align: center">Configure Recovery time (tr) using EnDat 2.2 mode transmission</td>
<td>Crc Success </td> <td>1. Enter 9 to select "Encoder send position values + Additional Information(s) and Selection of memory area" </td>
<td> </td>
</tr>
<tr>
<td>2. Enter "B9" in MRS code to select "Operating parameters"</td>
<td> </td>
</tr>
<tr>
<td>3. Enter 10 to select "Encoder send position values + Additional Information(s) and receive parameter"</td>
<td> </td>
</tr>
<tr>
<td>4. Enter 03 in "parameter address" for selecting "Initializing the functions"</td>
<td> </td>
</tr>
<tr>
<td>5. Enter 01 in "parameter value" for selecting low recovery time<br>&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp; or <br>&nbsp; &nbsp;Enter 02 in "parameter value" for selecting high recovery time</td>
<td style="text-align: center">CRC success </td>
</tr>
<tr>
<td rowspan="2" style="text-align: center">30.</td>
<td rowspan="2" style="text-align: center">To read Recovery Time</td>
<td>1. Enter 8 to select "Encoder send position values + Additional Information(s)" </td>
<td style="text-align: center">CRC Success </td>
</tr> </tr>
<tr> <tr>
<td></td>
<td>2. Enter 110 for read recovery time from DMEM </td> <td>2. Enter 110 for read recovery time from DMEM </td>
<td> Recovery Time is set to 1.25 us <= RT <= 3.75us or 10 us <= RT <= 30 us</td> <td style="text-align: center">Recovery Time is set to 1.25 us <= RT <= 3.75us or 10 us <= RT <= 30 us</td>
</tr>
<tr>
<td rowspan="2" style="text-align: center">31.</td>
<td rowspan="2" style="text-align: center">To test periodic continuous mode</td>
<td>1. Enter 200 to enable periodic mode </td>
<td style="text-align: center"> </td>
</tr>
<tr>
<td>2. Enter 5000 (in ns) for position read time </td>
<td style="text-align: center">Position Values are changing when rotor moves </td>
</tr>
<tr>
<td rowspan="2" style="text-align: center">32.</td>
<td rowspan="2" style="text-align: center">Long term test</td>
<td>1. Enter 111 to enable Long time continuous mode </td>
<td></td>
</tr>
<tr>
<td>2. press enter to stop the long term test</td>
<td style="text-align: center">The result shows the number of position command sent and the number of CRC failures received</td>
</tr> </tr>
</table> </table>

View File

@ -93,7 +93,7 @@ Other than the basic EVM setup mentioned in \htmllink{@VAR_MCU_SDK_DOCS_PATH/EVM
- HDSL encoder - HDSL encoder
- AM243x-LP board - AM243x-LP board
- BP-AM2BLDCSERVO - BP-AM2BLDCSERVO, https://www.ti.com/tool/BP-AM2BLDCSERVO
\endcond \endcond

View File

@ -95,7 +95,7 @@ Other than the basic EVM setup mentioned in \htmllink{@VAR_MCU_SDK_DOCS_PATH/EVM
- Tamagawa encoder - Tamagawa encoder
- AM243x-LP board - AM243x-LP board
- BP-AM2BLDCSERVO - BP-AM2BLDCSERVO, https://www.ti.com/tool/BP-AM2BLDCSERVO
\endcond \endcond

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 51 KiB

View File

@ -66,15 +66,15 @@
#include <position_sense/endat/firmware/endat_master_multi_bin.h> #include <position_sense/endat/firmware/endat_master_multi_bin.h>
#endif #endif
#if (CONFIG_ENDAT0_CHANNEL0) && (CONFIG_ENDAT0_MODE == ENDAT_MODE_MULTI_CHANNEL_MULTI_PRU) #if (CONFIG_ENDAT0_MODE == ENDAT_MODE_MULTI_CHANNEL_MULTI_PRU)
#include <position_sense/endat/firmware/endat_master_multi_RTU_bin.h> #include <position_sense/endat/firmware/endat_master_multi_RTU_bin.h>
#endif #endif
#if (CONFIG_ENDAT0_CHANNEL1) && (CONFIG_ENDAT0_MODE == ENDAT_MODE_MULTI_CHANNEL_MULTI_PRU) #if (CONFIG_ENDAT0_MODE == ENDAT_MODE_MULTI_CHANNEL_MULTI_PRU)
#include <position_sense/endat/firmware/endat_master_multi_PRU_bin.h> #include <position_sense/endat/firmware/endat_master_multi_PRU_bin.h>
#endif #endif
#if (CONFIG_ENDAT0_CHANNEL2) && (CONFIG_ENDAT0_MODE == ENDAT_MODE_MULTI_CHANNEL_MULTI_PRU) #if (CONFIG_ENDAT0_MODE == ENDAT_MODE_MULTI_CHANNEL_MULTI_PRU)
#include <position_sense/endat/firmware/endat_master_multi_TXPRU_bin.h> #include <position_sense/endat/firmware/endat_master_multi_TXPRU_bin.h>
#endif #endif
@ -109,11 +109,11 @@ TaskP_Object gTaskObject;
#define VALID_PERIODIC_CMD(x) ((x) == 200) #define VALID_PERIODIC_CMD(x) ((x) == 200)
#define VALID_HOST_CMD(x) ((x == 100) || ((x) == 101) || ((x) == 102) || ((x) == 103) || ((x) == 104) || ((x) == 105) || \ #define VALID_HOST_CMD(x) ((x == 100) || ((x) == 101) || ((x) == 102) || ((x) == 103) || ((x) == 104) || ((x) == 105) || \
((x) == 106) || ((x) == 107) || ((x) == 108) || ((x) == 109) || ((x) == 110)) ((x) == 106) || ((x) == 107) || ((x) == 108) || ((x) == 109) || ((x) == 110) || ((x) == 111))
#define HAVE_COMMAND_SUPPLEMENT(x) (((x) == 2) || ((x) == 3) || ((x) == 4) || ((x) == 7) || \ #define HAVE_COMMAND_SUPPLEMENT(x) (((x) == 2) || ((x) == 3) || ((x) == 4) || ((x) == 7) || \
((x) == 9) || ((x) == 10) || ((x) == 11) || ((x) == 13) || ((x) == 14) || \ ((x) == 9) || ((x) == 10) || ((x) == 11) || ((x) == 13) || ((x) == 14) || \
((x) == 100) || ((x) == 101) || ((x)== 103) || ((x) == 105) || ((x) == 106) || ((x) == 107) || ((x) == 108) || ((x) == 109)||((x) == 200)) ((x) == 100) || ((x) == 101) || ((x)== 103) || ((x) == 105) || ((x) == 106) || ((x) == 107) || ((x) == 108) || ((x) == 109) || ((x) == 200))
#define ENDAT_INPUT_CLOCK_UART_FREQUENCY 192000000 #define ENDAT_INPUT_CLOCK_UART_FREQUENCY 192000000
/* use uart clock only to start with */ /* use uart clock only to start with */
@ -206,7 +206,7 @@ uint32_t endat_pruss_load_run_fw(struct endat_priv *priv)
#if CONFIG_ENDAT0_MODE == ENDAT_MODE_MULTI_CHANNEL_MULTI_PRU /*enable loadshare mode*/ #if CONFIG_ENDAT0_MODE == ENDAT_MODE_MULTI_CHANNEL_MULTI_PRU /*enable loadshare mode*/
#if(CONFIG_ENDAT0_CHANNEL0)
status = PRUICSS_disableCore(gPruIcssXHandle, PRUICSS_RTUPRUx); status = PRUICSS_disableCore(gPruIcssXHandle, PRUICSS_RTUPRUx);
DebugP_assert(SystemP_SUCCESS == status); DebugP_assert(SystemP_SUCCESS == status);
@ -219,9 +219,6 @@ uint32_t endat_pruss_load_run_fw(struct endat_priv *priv)
status = PRUICSS_enableCore(gPruIcssXHandle, PRUICSS_RTUPRUx); status = PRUICSS_enableCore(gPruIcssXHandle, PRUICSS_RTUPRUx);
DebugP_assert(SystemP_SUCCESS == status); DebugP_assert(SystemP_SUCCESS == status);
#endif
#if(CONFIG_ENDAT0_CHANNEL1)
status=PRUICSS_disableCore(gPruIcssXHandle, PRUICSS_PRUx ); status=PRUICSS_disableCore(gPruIcssXHandle, PRUICSS_PRUx );
DebugP_assert(SystemP_SUCCESS == status); DebugP_assert(SystemP_SUCCESS == status);
@ -234,9 +231,6 @@ uint32_t endat_pruss_load_run_fw(struct endat_priv *priv)
status = PRUICSS_enableCore(gPruIcssXHandle, PRUICSS_PRUx); status = PRUICSS_enableCore(gPruIcssXHandle, PRUICSS_PRUx);
DebugP_assert(SystemP_SUCCESS == status); DebugP_assert(SystemP_SUCCESS == status);
#endif
#if(CONFIG_ENDAT0_CHANNEL2)
status = PRUICSS_disableCore(gPruIcssXHandle, PRUICSS_TXPRUx); status = PRUICSS_disableCore(gPruIcssXHandle, PRUICSS_TXPRUx);
DebugP_assert(SystemP_SUCCESS == status); DebugP_assert(SystemP_SUCCESS == status);
@ -249,7 +243,7 @@ uint32_t endat_pruss_load_run_fw(struct endat_priv *priv)
status = PRUICSS_enableCore(gPruIcssXHandle, PRUICSS_TXPRUx); status = PRUICSS_enableCore(gPruIcssXHandle, PRUICSS_TXPRUx);
DebugP_assert(SystemP_SUCCESS == status); DebugP_assert(SystemP_SUCCESS == status);
#endif
status=endat_wait_initialization(priv, WAIT_5_SECOND, gEndat_multi_ch_mask); status=endat_wait_initialization(priv, WAIT_5_SECOND, gEndat_multi_ch_mask);
@ -358,8 +352,9 @@ static void endat_print_menu(void)
DebugP_log("\r|109: Configure wire delay |\n"); DebugP_log("\r|109: Configure wire delay |\n");
} }
DebugP_log("\r|110: Recovery Time (RT) |\n"); DebugP_log("\r|110: Recovery Time (RT) |\n");
DebugP_log("\r|200: Start periodic continuous mode |\n"); DebugP_log("\r|111: Simulate motor control 2.1 position loop for long time |\n");
DebugP_log("\r|200: Start periodic continuous mode |\n");
DebugP_log("\r|------------------------------------------------------------------------------|\n\r|\n"); DebugP_log("\r|------------------------------------------------------------------------------|\n\r|\n");
DebugP_log("\r| enter value: "); DebugP_log("\r| enter value: ");
@ -861,7 +856,6 @@ static int32_t endat_get_command_supplement(int32_t cmd,
} }
break; break;
case 200: case 200:
if(gEndat_is_load_share_mode) if(gEndat_is_load_share_mode)
@ -1954,6 +1948,79 @@ static void endat_process_host_command(int32_t cmd,
} }
} }
else if(cmd == 111)
{
DebugP_log("\r|press enter to stop the long time continuous mode\n|");
if(endat_loop_task_create() != SystemP_SUCCESS)
{
DebugP_log("\r| ERROR: OS not allowing position loop as related Task creation failed\n|\n|\n");
DebugP_log("\rTask_create() failed!\n");
return;
}
endat_position_loop_status = ENDAT_POSITION_LOOP_START;
uint64_t poaition_read = 0;
/*clear CRC error count */
memset(gEndat_mtrctrl_crc_err, 0, 3);
while(1)
{
if(endat_position_loop_status == ENDAT_POSITION_LOOP_STOP)
{
if(gEndat_is_multi_ch || gEndat_is_load_share_mode)
{
int32_t j;
for(j = 0; j < 3; j++)
{
if(gEndat_multi_ch_mask & 1 << j)
{
DebugP_log("\r -------Channel %u ------\n", j);
DebugP_log("\r position command sent = %u \n", poaition_read);
DebugP_log("\r CRC failures encountered = %u \n", gEndat_mtrctrl_crc_err[j]);
DebugP_log(" ");
DebugP_log("\r");
}
}
}
else
{
DebugP_log("\r position command sent = %u \n", poaition_read);
DebugP_log("\r CRC failures encountered = %u \n", gEndat_mtrctrl_crc_err[0]);
DebugP_log(" ");
DebugP_log("\r");
}
return;
}
else
{
poaition_read++;
if(gEndat_is_multi_ch || gEndat_is_load_share_mode)
{
int32_t j;
for(j = 0; j < 3; j++)
{
if(gEndat_multi_ch_mask & 1 << j)
{
endat_multi_channel_set_cur(priv, j);
endat_process_position_command(j);
}
}
}
else
{
endat_process_position_command(0);
}
/* increase sleep value if glitches in display to be prevented (and would result in slower position display freq) */
ClockP_usleep(500);
}
}
}
else else
{ {
DebugP_log("\r| ERROR: non host command being requested to be handled as host command\n|\n|\n"); DebugP_log("\r| ERROR: non host command being requested to be handled as host command\n|\n|\n");

View File

@ -1943,6 +1943,25 @@ uint8_t endat_multi_channel_detected(struct endat_priv *priv)
void endat_multi_channel_set_cur(struct endat_priv *priv, int32_t ch) void endat_multi_channel_set_cur(struct endat_priv *priv, int32_t ch)
{ {
priv->channel = ch; priv->channel = ch;
if(priv->load_share)
{
if(priv->channel == 0)
{
priv->pos_res = priv->pos_rx_bits_21_RTUPRU - (ENDAT_NUM_BITS_POSITION_CRC + ENDAT_NUM_BITS_F1);
}
else if(priv->channel == 1)
{
priv->pos_res = priv->pos_rx_bits_21_PRU - (ENDAT_NUM_BITS_POSITION_CRC + ENDAT_NUM_BITS_F1);
}
else
{
priv->pos_res = priv->pos_rx_bits_21_TXPRU - (ENDAT_NUM_BITS_POSITION_CRC + ENDAT_NUM_BITS_F1);
}
}
else
{
priv->pos_res = priv->pos_rx_bits_21_RTUPRU - (ENDAT_NUM_BITS_POSITION_CRC + ENDAT_NUM_BITS_F1);
}
} }
int32_t endat_wait_initialization(struct endat_priv *priv, uint32_t timeout, uint8_t mask) int32_t endat_wait_initialization(struct endat_priv *priv, uint32_t timeout, uint8_t mask)