CY3220LINBUS-RD Cypress Semiconductor Corp, CY3220LINBUS-RD Datasheet - Page 39

KIT REF DESIGN LIN BUS

CY3220LINBUS-RD

Manufacturer Part Number
CY3220LINBUS-RD
Description
KIT REF DESIGN LIN BUS
Manufacturer
Cypress Semiconductor Corp
Series
PSoC®r
Datasheet

Specifications of CY3220LINBUS-RD

Main Purpose
Interface, LIN
Embedded
Yes, MCU, 8-Bit
Utilized Ic / Part
CY8C27143, CY8C27443
Processor To Be Evaluated
CY8C27143-24PXI and CY8C27443-24PXI
Interface Type
RS-232
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Contains lead / RoHS non-compliant
Other names
428-1926
LIN Bus 2.0 Reference Design
4.6.6
You now define the frames. There are two tables in this file.
One is the MESSAGE_ID_TABLE and the other is the
ID_TABLE. Type the message ID list in the MESSAGE_ID
table. Type these three messages in sequence:
MESSAGE_ID_TABLE:
dw 0x1001
dw 0x1002
dw 0x1003
After updating the MESSAGE_ID_TABLE, open the NodeIn-
formation.inc file and update the MESSAGE_COUNT con-
stant with the number of entries in the MESSAGE_ID table.
You must type the frame details in the same sequence in the
ID_TABLE. There are four entries for each frame in the
ID_TABLE.
Protected ID: This entry is for the protected ID for the partic-
ular frame. In LIN 2.0 slaves, the protected ID is allocated by
the master during node configuration. So when creating the
project, this should be left as 0xFF.
Data Direction: This entry indicates the direction of the data
flow. MASTER_TO_SLAVE indicates that the slave has to
receive data from the master and SLAVE_TO_MASTER
indicates that the slave has to transmit a response to the
master. This entry also is used to indicate if the frame is
event triggered. In case of event-triggered frames, the entry
is SLAVE_TO_MASTER | EVENT_TRIGGERED. This indi-
cates that the data direction is from slave to master and the
frame is also an event-triggered frame.
Buffer Pointer: This entry is the pointer to the buffer for this
frame that is reserved in RAM. Just enter the name of the
buffer allocated for that frame in this entry. The compiler will
translate this to the RAM address and create the table.
Data Count: This entry indicates the length of data carried
by this frame.
The ID_TABLE for this example is listed here:
ID_TABLE:
_Frame1:
_Frame2:
_Frame3:
October 25, 2006
Frame1:
Frame2:
Frame3:
db
db
db
db
db
db
db
db
db
db
Frame Definition
0xFF
MASTER_TO_SLAVE
BufferFrame1
8
0xFF
SLAVE_TO_MASTER
BufferFrame2
2
0xFF
SLAVE_TO_MASTER
Cypress Semiconductor – Rev. **
You fill the remaining records of the ID table with 0xFF. The
ID table holds 16 records. In our example, three of them are
filled. So fill the remaining 13 records with four entries of
0xFF.
4.6.7
You now define the response error bit mask. The mask is
defined according to the bit number that carries the
response error bit. In the example, bit 7 carries the response
error bit. So the mask is 0x80. This mask is defined in both
the Lin20Slave.inc and Lin20Slave.h files. Using this feature
is explained ahead in
page
4.6.8
The details of the node are configured in the NodeInforma-
tion.inc file. Modify the constants for the supplier ID, function
ID, variant and the node serial number according to the
node’s specifications. For example, review the Node CPM in
section 5,
The Manufacturer’s ID is 0x1234
The Function ID is 0x2345
The Variant is 0x00
The corresponding constants for these parameters in
NodeInformation.inc is:
SUPPLIER_ID_MSB: equ
Id MSB
SUPPLIER_ID_LSB: equ
Id LSB
FUNCTION_ID_MSB: equ
FUNCTION_ID_LSB: equ
VARIANT:
Then modify the serial number constants to match the 4-
byte serial number of the node. For a serial number of
0xAA597142, the constants for the serial number are:
SERIAL3:
Number
SERIAL2:
SERIAL1:
SERIAL0:
Number
Also modify the message count parameter with the number
of messages supported by the slave. As described in the
LDF, the node CPM supports three frames, so the constant
for the message count is:
MESSAGE_COUNT:
messages supported by the Node
4.6.9
Now the LIN 2.0 slave node is configured and you can add
the main application. Follow the normal procedure of build-
db
db
db
37.
Example Project for Slave 1 (CPM) on page
Response_Error Bit Definition
Node Information
Adding the Main Application
BufferFrame3
1
0xFF, 0xFF, 0xFF, 0xFF
equ
Adding the Main Application on
equ
equ
equ
equ
equ
0x12; Manufacturer's
0x34; Manufacturer's
0x23; Product Id MSB
0x45; Product Id LSB
0x00; Variant
0xAA; MSB of Serial
0x59
0x71
0x42; LSB of Serial
0x03; Number of
4. Slave Design IP
52.
37

Related parts for CY3220LINBUS-RD