Specifications
October 25, 2006 Cypress Semiconductor – Rev. ** 21
LIN Bus 2.0 Reference Design 3. Master Design IP
A. Checksum Type: This entry defines the checksum type
used for the particular frame. There are two types of
checksums, CSUM_CLASSIC and CSUM_EXTENDED.
CSUM_CLASSIC is used for frames that belong to LIN
slaves of version 1.3 or less and for diagnostic frames.
CSUM_EXTENDED is used for LIN 2.0 slaves.
B. Data Count: This entry indicates the length of data car-
ried by the frame. For LIN1.x slaves, this parameter is
left as zero. When the l_sch_tick function finds that the
data count is zero, it calculates the standard length for
the frame from the protected ID.
C. Buffer Pointer: This entry is the pointer to the buffer for
this frame that is reserved in RAM. Enter the name of the
buffer in this entry. The compiler will translate this to the
RAM address and create the table.
D. Data Direction: This entry indicates the direction of data
flow. MASTER_TO_SLAVE indicates that the slave must
receive data from master and SLAVE_TO_MASTER
indicates that the slave must transmit a response to the
master. SLAVE_TO_SLAVE indicates that the data flow
is from one slave to another. In this type of transaction,
the master’s job is only to generate the header of the
frame.
E. Protected ID: This entry is for the protected ID for the
particular frame.
In addition to these user-defined frames, there are some
frames used by the master for diagnostics. They are the
master request and slave response frames. For both these
frames, the data count is eight, the checksum type is
extended, and the response buffer is abDiagBuffer.
_Frame1:
db 8 ;Data Count
Frame1:
db CSUM_EXTENDED ; Checksum Type
db 0 ; Data count
db BufferFrame1 ; Buffer address
db MASTER_TO_SLAVE ; Direction
db 0xF0 ; ID
_Frame2:
Frame2:
db CSUM_EXTENDED ; Checksum Type
db 2 ; Data count
db BufferFrame2 ; Buffer address
db SLAVE_TO_MASTER ; Direction
db 0x9C ; ID
_Frame3:
Frame3:
db CSUM_EXTENDED ; Checksum Type
db 1 ; Data count
db BufferFrame3 ; Buffer address
db SLAVE_TO_MASTER ; Direction
db 0x32 ; ID
_Frame4:
Frame4:
db CSUM_EXTENDED ; Checksum Type
db 2 ; Data count
db BufferFrame4 ; Buffer address
db SLAVE_TO_MASTER ; Direction
db 0x80 ; ID