AN2103 Freescale Semiconductor / Motorola, AN2103 Datasheet - Page 17

no-image

AN2103

Manufacturer Part Number
AN2103
Description
Local Interconnect Network (LIN) Demonstration
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
AN2103
MOTOROLA
4.1.2.5
LIN_MsgStatus:
4.2 Master code
implementation
PortCAN
Syntax:
Applicable:
Parameters: MsgId – Message identifier
Return:
CANTx
CANRxISR
CANRx
Message
Handler
CAN
Message
CAN
Data
msCAN
Buffer
Message
unsigned char LIN_MsgStatus (unsigned char MsgId);
Master, Slave
LIN_NO_ID, LIN_OK, LIN_MSG_NOCHANGE and
LIN_MSG_NODATA
CAN
Data
Freescale Semiconductor, Inc.
The LIN_MsgStatus service returns the current status of the
specified message buffer.
The master software has 2 main tasks that schedule LIN messages
and provide a CAN to LIN gateway. The scheduler operates from a
periodic tick, driven from Timer B overflow, and transmits a header
frame every150ms. The gateway function is driven from the CANRx
interrupt and either changes the demo mode or transmits a LIN
message to a specific slave node.
diagram of the master software.
Figure 6 Master Data flow Diagram
For More Information On This Product,
Transmit
RequestMsg
CAN
Demo
Mode
Go to: www.freescale.com
PortD
Port
Data
CANTX
Data
Tramsmit
CANMsg
Global Data
Buffer
Write
Data
Demo
Mode
GetMsg
Figure 6
Read
Data
Schedule
PutMsg
Msg
shows the data flow
Drivers
RequestMSG
Master code implementation
LIN
150ms
Software Description
SCITx
SCIRx
TOF ISR
Port
SCI
17

Related parts for AN2103