This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
I am trying to use the T_format interface, but the following points seem to be wrong. 1.
The controlField changes depending on the axis position of the encoder.
2. statusField also changes according to the encoder axis position.
3. crc error occurs.
4. rdata[0]=rdata[8] is always set.
Please tell me what is wrong.
Hello,
Here are some debug steps. Some reference the BOOSTXL_POSMGR but still apply to the IDDK.
An additional note:
When I've observed CRC errors it is usually due to the t-format encoder not receiving good power. Try powering it directly instead of through the IDDK board.
Hello.
The power supply is coming from an external source, 130mA flowing during operation. The voltage is stable. I have a question about the tformat_getBits function, it looks like it is cutting a 16-bit word into 10 bits every 10 bits like a continuous bit sequence and turning it into 8 It looks like it is turning it into 8 bits.
The encoder sends a total of 10 bits each, along with the start and stop bits.
Q1. Why don't you set the SPI data length to 10 bits?
Q2.The Tformat encoder is LSB-first, but the SPI is MSP-first, so there is reason to switch MSB and LSB.
Q3. Why do you cut out the 13th bit?
The following table shows the parameters of the tformat_getBits function when it is called and the values of the local variables when it is executed.
The reason for the extraction from the 13th bit is only a prediction, but due to hardware timing conflicts, the 3-pit unrelated bit was received, which caused the extraction from the 13th bit. I imagine it's because if the length of 10 bits is specified, all the bitches after that will be out of position. In other words, the hardware is imperfect, and the current bit extraction is weird to cover for it. In this case, I think it is unstable how many bits it starts from.
It seems that SPI's SPISTE is always active, but if we activate it 3μseconds after the end of transmission, we can reduce the data length to 10 bits without receiving spurious data. I think this will stabilize the reception.
Hello.
I have a related question, right now I'm thinking of activating the SPISTE signal with a 3μsec delay after transmission.
As the .vcd file is not created as shown on page 15 of SPRUI8A, how can I set up the post build procedure, please let me know. Also, please tell me where the GTKViewer should be.
Thank you very much for your help.
Hello,
I am looking into your additional questions and will reply back by end of Tuesday in the US.
Regards
Lori
0 bits every 10 bits like a continuous bit sequence and turning it into 8 It looks like it is turning it into 8 bits
Per the t-format specification from Tamagawa, the fields within a transmission frame are each 10-bits including a fixed start-bit (0) and delimiter-bit (1). The 8-bits remaining (minus the start/delimiter is the information within that field.
Q1. Why don't you set the SPI data length to 10 bits?
Q2.The Tformat encoder is LSB-first, but the SPI is MSP-first, so there is reason to switch MSB and LSB.
Q3. Why do you cut out the 13th bit?
You could try changing the SPI data length to 10 bits as an optimization. The sendClks may need to be adjusted in order for the alignment to be what you want.
The 13th bit is the START bit which is always 0.
Because the SPI is always receiving, it will receive a '1' during sendClks. In the case of, for example DATAID2, sendClks is 18 clocks --> 16 (word 0) + 2 (word 1 bit 15, bit 14), so the ControlField starts in bit 13 of word 1.
The 14 & 15th bits are part of sendClks. The SPI will RX will receive 1's during the transmission of the command since SPISTE is enabled. The controlField starts in bit 13 with the START bit which is always 0.
Refer to the function PM_tformat_setupCommand() for the number of sendClks for each command.
The simulation is for the CLB logic only. Unfortunately it will not show how the interaction with the SPI or the CPU. For this reason I'm not sure it will show you want you are looking for.
Section 2.1 (page 4) of www.ti.com/lit/SPRUIR8 explains how to install the viewer and required simulation tools.
Note: The CLB only clocks the SPI for it to send and receive information. It does not modify any of the information sent or received.
Thank you very much for your answer.
I was able to create the .vcd file successfully using CCSStudio 10.2.
Now I will try to adjust the timing of my spiste...