Datasheet
TMC4361A Datasheet | Document Revision 1.22 • 2017-JAN-12
157/230
© 2015 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany — Terms of delivery and rights
to technical change reserved. Download newest version at: www.trinamic.com .
Read entire documentation; especially the “Supplemental Directives” on page 224.
MAIN MANUAL
SPI Encoder Configuration via TMC4361A
Connected SPI encoder can be configured via TMC4361A., which renders a connection between
microcontroller and encoder unnecessary.
A configuration request is sent using the settings of
SERIAL_ADDR_BITS
and
SERIAL_DATA_BITS,
which define the transferring bit numbers.
In order to prepare SPI encoder configuration procedures, do as follows:
Action:
Set
SERIAL_ADDR_BITS
(
ENC_IN_DATA
register 0x08) to the number of address
bits of any SPI encoder configuration datagram.
Set
SERIAL_DATA_BITS
(
ENC_IN_DATA
register 0x08) to the number of data bits
of any SPI encoder configuration datagram.
Result:
In case configuration data is transferred to the SPI encoder,
SERIAL_ADDR_BITS
bits
and
SERIAL_DATA_BITS
bits are sent in two SPI configuration datagrams; exactly in
this order.
Because encoder data requests occur as an endless stream, it is necessary to interrupt
data requests when a configuration request occurs. Consequently, a handshake
behavior is implemented.
In order to transfer configuration data to the SPI encoder, do as follows:
Action:
Set
DATA_TO_ENC
register 0x69 to any value.
Set
ADDR_TO_ENC
register 0x68 to the configuration address of the SPI encoder.
Set
DATA_TO_ENC
register 0x69 to the configuration data of the SPI encoder.
Result:
The first
DATA_TO_ENC
access stops the repetitive encoder data request.
After the second
DATA_TO_ENC
access, three datagrams are sent to SPI encoder:
1. One address datagram is transmitted, which contains the
ADDR_TO_ENC
value.
Data that is received simultaneously with the request is not stored.
2. One data datagram is transmitted that contains the
DATA_TO_ENC
value. Data
that is received simultaneously with the request is stored in
ADDR_FROM_ENC
register 0x6A because this is the response of the
ADDR_TO_ENC
request.
3. One no-operation datagram (NOP) is transmitted. Data that is received
simultaneously with the request is stored in
DATA_FROM_ENC
register 0x6B
because this is the response of the
DATA_TO_ENC
request.
In order to finalize the configuration procedure and continue with the
encoder data requests, do as follows:
Read out
ADDR_FROM_ENC
register 0x6A first.
Set
ADDR_TO_ENC
register 0x68 to the specified SPI encoder address that
contains angle data.
Obligatory at finalization: Read out
DATA_FROM_ENC
register 0x6B.
Result:
The configuration request data is read out. After
DATA_FROM_ENC
register readout,
the encoder data request stream of angle data continues.
SPI Encoder
Configuration
Communication
Process