SPRADK7 March 2026 TMS320F280039C
This interface solution is tested on a Nikon A-Format encoder. The test setup includes the hardware below:
The physical photo of the test setup are shown in Figure 3-1.
Figure 3-1 Validation SetupThe objective of this test setup is to verify that the A-Format frames can be correctly sent and received by the C2000 controllers. The goal of the test is to acquire an encoder response that can pass the CRC check. Note that the encoder’s angular precision (mechanical performance) is beyond the scope of this verification, and therefore the encoder is not installed on an actual motor.
To achieve the desired test goal, the command frame CDF0 is chosen for the test. This command frames requests the encoder to return full 40-bit of the position data. The test program would first encode the CDF0 command and fill the SPI buffer, issue a CLB start signal to send the command, and verify the CRC of the response. The result is displayed as variables using the CCS expression window.
First, the SPI receive buffer data (raw 9-bit entries) is compared with the oscilloscope waveform (captured on the POCI pin), shown in Figure 3-2. The SPI buffer starts with three words of dummy data, each word is 9-bit, as described above. The dummy data is followed by the encoder response, which includes 8 words, each word is 9-bit, with valid data stored in the least significant bits (LSB) of each 9-bit entry. The buffer is aligned with the waveform on the right. This comparison shows that the SPI and CLB had been setup correctly to transfer and receive A-Format frames.
Figure 3-2 RX FIFO Data and WaveformNext, the decoded data is further checked in Figure 3-2.
For demonstration purposes, the CRC is verified by combining the received CRC and calculated CRC into one 32-bit variable and displaying the variable in the CCS’s expression window. This will ensure the CCS sample the CRC variable in one communication cycle. As the result, Figure 3-3 shows a screen shot of CSS expression window, in which one can see the raw data of the received frame, the decoded frame, and that the received CRC is aligned with the calculated one
In the meantime, the behavior of the angle and multi-turn data decoded from the response is verified by spinning the encoder manually and observing the changes in the decoded angular position and multi-turn data (consistent with manual encoder rotation).
Figure 3-3 Full Decode Encoder Response Data