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

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
3. Master Design IP
C. RestartLin: This function restores the processor to the
3.6.13.2
Some functions are provided in the NodeConfigUtilities.c file
for carrying out node configuration.
A. ConfigureNode: Use this function to assign a frame ID
B. ReadByIdentifier0: Use this function to read the node
C. ReadByIdentifier1: Use this function to read the serial
The details of the read by ID request are found in the Node
Configuration section of the LIN 2.0 specifications.
3.6.13.3
Sporadic frames are frames that carry a signal only if an
updated signal is available. It is possible to associate more
than one frame to the same sporadic frame slot. And if more
than one frame has an updated signal, the frame having the
highest priority is transmitted in that time slot. If none of the
frames has an updated signal, then the frame remains
silent. The time for this silent frame can be set by modifying
the DEFAULT_FRAME_TIME constant in the Signal-
Table.inc file.
Up to eight sporadic frames are supported in this design.
There is a queue variable called l_sporadic_frame_queue
which controls eight sporadic frames. Each bit of the vari-
able corresponds to one sporadic frame. If a bit is set, then it
means that the sporadic frame corresponding to that bit has
an updated signal. The setting of bits must be done by the
main program. If more than one bit is set, then the frame
24
from this function. If the dominant state is less than 250
µS or if the state does not become recessive for more
than 5 ms, the processor is put to sleep again. The pro-
cessor can be configured to wake up on some other
interrupt if the master must wake up on its own to com-
plete some other task. For example, if the master must
wake up upon a sleep interrupt and perform some oper-
ation, add code for this also inside the function. In this
situation, the interrupt upon which the master must wake
up also must be enabled inside the ShutDownLin func-
tion.
original configuration and restarts the LIN core. It has a
marked area where the user can add code to start the
resources required for the main application.
to a desired node. This function sends the master
request frame with the proper parameters, sends the
slave response frame, analyzes the slave’s response,
and returns the status.
information of any desired slave. This function transmits
the master request frame with the ReadById command
with ID=0, sends the slave response frame and returns
the node information such as function ID, supplier ID,
and variant in variables whose pointers are passed to
this function.
number of the desired slave. This function transmits the
master request frame with the ReadById command with
ID=1, sends the slave response frame, and returns the
node serial number in the variable whose pointer is
passed to this function.
Implementation of Sporadic Frames
Node Configuration
Cypress Semiconductor – Rev. **
corresponding to the least significant of these bits is pro-
cessed first. That is, the frame corresponding to bit 0 has
the highest priority and the frame corresponding to bit 7 has
the lowest priority. When the frame has been transmitted,
the corresponding queue bit is cleared by the LIN physical
layer.
Follow these steps to construct a sporadic frame.
1. Add the name of the Sporadic Frame table in the Sched-
2. Construct a Sporadic Frame table with all the frames to
SporadicFrames:
dw Frame5, 15
dw Frame7, 15
dw Frame6, 15
dw 0xFFFF
In that example, Frame5 has highest priority followed by
Frame7, then Frame6. Add this Sporadic Frame table to the
Schedule table with time frame constant as 0.
_Schedule1:
dw SporadicFrames,0
dw Frame1, 20
dw Frame3, 10
dw Frame2, 10
dw Frame4, 10
dw 0xFFFF
Now, in the main function, whenever the signal correspond-
ing to any of the sporadic frames is updated, set the bit cor-
responding to the frame in the queue variable. The frame
with the highest priority uses bit 0 and the frame with the
lowest priority uses bit 7 of the queue byte. In the example,
Frame5 uses bit 0 and Frame6 uses bit 1 of the
l_sporadic_frame_queue variable.
if (Frame5 signal updated)
{
Frame5 buffer with the signal
0x01;
}
if (Frame7 signal updated)
{
Frame5 buffer with the signal
0x02;
}
if (Frame6 signal updated)
{
Schedule1:
ule table. Type 0 as the frame time constant. When the
l_sch_tick function comes across a frame time constant
with 0, it assumes that this is a sporadic frame and pro-
cesses the Sporadic Frame table.
be included in the frame.
Here is an example. Say Frame5, Frame6 and Frame7
are sporadic frames. Create a Sporadic Frame table with
these frame names and their associated frame time con-
stant. Type the frame with the highest priority first.
// Code to update the
l_sporadic_frame_queue |=
// Code to update the
l_sporadic_frame_queue |=
LIN Bus 2.0 Reference Design
October 25, 2006

Related parts for CY3220LINBUS-RD