AMIS-30621 LIN Micro-stepping Motor Driver
Data Sheet
15.6.1. Writing Frames
A writing frame is sent by the LIN master to send commands and/or information to the slave nodes. According to the LIN specification,
identifiers are to be used to determine a specific action. If a physical addressing is needed then some bits of the data field can be
dedicated to this, as illustrated in the example below.
Identifier byte
ID0 ID1 ID2 ID3 ID4 ID5 ID6 ID7
Data byte 1
phys. address
Data byte 2
command parameters (e.g. position)
Another possibility is to determine the specific action within the data field in order to use less identifiers. One can, for example, use the
reserved identifier 0x3C and take advantage of the 8 byte data field to provide a physical address, a command and the needed
parameters for the action, as illustrated in the example below.
ID
Data1
Data2
Data3
Data4
Data5
Data6
Data7
Data8
0x3C 00
1
physical
address
AppCmd
command
parameters
Note:
Bit 7 of byte Data1 must be at ‘1’ since the LIN specification requires that contents from 0x00 to 0x7F must be reserved for broadcast messages (0x00 being for the “Sleep”
message). See also LIN command Sleep.
The writing frames used with the AMIS-30621 are the following:
• Type #1: General-purpose 2 or 4 data bytes writing frame with a dynamically assigned identifier. This type is dedicated to
short writing actions when the bus load can be an issue. They are used to provide direct command to one (Broad =
‘1’) or all the slave nodes (Broad = ‘0’). If Broad = ‘1’, the physical address of the slave node is provided by the 7
remaining bits of DATA2. DATA1 will contain the command code (see Dynamic assignment of Identifiers), while, if
present DATA3 to DATA4 will contain the command parameters, as shown below.
ID
Data1
command
Data2
Physical address
Data3…
parameters…
ID0 ID1 ID2 ID3 ID4 ID5 ID6 ID7
Broad
• Type #2: 2, 4 or 8 data bytes writing frame with an identifier dynamically assigned to an application command, regardless of
the physical address of the circuit.
• Type #3: 2 data bytes writing frame with an identifier dynamically assigned to a particular slave node together with an
application command. This type of frame requires that there are as many dynamically assigned identifiers as there
are AMIS-30621 circuits using this command connected to the LIN bus.
• Type #4: 8 data bytes writing frame with 0x3C identifier.
15.6.2. Reading Frames
A reading frame uses an in-frame response mechanism. That is the master initiates the frame (synchronization field + identifier field),
and one slave sends back the data field together with the check field. Hence, two types of identifiers can be used for a reading frame:
• Direct ID, which points at a particular slave node, indicating at the same time which kind of information is awaited from this slave
node, thus triggering a specific command. This ID provides the fastest access to a read command but is forbidden for any other
action.
• Indirect ID, which only specifies a reading command, the physical address of the slave node that must answer having been passed in
a previous writing frame, called a preparing frame. Indirect ID gives more flexibility than a direct one, but provides a slower access to
a read command.
Notes:
(1) A reading frame with indirect ID must always be consecutive to a preparing frame. It will otherwise not be taken into account.
(2) A reading frame will always return the physical address of the answering slave node in order to ensure robustness in the communication.
The reading frames used with the AMIS-30621 are the following:
• Type #5: 2, 4 or 8 data bytes reading frame with a direct identifier dynamically assigned to a particular slave node together
with an application command. A preparing frame is not needed.
• Type #6: 8 data bytes reading frame with 0x3D identifier. This is intrinsically an indirect type, needing therefore a preparation
frame. It has the advantage to use a reserved identifier.
AMI Semiconductor – Sept. 2007, Rev 1.5
38
www.amis.com