TIDUE74F April 2018 – March 2026
The PM T-Format application programming interface (API) enables the C28x to communicate with T-Format encoders. For a detailed description of the API, refer to the: C2000 T-Format Encoder Interface Software Guide (html, pdf).
The software guide documents:
Table 2-16 provides a high-level overview of the API.
| API Function Type | DESCRIPTION |
|---|---|
| Run-time Functions | |
| Command Setup | Set up the SPI and CLB for a given request to be transmitted and response received. Support is provided for all T-Format commands: readout, reset and EEPROM commands |
| Start Operation | This function starts the CLB state machine transition to TRANSMIT_DATA. This initiates the transfer of the request. |
| Receive Data | Request-specific functions for unpacking and populating the T-Format data structure with the data received from the encoder. |
| Update Encoder Parameters | Functions to update the position, turns or encoder ID based on the data received from the encoder. |
| Initialization Functions | |
| Setup Peripheral | Setup for SPI, CLB, and other interconnect XBARs for T-Format are performed with this function during system initialization. This function must be called after every system reset. No T-Format transactions is performed until the setup peripheral function is called. |
| Generate CRC Table | Only required if the C28x calculates the CRC using a look-up table. Generates a table of 256 entries for a given CRC polynomial (polynomial) with a specified number of bits (nBits). |
| Set Frequency | Scales the CLB_SPI_CLK to match the T-Format frequency. The scaling is dependent on the CLB clock. |