SPRACM9B June 2019 – November 2020 TMS320F28384D , TMS320F28384S , TMS320F28386D , TMS320F28386S , TMS320F28388D , TMS320F28388S , TMS320F28P650DH , TMS320F28P650DK , TMS320F28P650SH , TMS320F28P650SK , TMS320F28P659DH-Q1 , TMS320F28P659DK-Q1 , TMS320F28P659SH-Q1
TI provides a software library and its source code to interface to T-format encoders, which is based off Configurable Logic Blocks (CLB) in the device. An user guide to help with the CLB tool, and application reports to help with Designing With The C2000 Configurable Logic Block and How to Migrate Custom Logic From an FPGA/CPLD to C2000 Microcontrollers are available online. They are also available in C2000ware (release 2_00_00_03 or later) at the following location
c:\ti\c2000\C2000Ware_<version>\utilities\clb_tool\clb_syscfg\doc
In the implementation of T-format interface, communication is achieved primarily by the integration of following components:
While SPI performs the encoder data transmit and receive functions, clock generation is controlled by CLB. The following functions are implemented inside the CLB module. Note that the CLB module can only be accessed via library functions provided in the PM tfomat Library and not otherwise configurable by users.
Position information is received through SPI and is read through the SPI receive ISR spiRxFIFOISR() using readTformatEncPosition().
Detailed information about the T-format implementation on a launch pad platform is available at c:\ti\c2000\C2000Ware_MotorControl_SDK_2_01_00_00\libraries\position_sensing\tformat\Docs
The launch pad uses different GPIOs for T-format encoder interface as compared to IDDK. But for that, the core implementation is same. The list of GPIOs used on IDDK platform for cross reference are listed below:
#define ENCODER_SPI_BASE SPIB_BASE
#define ENC_CLK_PWM_PIN 7
#define ENC_SPI_SIMO_PIN 24
#define ENC_SPI_SOMI_PIN 25
#define ENC_SPI_CLK_PIN 26
#define ENC_SPI_STE_PIN 27
#define ENC_TXEN_PIN 34
#define ENC_PWREN_PIN 32