AN2633 Freescale Semiconductor / Motorola, AN2633 Datasheet - Page 10

no-image

AN2633

Manufacturer Part Number
AN2633
Description
LIN Drivers for SLIC Module on the MC68HC908QL4
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
AN2633/D
SLIC Driver Code – Three Versions
// -Use only one of the following define statements --
//#define QL4LINKit
#define QL4EVB
10
The EVB does not support the regulator inhibit function by the physical layer,
so this must be taken into account when using software that handles sleep
mode. Care must be taken to ensure that the SLIC module is disabled before
disabling the physical layer because recovery from sleep will not result in POR.
Sleep mode recovery would then need to re-enable the physical layer first, then
re-enable the SLIC module. Details of this are beyond the scope of this
application note.
Three different versions of the SLIC driver code are included in this application
note to illustrate several different ways to implement software drivers for this
module. All methods serve the same basic purpose, but every method is a
different balance of code portability, readability, and efficiency. The primary
difference between each version of the driver code is how the SLIC module ISR
is written.
The three basic versions of the code are:
All versions of the code include a sample application designed for use with
either the LIN kit QL4 slave evaluation board or the M68EVB908QL4
evaluation board. To indicate which hardware will be used, uncomment the
appropriate #define statement at the beginning of the ‘slave.c’ file in the
project.
The sample application responds to message IDs designed for the LIN kit
application demo boards. The messaging and details regarding this are
explained more fully in AN2573/D: LIN Kits LIN Evaluation Boards. The ASM
and C versions are designed to respond to only the default IDs. The API version
allows the user to dynamically change the ID at runtime (as described in
AN2573/D).
One key feature in all versions is a sleep mode function, which turns off the
LEDs when no activity has been detected on the bus or button for a long time.
Sleep mode is implemented by regularly calling the Check_LIN_Sleep() routine
LIN Drivers for SLIC Module on the MC68HC908QL4
// Use this define for the QL4 LINkit Board
// Use this define for the QL4 EVB Board
Freescale Semiconductor, Inc.
For More Information On This Product,
Assembly code version of the SLIC ISR
Basic C-based version of the same ISR
C-based driver with a standardized application programmers interface
(API). The API is designed to match the API for the QT/QY LIN slave
drivers described in AN2599/D.
Go to: www.freescale.com
MOTOROLA

Related parts for AN2633