AN2103 Freescale Semiconductor / Motorola, AN2103 Datasheet - Page 44

no-image

AN2103

Manufacturer Part Number
AN2103
Description
Local Interconnect Network (LIN) Demonstration
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
44
Application Note
while(1)
{
}
}
/******************************************************************************
Function Name
Engineer
Date
Parameters
Returns
Notes
******************************************************************************/
void ScheduleTableInit (void)
{
SystemFlags.bit.loopcontrol=1;
/* Main Loop */
/* Local variables */
tU08 i;
tU08 msgTempBuffer[] = {0x00, 0x00};
/* LIN Schedule table Initialisation */
for (i=0 ; i<12 ; i++)
{
}
/* Check nodes on Bus */
for (i=1 ; i<13 ; i++)
{
/* Wait for timer interrupt or CAN receive message */
while ((SystemFlags.bit.loopcontrol==1) && (SystemFlags.bit.msgrxd==0))
else
}
}
;
if ((SystemFlags.bit.loopcontrol==0) && (SystemFlags.bit.msgrxd==0))
{
SystemFlags.bit.loopcontrol = 1;
{
CanMsgIndex = (AZ60_MSCAN08.rxbuf.dsr[0] & 0x0F);
MsgHandlerTable[CanMsgIndex]();
// end of while (1)
/* Clear all elements in Slave table array*/
CurrentSlaveStatus [i].Byte0 = NO_NODE;
CurrentSlaveStatus [i].Byte1 = NO_NODE;
while (LIN_RequestMsg(SlaveMsg[i].ReadMsg) != LIN_OK)
TimeoutCount = 0x00;
SystemFlags.bit.linmsgtimeout=0;
ScheduleMsg();
SystemFlags.bit.msgrxd = 0;
// end of main
;
:
:
:
:
:
:
ScheduleTableInit
R29414
09/02/2000
none
none
Initialise the schedule table. It identifies the slave
on the LIN bus
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
// Initialise loop control
// Timer interrupt
// Schedule another message
// Set up for next loop iteration
// CAN message received
// Jump to message handler table
// Set up for next CAN message
// Index counter
// Initialise temp buffer
// NO_NODE = 0x00
// Nodes 1 to 12
// Initialise Timeout count
// Initialise timeout flag
// Transmit LIN header
MOTOROLA
AN2103

Related parts for AN2103