AN2633 Freescale Semiconductor / Motorola, AN2633 Datasheet - Page 32

no-image

AN2633

Manufacturer Part Number
AN2633
Description
LIN Drivers for SLIC Module on the MC68HC908QL4
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
AN2633/D
//
//+-----------------------------------------------------------------------------+
//|
//|
//|
//|
//|
//+-----------------------------------------------------------------------------+
//____________________________SLIC_ISR_____________
#pragma TRAP_PROC
void SLIC_ISR(void)
32
SLCC2_SLCE = 1;
}
{
unsigned char temp_SLCSV = 0;
temp_SLCSV = SLCSV;
switch(temp_SLCSV)
SLIC_ISR - Interrupt Service Routine
Main handler for SLIC interrupts
SLCP = 0x80;
{
case 0x00:
break;
case 0x04:
break;
case 0x08:
break;
case 0x0C:
break;
case 0x10:
BusOff++;
if (BusOff == 2)
//________________________________________________________________________TEST___
if(SLCID==0x97)
char ID_found = 0;
char temp = PTB_PTB0;
{
LINSleep = 1;
BusOff = 0;
}
{
temp_msg_buffer[0] = SLCD0;
//___________No Interrupts Pending__________________
//___________No Bus Activity________________________
//___________TX Buffer Empty - Checksum Sent_______
//___________TX Buffer Empty_______________________
//___________RX Buffer Full - Checksum OK__________
LIN Drivers for SLIC Module on the MC68HC908QL4
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
// Enable SLIC module
// Set LINSleep flag
// Reset BusOff counter
//
//
// RX Filter Prescaler
//
//
//
//
//
//
// If ID not found, set IMSG
// Read SLCSV value
// switch is temporary measure
0 - SLIC clocks continue in CPU WAIT
1 - SLIC clocks stop in CPU WAIT
This is only used if a value other
than the default is desired.
00 - div 1
01 - div 2
10 - div 3
11 - div 4
// Test message from master
// --------- test code....
// Load RAM from RX buffers
(default setting)
|
|
|
|
|
MOTOROLA

Related parts for AN2633