AN2103 Freescale Semiconductor / Motorola, AN2103 Datasheet - Page 61

no-image

AN2103

Manufacturer Part Number
AN2103
Description
Local Interconnect Network (LIN) Demonstration
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
AN2103
MOTOROLA
/******************************************************************************
Task Name
Engineer
Date
Parameters
Returns
Notes
******************************************************************************/
void LINInitialise(void)
/******************************************************************************
Task Name
Engineer
Date
Parameters:
Returns
Notes
******************************************************************************/
void LINWakeup(void)
/******************************************************************************
Task Name
Engineer
Date
Parameters
Returns
DefaultHandler,
DefaultHandler
};
{
LIN_Init();
TIMER.tasc0.byte = TIMER.tasc0.byte & 0xF3;
TIMER.tasc1.byte = TIMER.tasc1.byte & 0xF3;
}
{
SI.sci.scc1.bit.ensci = 0;
SI.sci.scbr.bit.scr = 1;
SI.sci.scbr.bit.scp = 1;
SI.sci.scc1.bit.ensci = 1;
SI.sci.scc2.bit.te = 1;
LINInitialise();
}
while (SI.sci.scs1.bit.scte == 0)
SI.sci.scdr = 0xAA;
while (SI.sci.scs1.bit.tc == 0)
none
;
;
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
LINInitialise
TTZ740
none
none
LIN driver timer setup causes output compare pins to toggle
which creates a conflict with the hardware design
LINWakeup
TTZ740
none
Initial hardware design used the UPL interface, which is
not compatible with the LIN protocol for bus wakeup, hence
a custom wakeup routine is required for the UPL interface
initialise
TTZ740
none
none
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
//initialise LIN driver
// disable SCI
// 10400 baud
// 10400 baud
// enable SCI
// enable transmit
// send wake up
//initialise LIN driver
Slave Code – SLAVE08.C
Code Listings
61

Related parts for AN2103