Datasheet

TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 22
www.trinamic.com
5.1.2 Read Access
TMC5062 UART READ ACCESS REQUEST DATAGRAM STRUCTURE
each byte is LSB…MSB, highest byte transmitted first
synchronization
RW + 7 bit register
address
CRC
0...7
8...15
16...23
1
0
1
0
0
0
0
0
register address
0
crc
0
1
2
3
4
5
6
7
8
15
16
23
The read access request datagram structure is identical to the write access datagram structure, but
uses a lower number of user bits. Its function is the addressing of the desired register for the read
access. The TMC5062 responds with the same baud rate as the master uses for the read request.
In order to ensure a clean bus transition from the master to the slave, the TMC5062 does not
immediately send the reply to a read access, but it uses a programmable delay time after which the
first reply byte becomes sent following a read request. This delay time can be set in multiples of
eight bit times using SENDDELAY time setting (default=8 bit times) according to the needs of the
master.
TMC5062 UART READ ACCESS REPLY DATAGRAM STRUCTURE
each byte is LSB…MSB, highest byte transmitted first
0 ... ... 55
synchronization
R + 7 bit register
address
32 bit read data
CRC
0…7
8…15
16…47
48…55
1
0
1
0
1
1
1
1
register
0
data bytes 3, 2, 1, 0 (high byte to low byte)
crc
0
1
2
3
4
5
6
7
8
15
16
47
48
55
The read response is sent to the master. The transmitter becomes switched inactive four bit times
after the last bit is sent.
ERRATA IN READ ACCESS
A known bug in the UART interface implementation affects read access to registers that change during
the access. While the SPI interface takes a snapshot of the read register before transmission, the UART
interface transfers the register directly MSB to LSB without taking a snapshot. This may lead to
inconsistent data when reading out a register that changes during the transmission. Further, the CRC
sent from the driver may be incorrect in this case (but must not), which will lead to the master
repeating the read access. As a workaround, it is advised not to read out quickly changing registers
like XACTUAL, MSCNT or X_ENC during a motion, but instead first stop the motor or check the
position_reached flag to become active, and read out these values afterwards. If possible, use
X_LATCH and ENC_LATCH for a safe readout during motion (e.g. for homing). As the encoder cannot be
guaranteed to stand still during motor stop, only a dual read access and check for identical result
ensures correct X_ENC read data. Therefore it is advised to use the latching function instead. Use the
vzero and velocity_reached flag rather than reading VACTUAL.