NEW DATABASE - 350 MILLION DATASHEETS FROM 8500 MANUFACTURERS
AN2960 MC68HC908EY16 AN2767 AN2884 MC68HC908GR16 AN2885 AN2960SW MC33486 - Datasheet Archive
Application Note AN2960 Rev. 0, 7/2005 Window Lift/Sunroof LIN 2.0 Slave Based on the MC68HC908EY16 Microcontroller by: Zdenek
Freescale Semiconductor Application Note AN2960 AN2960 Rev. 0, 7/2005 Window Lift/Sunroof LIN 2.0 Slave Based on the MC68HC908EY16 MC68HC908EY16 Microcontroller by: Zdenek Kaspar 8/16-bit Systems Engineering Roznov p. R., Czech Republic Introduction This application note describes the implementation of a LIN 2.0 enabled window lift/sunroof slave module based on the MC68HC908EY16 MC68HC908EY16, a Freescale 8-bit microcontroller unit (MCU). The application demonstrates the capability and performance of the MC68HC908EY16 MC68HC908EY16 MCU by implementing LIN 2.0 connectivity and brush DC motor control routines. It does not include the implementation of sophisticated window lift control, which requires a combination of Hall sensor and current measurements; only simplified obstruction and stall detection based on current measurement is presented. The implementation described is intended to be as reusable as possible, to help reduce the development time when introducing this kind of connectivity to a product. The implementation is based on the latest available revision of the specification for Local Interconnect Network (LIN) LIN2.0, which was introduced in September 2003 (see Reference [4] for more information). © Freescale Semiconductor, Inc., 2005. All rights reserved. Introduction The LIN 2.0 connectivity of this project is based on the Volcano Automotive (www.volcanoautomotive.com) LIN Target Package (VCT LTP 2.0, Reference [5]). This application note also helps to introduce this tool. The main benefit of using this software package is its high level approach to creating and rebuilding a LIN cluster. This greatly simplifies the LIN cluster generation process, allowing the designer to focus fully on the application. For a general overview of the implementation and use of this software package, see AN2767 AN2767 (Reference [1]). This application note complements the following Freescale LIN 2.0 related application notes: · AN2767 AN2767 - LIN 2.0 Connectivity on Freescale 8/16-bit MCUs Using Volcano LTP (Reference [1]). · AN2884 AN2884 - LIN 2.0 Door Lock Slave Based on the MC68HC908GR16 MC68HC908GR16 MCU and the LIN 2.0 Communication Protocol (Reference [2]). · AN2885 AN2885 - LIN 2.0 Mirror Unit Slave Based on the MC68HC908EY16 MC68HC908EY16 MCU and the LIN 2.0 Communication Protocol, (Reference [3]). The complete application software for the window lift/sunroof LIN 2.0 slave unit (AN2960SW AN2960SW) is downloadable from the Freescale website at www.freescale.com. Window Lift/Sunroof LIN 2.0 Slave, Rev. 0 2 Freescale Semiconductor General Description General Description LIN Cluster Introduction The window lift LIN cluster project outline and node naming convention are shown in Figure 1. The LIN slave application presented is dedicated to the left front window lift control module, and is called win_l_f_lift. However, the application can be modified easily to implement other units, such as the right front slave unit (win_r_f_lift). LSR LIN subbus LIN master win_master LIN slave #1 win_l_f_lift LIN slave #3 win_sr_lift LIN slave #2 win_r_f_lift Keyboard for front left (FL), front right (FR) windows and sunroof (SR) LIN slave #4 win_l_f_keyb LIN slave #6 win_sr_keyb LIN slave #5 win_r_f_keyb node in green - node developed in this application nodes in black - nodes included in message structure of this application nodes in grey - other nodes of possible window lift cluster configuration Figure 1. Designed LIN Cluster Outline The message structure of the window lift LIN cluster is shown in Appendix A - Messaging Strategy. According to the LIN 2.0 spec package (specifically the LIN Configuration Language Specification part), every LIN cluster can be described by a single file called the LIN Description File (window_lift_net.ldf in the case of the presented window lift application). Additional information, specific to the node of interest, is stored in the window_l_f_lift_slave.prv and uart.cfg files. All three files are provided in Appendix B - LIN Description File and Node Specific Files. Slave Node Concept and Features The node is based on the LINkit board for the MC68HC908EY16 MC68HC908EY16. (An evaluation board is available for most LIN 8/16-bit MCUs - see Reference [6] for more information.) The MC33486 MC33486, a dual high side switch for H-bridge automotive applications, is used for DC motor power control. Window Lift/Sunroof LIN 2.0 Slave, Rev. 0 Freescale Semiconductor 3 General Description The node concept is depicted in Figure 2. LIN bus Vdd, Vss MC68HC908EY16 MC68HC908EY16 LINkit MC33486 MC33486 based board Window Lift/ /Sunroof Figure 2. Slave Node Concept The functionality implemented in the window lift/sunroof LIN 2.0 slave node is as follows: · Normal running mode (including LIN 2.0 connectivity, window lift obstruction and stall detection, typical window lift command handling) · Low-power modes (including LIN sleep and wake-up from LIN sleep modes) In normal running mode, the device controls a DC motor using typical window lift commands provided by the master: Open window (active as long as the respective button is pressed) Open window completely Close window (active as long as the respective button is pressed) Close window completely Monitor an error that occurred during the last action The slave also informs the master about its status: Report an error that occurred during the last action (signal name win_l_f_err) Report the LIN response error state (signal name win_l_f_resp_err)1. For the DC motor control related routines, the following features are included: Obstruction and stall detection, based on current measurement "Soft start" of the window lift motor (using PWM ramping-up). In low-power mode, the use of the LIN go-to-sleep and wake-up commands is demonstrated. The slave node is wakened from low-power mode upon any LIN bus activity. On the other hand, MCU low-power mode is entered when the "go-to-sleep" LIN master request frame is received. Moreover, the application supports automatic "go-to-sleep" transition after four seconds of LIN bus inactivity, which is mandatory for all LIN 2.0 slaves. To minimize current consumption, the node low-power mode in the described application implies an MCU power-off. 1. This mechanism allows the master to monitor LIN response error states of all slaves connected to the network. Window Lift/Sunroof LIN 2.0 Slave, Rev. 0 4 Freescale Semiconductor Freescale Components Used Freescale Components Used MC68HC908EY16 MC68HC908EY16 Microcontroller Unit The MC68HC908EY16 MC68HC908EY16 is a member of the low-cost, high-performance M68HC08 M68HC08 family of 8-bit Freescale MCUs. MC68HC908EY16 MC68HC908EY16 features (Reference [7]): · High-performance M68HC08 M68HC08 architecture optimized for C-compilers · 8 MHz internal bus frequency at 5 V · Internal clock generator module (ICG) with no external components Software selectable bus frequencies 25% accuracy with a trimming capability of better than 1% Clock monitor Option to allow use of external clock source or external crystal / ceramic resonator · 15,872 bytes of on-chip FLASH memory with in-circuit programming · 512 bytes of on-chip RAM · Low voltage inhibit module (LVI) · Internal clock generator module (ICG) · Two 16-bit, 2-channel timer (TIMA and TIMB) interface modules with selectable input capture, output compare, and pulse-width modulation (PWM) capability on each channel · 8-channel, 10-bit successive approximation analog-to-digital converter (ADC) · Enhanced serial communications interface (ESCI) · Serial peripheral interface (SPI) · Timebase module (TBM) · 5-bit keyboard interrupt (KBI) with wake-up feature · 24 general I/O pins · External asynchronous interrupt pin (/IRQ) · System protection features: Optional computer operating properly (COP) reset Illegal opcode detection with reset Illegal address detection with reset · Standard low-power modes of operation: Wait mode Stop mode The MCU structure is shown in Figure 3. Window Lift/Sunroof LIN 2.0 Slave, Rev. 0 Freescale Semiconductor 5 Freescale Components Used INTERNAL BUS M68HC08 M68HC08 CPU VDD VSS SINGLE EXTERNAL IRQ MODULE PERIODIC WAKEUP TIMEBASE MODULE 10-BIT 10-BIT ANALOG-TO-DIGITAL CONVERTER MODULE ARBITER MODULE POWER PRESCALER MODULE DDRC PORT C PORT D 24 INTERNAL SYSTEM INTEGRATION MODULE DDRD CONFIGURATION REGISTER MODULE DDRE SERIAL PERIPHERAL INTERFACE MODULE PTB5/AD5 PTB4/AD4 PTB3/AD3 PTB2/AD2 PTB1/AD1 PTB0/AD0 COMPUTER OPERATING PROPERLY MODULE INTERNAL CLOCK GENERATOR MODULE PORT B PTB6/AD6/TBCH0 PORT E ENHANCED SERIAL COMMUNICATION INTERFACE MODULE USER FLASH VECTOR SPACE 36 BYTES VREFH VDDA VREFL VSSA PTA2/KBD2 PTB7/AD7/TBCH1 2-CHANNEL TIMER INTERFACE MODULE B FLASH PROGRAMMING (BURN-IN) ROM 1024 BYTES IRQ PTA3/KBD3 PTA0/KBD0 2-CHANNEL TIMER INTERFACE MODULE A MONITOR ROM 310 BYTES RST PTA4/KBD4 PTA1/KBD USER RAM 512 BYTES OSC2 OSC1 PORT A 5-BIT KEYBOARD INTERRUPT MODULE DDRA CONTROL AND STATUS REGISTERS 64 BYTES USER FLASH 15,872 BYTES PTA5/SPSCK SINGLE BREAKPOINT BREAK MODULE ARITHMETIC/LOGIC UNIT (ALU) DDRB CPU REGISTERS PTA6/SS PTC4/OSC1 PTC3/OSC2 PTC2/MCLK PTC1/MOSI PTC0/MISO PTD1/TACH1 PTD0/TACH0 PTE1/RxD PTE0/TxD POWER-ON RESET MODULE SECURITY MODULE BEMF MODULE Figure 3. MC68HC908EY16 MC68HC908EY16 MCU Block Diagram MC33399 MC33399 LIN Physical Interface The MC33399 MC33399 (Reference [8]) is a LIN sub bus physical layer interface with an implemented bus wakeup capability, whose block diagram can be found in Figure 4. MC33399 MC33399 device features: · Communication speed from 1to 20 kbps · Nominal operation from Vsup 8 to 18 V DC Window Lift/Sunroof LIN 2.0 Slave, Rev. 0 6 Freescale Semiconductor Freescale Components Used · Interfaces to the MCU with CMOS compatible I/O pins · Two operational modes: Normal and Sleep · Very low standby current of 20 µA during Sleep mode · An unpowered node does not disturb the LIN network · Wake up capability from the LIN bus, MCU, or by high voltage on the wake-up pin · Controls an external voltage regulator (via INH pin) · High EMC immunity Figure 4. MC33399 MC33399 (LIN Physical Interface) Block Diagram NOTE The new enhanced LIN physical interface MC33661 MC33661 (Reference [9]) fully replaces the MC33399 MC33399 described above. With a signal slew rate selection option, active bus wave shaping, and a special mode for operating above 100 kbps for testing and programming, it provides excellent radiated emission performance. MC33486 MC33486 Dual High Side Switch for H-bridge Automotive Applications This device is a dual high side switch for automotive applications that incorporates a dual low side switch control feature. This device is designed to monitor two low side switches for typical DC motor control in an H-bridge configuration. It can be interfaced directly with a microcontroller for control and diagnostic Window Lift/Sunroof LIN 2.0 Slave, Rev. 0 Freescale Semiconductor 7 Freescale Components Used functions, is PWM capable, and has a self-adjusted switching speed to minimize electromagnetic emission. MC33486 MC33486 (Reference [10]) features: · 10 A nominal DC current · 35 A maximum peak current · Operating voltage from 8 V to 28 V · Up to 30 kHz PWM capability · Current recopy to monitor the high side current · Overvoltage detection: switches off device when Vbat exceeds 28 V · High side and low side overcurrent protection An MC33486 MC33486 simplified block diagram and a typical application are shown in Figure 5. Figure 5. MC33486 MC33486 Simplified Block Diagram and Typical Application Window Lift/Sunroof LIN 2.0 Slave, Rev. 0 8 Freescale Semiconductor Hardware Description Hardware Description This section describes the major steps in the development of the hardware. A hardware schematic of the window lift LIN slave module is shown in Figure 6. It shows the connections between the MC68HC908EY16 MC68HC908EY16 LINkit board and the MC33486 MC33486 dual high side switch. (Note that the schematic diagram shows only those MCU pins relevant to the application. Other pins, such as those for LINkit debugging support, and unused MCU pins are not depicted.) Jumpers JP1 and JP2 are used only during programming and debugging of the MCU. For more information about LINkit board programming, or about the MC68HC908EY16 MC68HC908EY16 LINkit board, see Reference [6]. J3 JP2 R1 2k2 OUT SHDN GND R12 2k2/1W 1 3 IN C6 + 5 LT1121 LT1121 + U1 8 IN Vbat [8V to 28V, up to 20A] C4 0.1uF C5 4.7uF/6.3V R3 R6 100k R5 1k D8 LED R7 47k 470uF/50V C7 + JP1 LIN 3 WAKE 30 28 29 EN 2 9 Cur R 1 4 GND GLS1 1 4 24 23 5 11 12 14 18 PTB3/AD3 PTB2/AD2 PTB1/AD1 PTB0/AD0 R14 1k PTE1/RXD PTE0/TXD GND R15 1k J1 LIN D4 LED R2 10k R8 1k D5 LED R9 1k D6 LED R10 1k D7 LED BAV99 BAV99 Vbat Wake 2 19 10 PTB5/AD5 MC33399 MC33399 1 2 20 470uF/50V MC33486 MC33486 IN1 IN2 OUT1 OUT1 OUT1 OUT1 6 3 18 PTB4/AD4 RESET RX TX Vsup St 4 5 PTA6/SS R4 10k U3 19 NC NC NC NC 12 11 10 9 OUT2 OUT2 OUT2 OUT2 13 14 15 16 GLS2 Vdd debug PTA5/SPSCK PTB7/AD7/TBCH1 PTB6/AD6/TBCH0 S1 U4 20 VREFL VSS VSSA 8 INH 7 VSUP C3 0.1uF MC68HC908EY16 MC68HC908EY16 17 D3 9V1 ZEN 0.1uF IRQ RST 5 6 7 8 C2 GND 0.1uF 3 4 U2 17 13 J2 OUT1 25 27 26 D1 1N4001 1N4001 C1 VREFH VDD VDDA D2 LED 21 R13 4k7 27k OUT2 IRFZ44N IRFZ44N Q1 OUT IRFZ44N IRFZ44N Q2 R11 1k Figure 6. Window Lift Module Schematic Diagram NOTE LINkit boards are fitted with the MC33399 MC33399 LIN physical interface. As the new, pin compatible, MC33661 MC33661 LIN physical interface with many enhancements (especially slew rate control and low EMC emission) is now available, the MC33661 MC33661 is recommended instead of the MC33399 MC33399. CAUTION (when using MC33661 MC33661) LINkit slave boards use the MC33399 MC33399 to control the LT1121 LT1121 regulator, with a direct connection between the MC33399 MC33399 INH pin and the LT1121 LT1121 SHDN Window Lift/Sunroof LIN 2.0 Slave, Rev. 0 Freescale Semiconductor 9 Hardware Description pin. Although this is a 12 V output from the MC33399 MC33399, which is clamped to about 7 V on the LT1121 LT1121, the current is only about 200 µA, owing to the low drive capability of the INH pin. On the MC33661 MC33661, however, the drive capability is much higher (35 typical output impedance). Therefore, to prevent excessive current from flowing into the LT1121 LT1121 from the MC33661 MC33661, a 10 k series resistor must be added between the MC33661 MC33661 INH pin and the LT1121 LT1121 SHDN pin. To connect the MC33486 MC33486 to the MCU, it is necessary to add pullup resistor R13 to enable reading of the status pin St. It is also necessary to connect resistor R14 for current sensing measurement. As the nominal current recopy ratio of the MC33486 MC33486 is 37001, the following equation can be written: I OUT U CRnom = - × R CR 3700 where: · UCRnom is a nominal voltage value of the current recopy measure pin (PTB4/AD4) · IOUT is current of the connected motor · RCR is a current recopy resistor (R14) The value of RCR is selected to be 1 k. Thus the voltage on the PTB4/AD4 pin, on condition that IOUT = 10A, can be calculated as follows. I OUT 10A U CRnom = - × R CR = - × 1000 2, 7V 3700 3700 This voltage value is then converted by the ADC of the MC68HC908EY16 MC68HC908EY16 (ADC 8-bit accuracy selected), so resulting in an unsigned value of 138. 1. The MC33486 MC33486 has a guaranteed current recopy ratio accuracy of ±15%, or ±10% based on IOUT value range (IOUT in the range 4 A to 8 A or 8 A to 20 A). Window Lift/Sunroof LIN 2.0 Slave, Rev. 0 10 Freescale Semiconductor Software Introduction Software Introduction This section describes the major steps taken during the software part of the development. All software is written in C language, using Metrowerks CodeWarrior for HC08, version 3.0. The presented software implements the left front window lift/sunroof LIN 2.0 slave unit; however, it is a straightforward operation to modify it for another configuration. MCU Peripherals Used This section describes briefly, in the form of tables, all MCU resources used in the project, such as peripheral components and interrupts. The GPIO (general purpose inputs and outputs) and the analog input pins used are listed in Table 1. The table is divided into LINkit1 and application related areas. . Table 1. GPIO and Analog inputs Pin Direction Symbolic Name Purpose Application related PTA5 input St MC33486 MC33486 St pin - Status PTA6 output Wake MC33486 MC33486 Wake pin - Enable/Disable PTB4/AD4 analog input Cur R MC33486 MC33486 Cur R pin - Current Recopy PTB6/AD6 output IN1 MC33486 MC33486 IN1 pin - Input #1 (for Open direction) PTB7/AD7 output IN2 MC33486 MC33486 IN1 pin - Input #2 (for Close direction) LINkit related PTB03/AD03 output LEDs LINkit LED #1, #2, #3, #4 PTB5/AD5 output EN MC33399 MC33399 EN pin - Enable PTE0/TXD output TX MC33399 MC33399 TX pin - Transmit Data PTE1/RXD input RX MC33399 MC33399 RX pin - Receive Data Brief descriptions of the timer (TIM) and timebase (TBM) modules used in the project are given in Table 2. 1. Pins used for MCU debugging and code flashing are not included. Window Lift/Sunroof LIN 2.0 Slave, Rev. 0 Freescale Semiconductor 11 Software Introduction Table 2. Timers and Their Interrupt Service Routines (ISR) Timer ISR Function Configuration and Description TIMB Mc_TimBOvfISR() TBCH0 (TIMB Channel 0) no ISR Timer channel set to unbuffered PWM signal generation for input IN1 of MC33486 MC33486 (Open direction) TBCH1 (TIMB Channel 1) no ISR Timer channel set to unbuffered PWM signal generation for input IN2 of MC33486 MC33486 (Close direction) TIMA no ISR TIMA initialized by the LTP (target.c), but not used, as it is required by LIN master only TBM TbmISR() TIMB set to overflow, used for PWM signal ramping-up of IN1/IN2 inputs of MC33486 MC33486 TBM used for the 4s period measurement, which is necessary for the LIN "go-to-sleep" transition All interrupts used in the window lift/sunroof LIN 2.0 slave project are detailed briefly in Table 3. Table 3: Interrupts Peripheral Module ISR Function Type of Interrupt Purpose TIMB Mc_TimBOvfISR() timer overflow TBM (timebase module) TbmISR() TBM low speed timer for LIN "go-to-sleep" transition ESCI uart_0_rx_handler() SCI Rx LIN connectivity (VCT LTP function) PWM signal ramping-up of IN1/IN2 inputs of MC33486 MC33486 Software Development Software development can be divided into two parts, LIN related and application related: 1. LIN related - the implementation of LIN connectivity. LIN related files are: a. l_gen.c, l_gen.h - these two files are LTP auto generated files, b. target.c, target.h - contain target specific functions for the LTP, c. lin.lib - a library containing all the LIN LTP related stuff, d. several other LTP related *.h files. 2. Application related - brush DC motor control routines, with PWM ramping-up, current recopy feedback measurement. Application related files are: a. b. c. main.c, main.h - the main files of the window lift/sunroof LIN 2.0 slave project, mc.c, mc.h - files contain all the DC motor control related routines, interrupt_handlers.c - contains the interrupt handler for the SCI, as an interface between the application and the LIN driver. Window Lift/Sunroof LIN 2.0 Slave, Rev. 0 12 Freescale Semiconductor Software Introduction The window lift/sunroof LIN 2.0 slave Metrowerks CodeWarrior project is depicted in Figure 7. Figure 7. Metrowerks CodeWarrior Project Structure Pulse Width Modulation Related Calculation To implement the "soft-start" of the window lift motor, pulse width modulation (PWM) is used to drive the MC33486 MC33486. This device allows a PWM frequency of up to 30 kHz. It is suggested to use a PWM frequency higher than 20 kHz, to limit the acoustic noise.The MC68HC908EY16 MC68HC908EY16 has an internal clock generator (ICG) with a programmable frequency output providing integer multiples of the nominal frequency (307.2 kHz ± 25 percent). To fulfil these conditions, the integer multiple N was selected to be 79, according to the following formulae: F nom N × 307, 2kHz 79 × 307, 2kHz f BUSnom = - = - = - = 6067, 2kHz 4 4 4 As 255 levels of PWM are used, f PWMnom = f BUSnom / 255 23, 79kHz f PWMmin = 0, 75 × f BUSnom / 255 17, 84kHz f PWMmax = 1, 25 × f BUSnom / 255 29, 74kHz For more information, refer to the ICG module and TIM module chapters of Reference [7]. Window Lift/Sunroof LIN 2.0 Slave, Rev. 0 Freescale Semiconductor 13 Software Introduction Motor Control Routines Introduction As both motor directions are required for the window lift/sunroof LIN 2.0 slave application, both of the high side switches of the MC33486 MC33486 are used. MC33486 MC33486 inputs IN1 and IN2 are controlled via TBCH0 and TBCH1 (TIMB channels 0 and 1) of the MC68HC908EY16 MC68HC908EY16. Status of the actual motor activity is described by the following variable: unsigned char mcControlState = MC_NO_OPERATION; /* motor control status byte */ where /* states of motor, as stored in mcControlState variable */ #define MC_NO_OPERATION 0 /* no motor control activities */ #define MC_OPENING 0x10 /* OPEN command via IN1 input of MC33486 MC33486 */ #define MC_CLOSING 0x11 /* CLOSE command via IN2 input of MC33486 MC33486 */ Ramping up of the PWM signal, which implements the motor "soft-start", is done via the TIMB overflow. The PWM ramp has an initial value, a ramp increment, and a counter describing how many times each PWM level will be used. Values employed in the application are shown below. These are, however, specific to the motor and the window lift used in the system. /*/ /* TIMER CONTROL RELATED SYMBOLICS FOR PWM GENERATION */ /*/ #define RAMP_INCREMENT 1 /* new value of ramp = old value + RAMP_INCREMENT*/ #define RAMP_INIT 70 /* initial value of PWM ramp */ #define COUNTER_LEVEL 50 /* PWM timing counter symbol */ /* for COUNTER_LEVEL = 50, RAMP_INIT = 70 and RAMP_INCREMENT = 1, the duration of the ramp up was measured as approx. 375ms long */ The current recopy feedback measurement routine is called periodically. The analog value is digitized via pin PTB4/AD4 of the MC68HC908EY16 MC68HC908EY16, then averaged (over the CURRENT_HISTORY long current measurement buffer) to filter the value. This averaged value is then used for simple stall/obstruction detection, where the value is compared to the CURRENT_RECOPY_MAX symbolics, representing the current limit at which the motor should be switched off. It is also necessary to report the error signal (l_bool_wr_win_l_f_err), and to properly update the window status variable (windowStatus). All these current recopy measurement activities are implemented in the Mc_control() routine of the mc.c file, called from the main() never ending loop (see Figure 8). Finally, it is also necessary to check the MC33486 MC33486 status pin "St". The normal state of this pin is "1". When logical "0" is detected, either overtemperature and/or overcurrent occurred on the device. In this case, it is necessary to stop the motor, report the error signal (l_bool_wr_win_l_f_err), and update properly the window status variable (windowStatus). Window Command Flow The window is controlled via the window keyboards. User's commands are transmitted to the window lift/sunroof LIN 2.0 slave device via the LIN network. This LIN information (called signals and defined in the Signals section of the Window_Lift_Net.ldf file) is received by the slave node. Reception is implemented in the TxRxLIN() routine of the main.c file, called from the main() never ending loop (see Window Lift/Sunroof LIN 2.0 Slave, Rev. 0 14 Freescale Semiconductor Software Introduction Figure 8). It updates the window status variable according to the requested command, and properly controls the motor. The variable describing the status of the window is called windowStatus. sWindowStatus windowStatus; /* window/roof status */ where sWindowStatus type is defined as: typedef struct { unsigned char opening : 1; /* window/roof is in opening state */ unsigned char openingCompl : 1; /* window/roof is in completely opening state */ unsigned char closing : 1; /* window/roof is in closing state */ unsigned char closingCompl : 1; /* window/roof is in completely closing state */ unsigned char openCStopped : 1; /* in completely opening stopped state */ unsigned char closeCStopped: 1; /* in completely closing stopped state */ /* last two are special states describing that the window was stopped from completely closing/opening sequence */ } sWindowStatus; Main Program Structure The flowchart of the main() function is depicted in Figure 8. Most of its functions have already been introduced, apart from the function style macro PET_WATCHDOG(), which feeds the computer operating properly (COP) module, and the routine adjust_clock(), which trims the ICG module based on the LIN frame bit time measurement1. 1. The second part of the LIN header consists of a one byte long Synch pattern, which is equal to 0x55. All LIN drivers are supposed to measure this period. Where the LIN slave does not use a precise clock source, but ICG, this information should be used to trim the LIN slave. Window Lift/Sunroof LIN 2.0 Slave, Rev. 0 Freescale Semiconductor 15 Software Introduction main() start Init() routine (peripherals, LIN, variables) PET_WATCHDOG() feed COP adjust_clock() trim ICG (LTP funct.) TxRxLIN() all LIN connectivity Mc_Control() all motor control handling Mc_Detect_MC33486 MC33486_Status() check MC33486 MC33486 Status Figure 8. Main Program Flow Chart LIN Connectivity Development The first step in adding LIN 2.0 connectivity is to create the cluster message strategy (see Appendix A - Messaging Strategy). It outlines completely the communication between all units in the cluster. It consists of a list of all frames, with defined frame IDs, frame publisher and subscribers, data field content (signal structure), and so on. It is also necessary to create a schedule table for the master. These inputs should be embraced by a LIN description file (*.ldf), whose syntax is given by the LIN specification. The Window_Lift_Net.ldf file, as well as the node specific Window_l_f_lift_slave.prv and uart.cfg (node private files), can be found in Appendix B - LIN Description File and Node Specific Files.1 LIN 2.0 connectivity was added to the project by using the Volcano LIN Target Package (LTP) tool2. This tool generates the LIN specific C code files out of the cluster LDF file. These files are then directly added to the Metrowerks CodeWarrior compiler/linker, to include the LIN connectivity routines in the project. 1. More about LDF files, their structure and function can be found in Reference [1]. 2. LTP release for MC68HC908EY16 MC68HC908EY16, version LTP20 LTP20_1_4_0. Window Lift/Sunroof LIN 2.0 Slave, Rev. 0 16 Freescale Semiconductor Software Introduction NOTE To start the LIN slave communication properly, LIN slave clock source deviation, from the nominal master clock before LIN synchronization, must be better than ±14%. (see Reference [4]). LIN Low-power Mode The application supports the LIN low-power mode, which, in the case of the LINkit board, consists of a system power-down. There are two ways whereby low-power mode could be entered: either by the reception of the dedicated LIN "go-to-sleep" command, or by four seconds of bus inactivity1. When one of these conditions is detected, the MCU disables the LIN physical layer (MC33399 MC33399) via its EN pin. This causes the MC33399 MC33399 to turn off (via the INH pin) the switchable voltage regulator LT1121 LT1121 (connected via the SHDN pin), to complete the power-down of the system. The only way to wake up the system is via LIN bus wake-up or via the WAKE pin of the MC33399 MC33399. Entering the low-power mode is implemented as follows: /* LIN "go-to-sleep" transition handling */ /* check if "go-to-sleep" LIN command was received or period of 4 seconds long LIN bus inactivity expired */ if (l_ifc_read_status_i1() & 0xFF) & L_SLEEP_REQUEST) || (!counterGoToSleep) { SwitchOffMC33486(); /* switch off the MC33486 MC33486 */ MC33399 MC33399_EN = 0; /* disable MC33399 MC33399 LIN interface */ /* This will cause the MC33399 MC33399 to turn off (via the INH pin) the switchable voltage regulator LT1121 LT1121 to achieve the lower power consumption */ } 1. One of the LIN 2.0 mandatory features for LIN slaves is the automatic "go-to-sleep" transition after 4 s of bus inactivity. Window Lift/Sunroof LIN 2.0 Slave, Rev. 0 Freescale Semiconductor 17 Conclusion Conclusion The total VCT LTP 2.0 memory consumption depends on the number of LIN communication frames used. Moreover, memory consumption and, in this second case, also the code efficiency, will depend on the LTP configuration, like the supports_user_defined_diagnostic1 and the concurrency_safety settings of the prv file. MCU memory utilization for this application is shown in Table 4. Table 4. Particular Code Sizes MCU Memory Type MCU Memory Size LTP 2.0 Software Occupies Application Software Occupies Total Occupied Area Free Space ( Free Space FLASH 15,872 bytes 2870 bytes 1940 bytes 4810 bytes 11,062 bytes 70% RAM 512 bytes 52 bytes 15 bytes 67 bytes 445 bytes 87% In the actual project settings, user diagnostics are not supported, but the pre-emptive protection from another call is enabled (set to LTP)2. The window lift/sunroof LIN 2.0 slave application uses the following MCU peripherals: · One of eight ADC channels for current recopy measurement · Twelve of 24 I/O MCU pins · ICG module (no external clock source is needed) · ESCI module for LIN · TIMB module (both two channels) · TBM module. The remaining MCU resources are free, and can be used for other application purposes (see the MCU block diagram in Figure 3). The main aim of this application note is to demonstrate: 1. An implementation of LIN 2.0 connectivity 2. Brush DC motor control routines for a window lift/sunroof LIN 2.0 slave based on the MC68HC908EY16 MC68HC908EY16. This should help car manufacturers and all interested parties to adapt their designs to in-vehicle networking systems like LIN 2.0. 1. If the LIN 2.0 User Defined Diagnostics features are required, the supports_user_defined_diagnostic key word should be declared. If the LIN Configuration Tool finds the supports_user_defined_diagnostic key word, it generates the necessary signal read and write calls to allow direct access to the diagnostic frames using the signal API. 2. By adding the line "concurrency_safety = LTP" in the private file, LCFG will automatically add calls to disable and re-enable interrupts around each l_type_wr_sss and l_type_rd_sss call, where it is needed. For more, see Reference [1] and Reference [5]. Window Lift/Sunroof LIN 2.0 Slave, Rev. 0 18 Freescale Semiconductor Conclusion Using the Volcano Automotive LIN Target Package 2.0 (VCT LTP 2.0) to implement LIN 2.0 connectivity brings both advantages and disadvantages. Developing with the VCT LTP may seem to be initially more complicated, and it does also require an initial investment in the tool. However, it can lead to a significant reduction in total cycle time, as the whole LIN connectivity part can be created and added to an application within a few hours. It also yields more elegant and readable code, as LTP uses LIN API1. The downloadable part of this application note is the complete left front window lift/sunroof LIN 2.0 slave software AN2960SW AN2960SW. 1. Specification of the LIN API is an integral part of the LIN specification package. Moreover, starting from LIN 2.0, it is mandatory to use LIN API in all code written in C. Window Lift/Sunroof LIN 2.0 Slave, Rev. 0 Freescale Semiconductor 19 References References 1. LIN 2.0 Connectivity on Freescale 8/16-bit MCUs Using Volcano LTP, Revision 1.0, 11/2004, Freescale Semiconductor document number:AN2767 AN2767 2. LIN 2.0 Door Lock Slave Based on the MC68HC908GR16 MC68HC908GR16 MCU and the LIN 2.0 Communication Protocol, Revision 1.0, 11/2004, Freescale Semiconductor document number: AN2884 AN2884 3. LIN 2.0 Mirror Unit Slave Based on the MC68HC908EY16 MC68HC908EY16 MCU and the LIN 2.0 Communication Protocol, Revision 1.0, 11/2004, Freescale Semiconductor document number: AN2885 AN2885 4. LIN Specification Package, Revision 2.0, 23 September 2003, LIN consortium, http://www.lin-subbus.org 5. User's Guide for LTP 2.0, Rev. D, 31 October 2003 Volcano Communications Technologies 6. LINkits Evaluation Boards, Revision 1.0, 11/2003, Freescale Semiconductor document number (AN2573 AN2573) 7. MC68HC908EY16 MC68HC908EY16 Advance Information, Revision 7.0, 05/2004, Freescale Semiconductor data sheet 8. MC33399 MC33399 Automotive LIN Physical Interface, Revision 4.0, 08/2001, Freescale Semiconductor data sheet 9. MC33661 MC33661 LIN Enhanced Physical Interface, Revision 3.0, 10/2004, Freescale Semiconductor data sheet 10. MC33486 MC33486 Dual High Side Switch for H-Bridge Automotive Applications, Revision 3.3, 06/2001 Freescale Semiconductor data sheet Window Lift/Sunroof LIN 2.0 Slave, Rev. 0 20 Freescale Semiconductor Acronyms and Abbreviations Acronyms and Abbreviations ADC analog to digital converter (module) COP computer operating properly (module) ESCI enhanced serial communication interface module ICG internal clock generator (module) I/O input/output ports LED light emitting diode LIN local interconnect network LINkit evaluation board for LIN development LTP LIN Target Package MCU microcontroller unit TBM timebase module VCT Volcano Automotive Technology Window Lift/Sunroof LIN 2.0 Slave, Rev. 0 Freescale Semiconductor 21 22 0x24 0x21 WIN_MASTER 0x29 0x2A 0x2B 0x2E 0x3C 0x3D 0x3E WIN_R_F_LIFT WIN_SR_LIFT WIN_L_F_KEYB WIN_R_F_KEYB WIN_SR_KEYB WIN_MASTER - - 0x3F 0x26 WIN_L_F_LIFT - 0x25 WIN_MASTER 0x20 0xBF 0xFE 0x7D 0x3C LIN ID ID [0.5] Field (w/ parity) WIN_MASTER Node Name for Signal Provider 1 Status of the sunroff lift WIN_R_F_STATUS msg_id = 0x2004 WIN_SR_STATUS msg_id = 0x2005 SlaveResp MasterReq Reserved for future extended LIN version Reserved for user-defined extended frame LIN Master Request Command LIN Slave Response Command Status of the right front window lift WIN_L_F_STATUS msg_id = 0x2003 n/a n/a n/a 1 Status of the left front window lift 0 0 0 1 1 2 Sunroof lift command 1 Right front window lift command WIN_R_F_CMD msg_id = 0x2001 WIN_SR_CMD msg_id = 0x2002 1 Left front window lift command WIN_L_F_CMD msg_id = 0x2000 WIN_SR_OPEN_COMPL WIN_SR_CLOSE - - - 0 1 0 1 0 2 1 - - - SYS_SLEEP WIN_L_F_ERR 1 1 1 1 1 1 1 1 1 1 Close sunroof completely - - - System Sleep Mode - - - 8 1 1 1 1 8 1 1 1 Closing of sunroof - - - 0 1 0 1 0 8 1 0 3 2 1 0 3 2 1 0 3 2 1 0 - - - 0x00 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Signa Signal Signal l Length Start Initial (bits) Bit Value 1 Open of sunroof completely Error occurred on left front window lift Communication error occurred WIN_L_F_RESP_ERR with the left front window lift Current recopy WIN_L_F_CURRENT_RECP info of the left front window lift Error occurred WIN_R_F_ERR on right front window lift Communication error occurred WIN_R_F_RESP_ERR with the right front window lift Error occurred WIN_SR_ERR on sunroff lift Communication error occurred WIN_SR_RESP_ERR with the sun roof lift WIN_SR_CLOSE_COMPL 3 0 Signal Description Opening of left WIN_L_F_OPEN front window Open of left front WIN_L_F_OPEN_COMPL window completely Closing of left WIN_L_F_CLOSE front window Close of left front WIN_L_F_CLOSE_COMPL window completely Opening of right WIN_R_F_OPEN front window Open of right WIN_R_F_OPEN_COMPL front window completely Closing of right WIN_R_F_CLOSE front window Close of right WIN_R_F_CLOSE_COMPL front window completely Opening of WIN_SR_OPEN sunroof Signal Name 2 1 0 3 2 1 0 3 2 1 0 Frame Size Sig # (Bytes) Frame Description Frame Name - - X X X Initial value is equal to 0, thus not action to a window / sunroof lift Initial value is equal to 0, thus not action to a window / sunroof lift X Initial value is equal to 0, thus not action to a window / sunroof lift Comments 0 = NO ACTION 1 = OPEN COMPLETELY Normalized Resolution Which nodes are reading this response data? Value Range (Degrees/bit) 0 = NO ACTION 1 = OPEN Raw Value Range Initial value is equal to 0, thus not action to a window / sunroof lift Initial value is equal to 0, thus not action to a window / sunroof lift 0 = NO ACTION 1 = CLOSE COMPLETELY 0 = NO ACTION 1 = OPEN 0 = NO ACTION 1 = OPEN COMPLETELY Initial value is equal to 0, thus not action to a window / sunroof lift Initial value is equal to 0, thus not action to a window / sunroof lift 0 = NO ACTION 1 = CLOSE 0 = NO ACTION 1 = CLOSE COMPLETELY Initial value is equal to 0, thus not action to a window / sunroof lift Initial value is equal to 0, thus not action to a window / sunroof lift 0 = NO ACTION 1 = CLOSE X X analog value between 0 to 255 0 = NO ERROR 1 = ERROR OCCURRED X X 0 = NO ERROR 1 = ERROR OCCURRED 0 = NO ERROR 1 = ERROR OCCURRED 0 = NO ACTION 1 = CLOSE COMPLETELY - - - 0x00-0x7F - - - - - - X X X X X X X X X X X X X 0 = NO ERROR 1 = ERROR OCCURRED 0 = NO ERROR 1 = ERROR OCCURRED X 0 = NO ERROR 1 = ERROR OCCURRED Data 0x00-0x7F reserved by LIN spec. 0x00= Sleep Set to 1 if communication error occurred from last frame reception. Set to 1 if error occurred from last window lift move. Set to 1 if communication error occurred from last frame reception. Set to 1 if error occurred from last window lift move. When this value equals to 0 - no current throught the motor; the higher value, the higher current Set to 1 if communication error occurred from last frame reception. Set to 1 if error occurred from last window lift move. Initial value is equal to 0, thus not action to a window / sunroof lift Initial value is equal to 0, thus not action to a window / sunroof lift Initial value is equal to 0, thus not action to a window / sunroof lift 0 = NO ACTION 1 = CLOSE 0 = NO ACTION 1 = OPEN 0 = NO ACTION 1 = OPEN COMPLETELY Appendix A - Messaging Strategy Appendix A - Messaging Strategy Window Lift/Sunroof LIN 2.0 Slave, Rev. 0 Freescale Semiconductor Appendix B - LIN Description File and Node Specific Files Appendix B - LIN Description File and Node Specific Files Window_Lift_Net.ldf /* * * Freescale Semiconductor. * (c) Copyright 2004 Freescale Semiconductor. * ALL RIGHTS RESERVED. * * * * Description: This is the LIN description file of the Window Lift / Sun Roof * project, which demonstrates the LIN 2.0 connectivity with Freeslace MCUs. * * Master of this project is based on Freescale 16-bit MCU HCS12C32 HCS12C32. * Slave is based on Freescale 8-bit MCU HC908EY16 HC908EY16. * * The LIN description file describes a complete LIN cluster and also * contains all information necessary to monitor the network. * * Written by Zdenek Kaspar (R55014 R55014) * */ LIN_description_file; LIN_protocol_version = "2.0"; LIN_language_version = "2.0"; LIN_speed = 10.4 kbps; Nodes { Master: win_master, 20ms, 1ms; Slaves: win_l_f_lift, win_r_f_lift, win_sr_lift; } Signals { win_l_f_open win_l_f_open_compl win_l_f_close win_l_f_close_compl win_r_f_open win_r_f_open_compl win_r_f_close win_r_f_close_compl win_sr_open win_sr_open_compl win_sr_close win_sr_close_compl win_l_f_err win_r_f_err win_sr_err win_l_f_resp_err win_r_f_resp_err win_sr_resp_err : : : : : : : : : : : : : : : : : : 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, win_master, win_l_f_lift; win_master, win_l_f_lift; win_master, win_l_f_lift; win_master, win_l_f_lift; win_master, win_r_f_lift; win_master, win_r_f_lift; win_master, win_r_f_lift; win_master, win_r_f_lift; win_master, win_sr_lift; win_master, win_sr_lift; win_master, win_sr_lift; win_master, win_sr_lift; win_l_f_lift, win_master; win_r_f_lift, win_master; win_sr_lift, win_master; win_l_f_lift, win_master; win_r_f_lift, win_master; win_sr_lift, win_master; Window Lift/Sunroof LIN 2.0 Slave, Rev. 0 Freescale Semiconductor 23 Appendix B - LIN Description File and Node Specific Files win_l_f_current_recp : 8, 0x00, win_l_f_lift, win_master; } Diagnostic_signals { MasterReqB0: 8, MasterReqB1: 8, MasterReqB2: 8, MasterReqB3: 8, MasterReqB4: 8, MasterReqB5: 8, MasterReqB6: 8, MasterReqB7: 8, SlaveRespB0: 8, SlaveRespB1: 8, SlaveRespB2: 8, SlaveRespB3: 8, SlaveRespB4: 8, SlaveRespB5: 8, SlaveRespB6: 8, SlaveRespB7: 8, } 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; Frames { win_l_f_cmd : 0x20, win_master, 1 { win_l_f_open, 0; win_l_f_open_compl, 1; win_l_f_close, 2; win_l_f_close_compl, 3; } win_r_f_cmd : 0x21, win_master, 1 { win_r_f_open, 0; win_r_f_open_compl, 1; win_r_f_close, 2; win_r_f_close_compl, 3; } win_sr_cmd : 0x24, win_master, 1 { win_sr_open, 0; win_sr_open_compl, 1; win_sr_close, 2; win_sr_close_compl, 3; } win_l_f_status : 0x25, win_l_f_lift, 2 { win_l_f_err , 0; win_l_f_resp_err, 1; win_l_f_current_recp, 8; } win_r_f_status : 0x26, win_r_f_lift, 1 { win_r_f_err , 0; win_r_f_resp_err, 1; } Window Lift/Sunroof LIN 2.0 Slave, Rev. 0 24 Freescale Semiconductor Appendix B - LIN Description File and Node Specific Files win_sr_status : 0x29, win_sr_lift, 1 { win_sr_err , 0; win_sr_resp_err, 1; } } Diagnostic_frames { MasterReq: 60 { MasterReqB0, MasterReqB1, MasterReqB2, MasterReqB3, MasterReqB4, MasterReqB5, MasterReqB6, MasterReqB7, } SlaveResp: 61 { SlaveRespB0, SlaveRespB1, SlaveRespB2, SlaveRespB3, SlaveRespB4, SlaveRespB5, SlaveRespB6, SlaveRespB7, } } 0; 8; 16; 24; 32; 40; 48; 56; 0; 8; 16; 24; 32; 40; 48; 56; Node_attributes { win_l_f_lift { LIN_protocol = "2.0"; configured_NAD = 0x30; /* product_id = 0x000B, 0x0020, 1; /* response_error = win_l_f_resp_err; P2_min = 20 ms; ST_min = 20 ms; configurable_frames { win_l_f_cmd = 0x2000; win_l_f_status = 0x2003; } } win_r_f_lift { LIN_protocol = "2.0"; configured_NAD = 0x31; /* product_id = 0x000B, 0x0020, 1; /* response_error = win_r_f_resp_err; P2_min = 20 ms; ST_min = 20 ms; win_l_f_lift NAD = 0x30 */ win_l_f_lift function id = 0x20 */ win_r_f_lift NAD = 0x31 */ win_r_f_lift function id = 0x20 */ Window Lift/Sunroof LIN 2.0 Slave, Rev. 0 Freescale Semiconductor 25 Appendix B - LIN Description File and Node Specific Files configurable_frames { win_r_f_cmd = 0x2001; win_r_f_status = 0x2004; } } win_sr_lift { LIN_protocol = "2.0"; configured_NAD = 0x32; /* win_sr_lift NAD = 0x32 */ product_id = 0x000B, 0x0021, 1; /* win_sr_lift function id = 0x21 */ response_error = win_sr_resp_err; P2_min = 20 ms; ST_min = 20 ms; configurable_frames { win_sr_cmd = 0x2002; win_sr_status = 0x2005; } } } Schedule_tables { sch_conflict_resolving { SlaveResp delay 20 ms; AssignFrameId {win_l_f_lift, win_l_f_cmd} delay 20 ms; SlaveResp delay 20 ms; AssignFrameId {win_l_f_lift, win_l_f_status} delay 20 ms; SlaveResp delay 20 ms; AssignFrameId {win_r_f_lift, win_r_f_cmd} delay 20 ms; SlaveResp delay 20 ms; AssignFrameId {win_r_f_lift, win_r_f_status} delay 20 ms; SlaveResp delay 20 ms; AssignFrameId {win_sr_lift, win_sr_cmd} delay 20 ms; SlaveResp delay 20 ms; AssignFrameId {win_sr_lift, win_sr_status} delay 20 ms; SlaveResp delay 20 ms; } normal_mode { win_l_f_cmd delay 20 ms; win_r_f_cmd delay 20 ms; win_sr_cmd delay 20 ms; win_l_f_status delay 20 ms; win_r_f_status delay 20 ms; win_sr_status delay 20 ms; MasterReq delay 20 ms; SlaveResp delay 20 ms; } low_power_mode { /* Note that the delay period is calculated as n * , where n - is an integer number from interval 1 to 255 (only!!!) - as defined in section Nodes */ MasterReq delay 20 ms; Window Lift/Sunroof LIN 2.0 Slave, Rev. 0 26 Freescale Semiconductor Appendix B - LIN Description File and Node Specific Files SlaveResp delay 5000 ms; } } Window_l_f_lift_slave.prv /* * * Freescale Semiconductor. * (c) Copyright 2004 Freescale Semiconductor. * ALL RIGHTS RESERVED. * * * * Description: This is the slave.prv file for the Window Lift LIN slave based on * Freescale 8 bit MCU HC908EY16 HC908EY16. * * This file is created for "win_l_f_lift" slave node (NAD = 0x30) * * The private file describes information about a single node. It introduces * the name for a node, defines which layered modules that are supported and * the flags assiciated with signals on the network. Finally, a private file * defines the interface characteristics and the network to which each * interface connects. * * Written by Zdenek Kaspar (R55014 R55014) * */ LIN_private_file; LIN_protocol_version = "2.0"; LIN_language_version = "2.0"; concurrency_safety = LTP; network "window_lift_net" { node win_l_f_lift; file "window_lift_net.Ldf"; original_NAD = 0x30; /* win_l_f_lift NAD = 0x30 */ } interface "i1" { connects to window_lift_net; [include "uart.cfg"] } uart.cfg /* * * Freescale Semiconductor. * (c) Copyright 2004 Freescale Semiconductor. * ALL RIGHTS RESERVED. * * * Window Lift/Sunroof LIN 2.0 Slave, Rev. 0 Freescale Semiconductor 27 Appendix B - LIN Description File and Node Specific Files * Description: This is the uart.cfg file for the Window Lift LIN slave based on * Freescale 8 bit MCU HC908EY16 HC908EY16. * * This file defines the interface characteristics. * * Written by Zdenek Kaspar (R55014 R55014) * */ /* Configuration for HC908EY16 HC908EY16 */ uart "hc08esci_II" { /* Input clock of the ESCI module. */ clock_frequency_kHz = 24269; /* By default ESCI runs from CGMXCLK. */ /* internal clock generator set up for CGMXCLK ~ 24,268800MHz nominal */ esci_II_register_base port_ddr_addr = port_io_addr = rx_pin_offset = tx_pin_offset = = 0x10; 0x0a; 0x08; 1; 0; } Window Lift/Sunroof LIN 2.0 Slave, Rev. 0 28 Freescale Semiconductor Appendix B - LIN Description File and Node Specific Files Window Lift/Sunroof LIN 2.0 Slave, Rev. 0 Freescale Semiconductor 29 How to Reach Us: Home Page: www.freescale.com E-mail: support@freescale.com USA/Europe or Locations Not Listed: Freescale Semiconductor Technical Information Center, CH370 CH370 1300 N. Alma School Road Chandler, Arizona 85224 +1-800-521-6274 or +1-480-768-2130 support@freescale.com Europe, Middle East, and Africa: Freescale Halbleiter Deutschland GmbH Technical Information Center Schatzbogen 7 81829 Muenchen, Germany +44 1296 380 456 (English) +46 8 52200080 (English) +49 89 92103 559 (German) +33 1 69 35 48 48 (French) support@freescale.com Japan: Freescale Semiconductor Japan Ltd. Headquarters ARCO Tower 15F 1-8-1, Shimo-Meguro, Meguro-ku, Tokyo 153-0064 Japan 0120 191014 or +81 3 5437 9125 support.japan@freescale.com Asia/Pacific: Freescale Semiconductor Hong Kong Ltd. Technical Information Center 2 Dai King Street Tai Po Industrial Estate Tai Po, N.T., Hong Kong +800 2666 8080 support.asia@freescale.com For Literature Requests Only: Freescale Semiconductor Literature Distribution Center P.O. Box 5405 Denver, Colorado 80217 1-800-441-2447 or 303-675-2140 Fax: 303-675-2150 LDCForFreescaleSemiconductor@hibbertgroup.com AN2960 AN2960 Rev. 0, 7/2005 Information in this document is provided solely to enable system and software implementers to use Freescale Semiconductor products. There are no express or implied copyright licenses granted hereunder to design or fabricate any integrated circuits or integrated circuits based on the information in this document. Freescale Semiconductor reserves the right to make changes without further notice to any products herein. Freescale Semiconductor makes no warranty, representation or guarantee regarding the suitability of its products for any particular purpose, nor does Freescale Semiconductor assume any liability arising out of the application or use of any product or circuit, and specifically disclaims any and all liability, including without limitation consequential or incidental damages. "Typical" parameters that may be provided in Freescale Semiconductor data sheets and/or specifications can and do vary in different applications and actual performance may vary over time. All operating parameters, including "Typicals", must be validated for each customer application by customer's technical experts. Freescale Semiconductor does not convey any license under its patent rights nor the rights of others. Freescale Semiconductor products are not designed, intended, or authorized for use as components in systems intended for surgical implant into the body, or other applications intended to support or sustain life, or for any other application in which the failure of the Freescale Semiconductor product could create a situation where personal injury or death may occur. Should Buyer purchase or use Freescale Semiconductor products for any such unintended or unauthorized application, Buyer shall indemnify and hold Freescale Semiconductor and its officers, employees, subsidiaries, affiliates, and distributors harmless against all claims, costs, damages, and expenses, and reasonable attorney fees arising out of, directly or indirectly, any claim of personal injury or death associated with such unintended or unauthorized use, even if such claim alleges that Freescale Semiconductor was negligent regarding the design or manufacture of the part. FreescaleTM and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2005. All rights reserved.