Trinamic 11-0011 TMCM-171 BLDC Output For 3-phase BLDC Motors 11-0011 数据表

产品代码
11-0011
下载
页码 134
 
TMCL Reference Manual 
39 
 
 
 
Trinamic Motion Control GmbH & Co KG 
Sternstraße 67 
D – 20357 Hamburg, Germany 
http://www.trinamic.com 
 
3.24  SAC – SPI Bus Access 
Description:  Allows access to external SPI devices connected to the SPI bus of the module. Connection of external 
SPI devices differs between the different module types. Please contact TRINAMIC for further details and see also 
the hardware manual of your module. 
 
Related commands: SIO, GIO 
 
Mnemonic: SAC <bus number>, <number of bytes>, <send data> 
 
Binary representation: 
INSTRUCTION NO. 
TYPE 
MOT/BANK 
VALUE 
29 
<bus number> 
<number of bytes> 
        <send data> 
 
Reply in direct mode
STATUS 
VALUE 
100 – Success 
<received data> 
 
In version 3.23 of TMCL this command has been extended so that not only direct values but also the contents of 
the  accumulator  register  can  be  sent.  In  stand-alone  mode  the  received  data  is  also  stored  in  the  accumulator. 
Most  modules  have  three  chip  select  outputs  (SPI_SEL0,  SPI_SEL1,  SPI_SEL2).  The  “type”  parameter  (bus  number) 
determines the chip select output that is to be used. The “motor/bank” parameter determines the number of bytes 
to be sent (1, 2, 3, or 4). The “value” parameter contains the data to be sent. When bit 7 of the bus number is set, 
this value is ignored and the contents of the accumulator is sent instead. But please  note that in the TMCL IDE 
always all three values have to be specified (when sending the contents of the accumulator the “value” parameter 
is a dummy parameter). The bus numbers are as follows (please note the gap in the bus numbers; do not use 1 or 
129!): 
 
Bus number 
Chip select output 
SPI_SEL0, output direct value 
Do not use 
SPI_SEL1, output direct value 
SPI_SEL2, output direct value 
128 
SPI_SEL0, output contents of accumulator 
129 
Do not use 
130 
SPI_SLE1, output contents of accumulator 
131 
SPI_SEL2, output contents of accumulator