Summary of Contents for Freescale Semiconductor M68HC08 series
Page 1
Freescale Semiconductor, Inc. LIN-bus HID Lamp Levelling Stepper Motor Control Using Motorola 908E625 Reference Design Designer Reference M68HC08 Manual Microcontrollers DRM047 Rev. 0, 12/2003 MOTOROLA.COM/SEMICONDUCTORS For More Information On This Product, Go to: www.freescale.com...
Page 2
Freescale Semiconductor, Inc. For More Information On This Product, Go to: www.freescale.com...
Page 3
Freescale Semiconductor, Inc. LIN-bus HID Lamp Levelling Stepper Motor Control Using Motorola 908E625 Reference Design Designer Reference Manual — Rev 0 by: Libor Prokop, Petr Cholasta MCSL, Rosnov • Motorola and the Motorola logo are registered trademarks of Motorola, Inc.
Page 4
Freescale Semiconductor, Inc. Designer Reference Manual DRM047 — Rev 0 MOTOROLA For More Information On This Product, Go to: www.freescale.com...
Freescale Semiconductor, Inc. Designer Reference Manual — DRM047 Table of Contents Section 1. Introduction Overview......... .13 Summary .
Page 6
Freescale Semiconductor, Inc. State Machine........39 Data Flow .
Page 7
Freescale Semiconductor, Inc. LIN Leveller Configuration Frames .....101 Possible Software Extension Programming via LIN ..108 Appendix D.
Page 8
Freescale Semiconductor, Inc. Designer Reference Manual DRM047 — Rev 0 MOTOROLA For More Information On This Product, Go to: www.freescale.com...
Page 9
Freescale Semiconductor, Inc. Designer Reference Manual — DRM047 List of Figures Figure Title Page System Concept ........13 System Concept .
Page 10
Freescale Semiconductor, Inc. Road1 Signal ........89 LIN Master Board Schematic .
Page 11
Freescale Semiconductor, Inc. Designer Reference Manual — DRM047 List of Tables Table Title Page Connector J2 Signals ....... .32 Connector J3 Signals .
Page 12
Freescale Semiconductor, Inc. Designer Reference Manual DRM047 — Rev 0 MOTOROLA For More Information On This Product, Go to: www.freescale.com...
Freescale Semiconductor, Inc. Designer Reference Manual — DRM047 Section 1. Introduction 1.1 Overview This reference design describes the development of a LIN based High Intensity Discharge (HID) headlamp levelling system, which controls the stepper motors in the lamp module to compensate for the motion of the vehicle.
Freescale Semiconductor, Inc. Introduction The concept of HID lighting levelling, the LIN-bus protocol, and the general system concept are given to provide the reader with some valuable background information. The hardware and software (for both master and slave) are described in detail to allow the design and implementation to be fully understood.
Freescale Semiconductor, Inc. Introduction LIN-bus The low beam of today’s headlamps is characterized by a specific shape and distribution regulated by ECE regulations. Independent of the speed, the type of road, and the weather conditions, the headlamps of today are always constant. But we will have next generations Advanced Front Lighting (AFS) systems soon.
Freescale Semiconductor, Inc. Introduction advantage of LIN-bus over other bus protocols (like CAN) is low system cost. This is because the LIN-bus protocol is based on standard and cost-effective serial SCI (UART compatible) hardware modules. These are implemented on most Motorola MCU/DSP devices. An enhanced SCI is called ESCI.
Page 17
Freescale Semiconductor, Inc. Introduction Definitions and Acronyms LIN Master master board with LIN master software LIN Master Software the LIN-bus master software for stepper motors control and communication LIN SIO Wire LIN-bus signal (Serial Input Output) wire LIN Stepper Controller...
Page 18
Freescale Semiconductor, Inc. Introduction Designer Reference Manual DRM047 — Rev 0 Introduction MOTOROLA For More Information On This Product, Go to: www.freescale.com...
Page 19
Freescale Semiconductor, Inc. Designer Reference Manual — DRM047 Section 2. System Concept The system application was designed to control stepper motor actuators from a GUI running on a PC. The PC is connected to the LIN Master board via RS232 serial ports and they form the master controller. The LIN Master board is then connected to the LIN Stepper Controller slaves via a serial single-wire LIN-bus.
Freescale Semiconductor, Inc. System Concept Application Control GUI Application Control GUI pc master s/w pc master s/w LIN Stepper Controller LIN Stepper Controller Master HC12 S/W Master HC12 S/W LIN Stepper LIN Stepper LIN Stepper Board LIN Stepper Board Slave HC08 S/W...
Freescale Semiconductor, Inc. System Concept LIN Stepper Controller 2.2 LIN Stepper Controller The LIN Stepper Controller is the LIN-bus slave node. It does the following: • controls bi-phase bipolar stepper motors to a required position with automatic speed acceleration and deceleration •...
Freescale Semiconductor, Inc. System Concept • motor block and run current limitation • motor stepping start frequency • motor stepping acceleration • period motor stop time-out • motor stall position • motor parking position • motor position correction Four groups of LIN signal frames are defined to control the dedicated axis: •...
Page 23
Freescale Semiconductor, Inc. System Concept LIN Master 2.3.1 PC Master Mode The master board is connected via an RS232 line to the PC (with installed PC master software), and acts as a LIN Master node controlled by the user interface (HTML page).
Freescale Semiconductor, Inc. System Concept The personal computer provides software download or debugging with a dedicated programming (e.g. Pemicro) or debugging software (e.g. Metrowerks Hiwave Debugger) 2.3.4 Pass Mode Master board acts as a gateway between RS232 and LIN-bus (copy signals between RS232 and LIN-bus).
Freescale Semiconductor, Inc. System Concept Personal Computer Personal Computer GUI Control Page - html LIN Master API transferred LIN Master variables (any) PC master software RS232 LIN Master LIN Master software PC master software Driver LIN Master variables Master Application Figure 2-2.
Page 26
Freescale Semiconductor, Inc. System Concept The LIN Master application interface (API) is then a defined set of LIN Master variables. The GUI is then realized as an HTML script file, which reads/modifies the variables in the API. The graphical user interface is described in Section 7.
Freescale Semiconductor, Inc. Designer Reference Manual — DRM047 Section 3. Hardware Description 3.1 Master Board The master board (Figure 3-1) is supplied with 12 V from an external source and can switch LIN supply currents up to 5 A. It can be used in four different modes, as described in Section 2.3.
Freescale Semiconductor, Inc. Hardware Description The heart of the system (see Figure 3-2) is the 16-bit MC9S12DP256B MCU (see Section 9. References, 12), which is supported by the bus drivers and power stage. The MC33399 (see Section 9. References, 11) is used as the LIN interface, and can drive up to 16 slaves.
Freescale Semiconductor, Inc. Hardware Description Slave Board J2 - Debugging J3 - Motor J2 - LIN Figure 3-3. LIN Stepper (Slave) Board CAUTION: A slave board based on 908E625 can be even smaller than the LIN Enhanced Stepper Board. The PCB from Figure 3-3 is universal.
Freescale Semiconductor, Inc. Hardware Description Slave Board MCU 908EY16 Power Die Stepper Motor H-bridge LIN-bus Sensors Figure 3-5. 908E625 Blocks Usage 3.2.2 LIN-bus The LIN-bus is connected to the connector J1. The capacitor C1 filters the bus and the signal is connected to the pin LIN (20) of the physical layer.
Page 32
Freescale Semiconductor, Inc. Hardware Description 3.2.3 Software Download and Debugging Connector J2 is used for software download or debugging. This is based on so called MON08 mode (see Section 9. References, 10, Section 10 Monitor ROM) The signals PTB4/AD4, PTB3/AD3, PTA1/KB1, PTA0/KB0, IRQ_IN...
Page 33
Freescale Semiconductor, Inc. Hardware Description Slave Board Table 3-1. Connector J2 Signals Input/ Pin No Pin Name Description MON08 mode Output Vdd = 5V PTB4/AD4 MON08 mode (via 10k resistor) 3.2.4 Stepper Motor Dual H-bridge and High Side Switch The bi-phase bipolar stepper motor is powered with four half-bridges.
Page 34
Freescale Semiconductor, Inc. Hardware Description 3.2.6 Hall Port and Sensor The LIN Stepper Controller does not use any sensors. Therefore the connector J4 is not displayed in Figure 3-4. However the LIN Enhanced Stepper Board (Figure A-2) was designed for possible use of Hall sensors or analog signals.
Freescale Semiconductor, Inc. Designer Reference Manual — DRM047 Section 4. Messaging Scheme Description This section describes LIN messaging. 4.1 Axis and Signal Providers and Acceptors As shown in Figure 2-1, each LIN Stepper Controller node has a relation to the concrete controlled axis. The LIN messaging scheme was designed to support this concept.
Freescale Semiconductor, Inc. Messaging Scheme Description 2. using LIN reconfiguration as described in Appendix C.3. LIN Leveller Configuration Frames or Section 6.1.9. Reconfig LIN. NOTE: The user must guarantee that there will be no other nodes with the same axis connected to one LIN-bus.
Freescale Semiconductor, Inc. Messaging Scheme Description LIN Leveller Configuration Messaging 4.3 LIN Leveller Configuration Messaging The Master Request and Slave Response frames are used for the LIN Stepper Controller configuration. The configuration allows adaptation of the LIN Stepper software. Each configuration frames is used to configure...
Page 38
Freescale Semiconductor, Inc. Messaging Scheme Description Designer Reference Manual DRM047 — Rev 0 Messaging Scheme Description MOTOROLA For More Information On This Product, Go to: www.freescale.com...
Freescale Semiconductor, Inc. Designer Reference Manual — DRM047 Section 5. LIN Master Software Description The software is described in terms of: • General State machine diagram • Data flow chart for each Master Board mode 5.1 State Machine Figure 5-1 presents a general description of the implemented software.
Page 40
Freescale Semiconductor, Inc. LIN Master Software Description 5.1.3 PC Master Mode Initialization The actions are following: • Turn on LIN supply voltage • Initialize SCI1 and PC master software driver • Initialize LIN driver (including initialization of SCI0 and ECT channel0) •...
Freescale Semiconductor, Inc. LIN Master Software Description State Machine Reset MCU Init Timer Channel 3 Interrupt Mode Pass Mode mode Init Selection PC master mode PC master Mode Init Master Debug Recorder Exchange data mode mode between RS232 and LIN...
Freescale Semiconductor, Inc. LIN Master Software Description 5.1.5 Debug Mode Initialization Sets: • MONs according to pin states on Port P (see Figure 3-1) • All program flow control and state variables 5.1.6 Pass Mode Initialization • Turns on LIN supply voltage 5.2 Data Flow...
Page 43
Freescale Semiconductor, Inc. LIN Master Software Description Data Flow The meanings of the variables above and below the bubbles are described in Section 7.7. Programming and Configuration excluding LIN_SleepWakeReq, that is an element of Section 7.3. LIN-bus Control. 5.2.3 Loop1/Loop2 Priority Selector...
Freescale Semiconductor, Inc. LIN Master Software Description UploadParam DownloadParam LIN_Status StoreParam MCUReset SynchMode_Loop1 LINReconfig SendPositionCorrection LIN_SleepWakeReq LOOP1_TIMER_Interrupt LIN_RunStopReq LOOP2_TIMER_Interrupt enableLoop2 Slave Sleep/Wake up, Loop1/Loop2 priority selector Programming and None Configuration Loop2 Control enableTxPosition_Loop1 (Next page) enableRxPosStatus_Loop1 paramArray enableRxStatus_Loop1 nodeID uAppConfiByte1...
Page 45
Freescale Semiconductor, Inc. LIN Master Software Description Data Flow 5.2.4 Loop1/Loop2 Send and Receive LIN Messages Replaces function that provides (see Section 5. LIN Master Software Description): • Send frmPosCmd • Receive frmPosStatus and frmAppStatus All variables surrounding this bubble are described in Section 7.3.
Freescale Semiconductor, Inc. LIN Master Software Description Data Flow 5.2.7 Loop1 Timing Sets ECT channel1 output compare register and waits for interrupt; set by means of periodeMasterMode variable to 20ms. 5.2.8 Loop1 Send and Receive LIN Messages Send frmPosCmd, receive frmPosStatus and frmAppStatus (see Section 5.
Page 48
Freescale Semiconductor, Inc. LIN Master Software Description 5.2.10 Debug Mode Program Flow A general overview may be gained from Section 2.3.3. Debug Mode Figure 5-5. 5.2.11 Debug/Programming Control The Master Board hardware (see Appendix A. Hardware Schematics) is prepared for using RxD, TxD, DTR and RTS RS232 signals, but software implementation is based on RxD, TxD, and DTR signals, where the DTR state is the determining function, i.e.
Freescale Semiconductor, Inc. LIN Master Software Description Data Flow Table 5-1. Debug Line Output Master Board signals Pin number Pin name Pin type DTR - Low level DTR - High level (Debugging and (Reset) programming) MON2 Output High impedance state...
Freescale Semiconductor, Inc. LIN Master Software Description data procedure was successfully tested with data speeds up to 20 kBaud. RS232 Exchange data Figure 5-6. Pass Mode Data Flow Chart Designer Reference Manual DRM047 — Rev 0 LIN Master Software Description...
Freescale Semiconductor, Inc. Designer Reference Manual — DRM047 Section 6. LIN Stepper Software Description LIN Stepper Software is described in terms of: • LIN Stepper Software Data Flow • LIN Stepper Software Application State Diagram • Flow Charts • LIN Stepper Software Implementation on the following pages 6.1 LIN Stepper Software Data Flow...
Page 52
Freescale Semiconductor, Inc. LIN Stepper Software Description The other process’s states are controlled by functional calls from the Slave Application control process and by dedicated variables. Variables uAppFlags1 and uAppErrFlags reflect the system status and are set and read by the three essential processes. The structure sParameterRAM includes the system parameters that determine the application behavior.
Page 53
Freescale Semiconductor, Inc. LIN Stepper Software Description LIN Stepper Software Data Flow LIN Messages Driver l_bool_rd_AppInitFlag, l_u8_rd_frequencyReq l_u8_wr_AppFlags1, l_bool_rd_ClrFlag, l_u16_rd_positionReq l_u8_wr_AppErrFlags l_bool_rd_PosResetFlag, l_bool_rd_LightOnFlag l_u8_wr_frequencyAct l_u16_wr_positionAct eAppState sParameterRAM Slave App. Control frequencyActLowHigh positionAct fun. calls positionReq frequencyReq erPOUT, uAppFlags1, sParameterRAM.curentBlockRun erIFR, uAppErrFlags sParameterRAM.uAppConfigByte1...
Page 54
Freescale Semiconductor, Inc. LIN Stepper Software Description 6.1.2 Position and Speed Control The Position and Speed Control provides stepper motor control to a defined absolute position positionReq with the following functions: • linear acceleration and deceleration ramps from frequencyStart to frequencyReq with ramp steepness acceleration = deceleration •...
Page 55
Freescale Semiconductor, Inc. LIN Stepper Software Description LIN Stepper Software Data Flow The variable positionDecelDistance is incremented during speed acceleration. The actual and required position difference is compared with the positionDecelDistance (with the DECEL_RESERVE) to find the point where the speed deceleration ramp must start down to frequencyStart.
Freescale Semiconductor, Inc. LIN Stepper Software Description Updated Requests StepRun | StopTimeout? positionDif = positionReq -positionAct positionDif != 0 Step Start Return Figure 6-2. Motor Position and Speed Control - Service Updated Requests Service of the Updated Actual Position is shown in Figure 6-3.
Freescale Semiconductor, Inc. LIN Stepper Software Description NOTE: To stop or reverse the motor, the motor must slow down to frequencyStart and provides DECEL_AFTERRAMP_RESERVE steps with frequencyStart. This is provided by the condition positiondecelAfterRamp =< 0. When positiondecelAfterRamp is initialized to DECEL_AFTERRAMP_RESERVE by...
Page 59
Freescale Semiconductor, Inc. LIN Stepper Software Description LIN Stepper Software Data Flow The frequency acceleration subroutine provides the actual frequency frequencyActLowHigh ramp with the maximum frequency limit at frequencyReq. If the actual frequency is lower than the required, the new actual frequency is calculated from the last actual frequency frequencyActLowHigh, last stepping period periodStep and acceleration constant ParametersRAM.acceleration.
Page 60
Freescale Semiconductor, Inc. LIN Stepper Software Description 6.1.4 Position Sensing Position sensing handles the actual position variable positionAct. The process should guarantee that the actual position is actualized (increment/decrement) each motor step provided by the Motor Stepping Control Process. The process also handles position initialization and correction.
Freescale Semiconductor, Inc. LIN Stepper Software Description 6.1.9 Reconfig LIN The process includes the functions necessary for LIN signal reconfiguration. As shown in Section 5. LIN Master Software Description, each LIN Stepper Controller node is programmed as an acceptor for one set of the LIN signals according to the controlled Axis.
Freescale Semiconductor, Inc. LIN Stepper Software Description LIN Stepper Software Application State Diagram • initializes LIN drivers • initializes stepIndex = STEP_INDEX_INIT_DEFAULT • initializes actual position positionAct = sParameterRAM.positionPark MCU_Reset MCU Init Configuration Done Done NO Position Correction App Init...
Page 64
Freescale Semiconductor, Inc. LIN Stepper Software Description • clears system errors • provides position and speed control application initialization NOTE: The application initialization state App. Init. does not set actual motor position positionAct. 6.2.3 App.Run In the Application Run state, the application controls the actual position positionAct to the required position positionReq with current limited to the Run or Block current.
Freescale Semiconductor, Inc. LIN Stepper Software Description LIN Stepper Software Implementation 6.2.7 App. Prepare Sleep Application prepares all MCU modules for minimal consumption and provides Stop instruction. It also sets the Power Die to be able to generate IRQ pin signal for LIN-bus wake-up.
Page 66
Freescale Semiconductor, Inc. LIN Stepper Software Description The following equation shows the relationship between system (raw value range) and real (physical or normalized range) representation Real Value (EQ 1.) -------------------------------------------------------------- UWord16 Value MAX_U16 Real Quantity Range Max Real Value ⋅...
Page 67
Freescale Semiconductor, Inc. LIN Stepper Software Description LIN Stepper Software Implementation From the above equations for the Real Value: UWord16 Value*Real Quantity Range Max (EQ 5.) Real Value --------------------------------------------------------------------------------------------------------- - MAX_U16 SWord16 Value*Real Quantity Range Max (EQ 6.) Real Value...
Page 68
Freescale Semiconductor, Inc. LIN Stepper Software Description 6.3.2 Scaling of Time Scaling of time variables is according to EQ12,13 Timer Prescaller Division (EQ 12.) Resolution Period ------------------------------------------------------------- - Bus Frequency ResolutionPeriod defines the time of (EQ 13.) Real Step Period periodStep*Resolution Period 6.3.3 Acceleration Scaling and Arithmetic Operations...
Page 69
Freescale Semiconductor, Inc. LIN Stepper Software Description LIN Stepper Software Implementation UWord16 variable frequencyActLowHigh.Word. This will guarantee the low resolution (necessary to create low steepness frequency ramps). For the frequency-to-period calculation and comparison with required frequency frequencyReq, it is sufficient to use 8-bit information. This allows to use fast calculations like frequency to speed conversion using udiv16_8to16.
Freescale Semiconductor, Inc. LIN Stepper Software Description Resolution Frequency [Hz] is RESOLUTION_FREQUENCY_HZ CONVERSION_CONST_PERIOD_FREQ = (1000000000.0/RESOLUTION_FREQUENCY_HZ/RESOLUTION_PE RIOD_NS) 6.3.5 LIN Stepper Software Memory Utilization Table 6-1 shows how much memory is required to run the LIN Stepper Controller with code compiled with Metrowerks CodeWarrior v 2.1.
Freescale Semiconductor, Inc. Designer Reference Manual — DRM047 Section 7. User Interface Description 7.1 Introduction This section describes the Control pages used for LIN-bus control (see Section 2.3.1. PC Master Mode) in terms of: • PC master software general overview •...
Freescale Semiconductor, Inc. User Interface Description View Area Project Tree Variable Watch View Tabs Figure 7-1. PC Master Software Main Page 7.2.1 Project Tree Clicking the mouse on the legend selects what is displayed in the remaining boxes. 7.2.2 Variable Watch...
Freescale Semiconductor, Inc. User Interface Description LIN-bus Control 7.2.3 View Tabs The View tabs select what is displayed in the View area. 7.2.4 View Area Shows one of following items: • HTML Control page (LIN-bus Control page or Programming and Configuration page) •...
Page 74
Freescale Semiconductor, Inc. User Interface Description 7.4.1 Control Loop1 The steps for setting this page are as follows: 1. Chose LIN frames (see Section 5. LIN Master Software Description) for communication via checking of Send or Receive boxes. 2. Select Axis (LIN Stepper Controller) 3.
Freescale Semiconductor, Inc. User Interface Description Slave Control Figure 7-2. LIN-bus Control Page 7.4.2 Control Loop2 The setting is the same as for Control Loop1 except: • If there are communication requests of both loops at the same time, Loop1 always has the main priority. This means that a request from Loop2 is shifted until the request of Loop1 is satisfied.
Page 76
Freescale Semiconductor, Inc. User Interface Description FramePosCmd 16-bit data source (positionReq) is set only manually, by means of the positionReqManual box. 7.4.3 Status Notes and State Buttons On the yellow background can be seen two Status notes and three State buttons: •...
Freescale Semiconductor, Inc. User Interface Description Recorder synchronized with periodeSend, that is situated beside Loop1 periodeSend variable. 7.5 Recorder This page is shown in Figure 7-3. It is possible to reach it in two ways. Either click on the Display Graphical Recorder button (Slave Control page) or click on the legend Recorder in the Project tree.
Freescale Semiconductor, Inc. User Interface Description Figure 7-3. Recorder Page By comparing 1) and 2) it is possible to watch the delay caused by transmitting FramePosCmd on LIN-bus; by comparing 1) and 3) it is possible to watch the delay caused by the mechanical parts of the LIN Stepper Controller that are driving the lamp position (LIN communication delays can be in the most of this cases neglected).
Freescale Semiconductor, Inc. User Interface Description Oscilloscope The Oscilloscope works as a real time recorder and displays the current state of the variables. In comparison to the Recorder, the data for Oscilloscope are loaded to PC master software immediately and individually, whereas, in the case of the Recorder, this is done by group.
Freescale Semiconductor, Inc. User Interface Description The same variables as in Recorder are displayed on the Oscilloscope page, but for both loops. This section is finished by the comparison tables of variables between LIN-bus Control page and Variable Watch: •...
Freescale Semiconductor, Inc. User Interface Description Oscilloscope Table 7-1. LIN-bus Control Page and Variable Watch Variables Comparison - Loop1 LIN-bus Control page variable Name of representative from Note name Watch variable Shift pointer in selected Reset autReset_Loop1 Curve to begin...
Page 82
Freescale Semiconductor, Inc. User Interface Description Table 7-2. LIN-bus Control Page and Variable Watch Variables Comparison - Loop2 LIN-bus Control page variable Name of representative from Note name Watch variable Error during frame PosCmd TxPositionError_Loop2 transmitting Error during frame PosStatus...
Freescale Semiconductor, Inc. User Interface Description Programming and Configuration Table 7-2. LIN-bus Control Page and Variable Watch Variables Comparison - Loop2 LIN-bus Control page variable Name of representative from Note name Watch variable Included in frame AppStatus, analogValue analogValue_Loop2 data field, length 8 bits...
Freescale Semiconductor, Inc. User Interface Description • MCU Reset - reset MCU • Send Position Correction - set new position All variables included in the parameters array are described in Section 5. LIN Master Software Description. Figure 7-5. Programming and Configuration Page 7.7.1 LIN Reconfiguration...
Page 85
Freescale Semiconductor, Inc. User Interface Description Programming and Configuration 7.7.2 Upload Parameters Steps are as follows: 1. Select nodeID (node identity) - for an uninitialized device (by the nodeID item in parameters array) the nodeID is 255 2. In the paramArray combo box, set which parameters are to be...
Page 86
Freescale Semiconductor, Inc. User Interface Description For all Nodes, nodeID is zero; for uninitialized devices, it is 255. 7.7.5 MCU Reset Select Node via nodeID combo box and click on MCU Reset button. For all Nodes, nodeID is zero; for uninitialized devices, it is 255.
Freescale Semiconductor, Inc. Designer Reference Manual — DRM047 Section 8. Conclusion One of the aims of this reference design was to show that the LIN-bus is suitable for HID headlamp levelling control and its communication speed is fully sufficient for this application.
Freescale Semiconductor, Inc. Conclusion Figure 8-1. Slow-Fast Signal Figure 8-2. Low-High (Amplitude) Signal Figure 8-2 shows that the required position positionReq with a sinusoidal signal of small amplitude can be followed by actualPosition Designer Reference Manual DRM047 — Rev 0...
Freescale Semiconductor, Inc. Conclusion Programming and Configuration signal. If the signal amplitude increases, the stepper motor with its maximum speed is not able to follow the required position. The LIN-bus is able to provide enough samples. The system mechanics are the limiting factor.
Page 90
Freescale Semiconductor, Inc. Conclusion • 908E625 device as an integrated solution, which makes the slave nodes easy with a low number of components. Designer Reference Manual DRM047 — Rev 0 Conclusion MOTOROLA For More Information On This Product, Go to: www.freescale.com...
Freescale Semiconductor, Inc. Designer Reference Manual — DRM047 Section 9. References 1. PC Master Software User Manual 2. LIN Specification Package, Revision 1.2 3. System Integration in Automotive Lighting - Improvements in Visibility at Night, Rainer Neumann, Visteon Deutschland GmbH, SAE 2002-01-1989 4.
Page 92
Freescale Semiconductor, Inc. References Designer Reference Manual DRM047 — Rev 0 References MOTOROLA For More Information On This Product, Go to: www.freescale.com...
Freescale Semiconductor, Inc. Designer Reference Manual — DRM047 Appendix B. 908E625 Advantages and Features This general purpose IC from Motorola has been developed as a highly integrated and cost-effective solution for load driving within intelligent LIN distributed architectures. It is especially suited to the control of automotive mirror, door-lock, and light-levelling applications.
Page 96
Freescale Semiconductor, Inc. 908E625 Advantages and Features Die with four half-bridges and one high-side switch with diagnostic functions combined with Hall sensor and analog inputs, a LIN physical layer, and a voltage regulator. 908E625 Features: • Multi-chip combination within a 54-lead SOIC package •...
Freescale Semiconductor, Inc. Designer Reference Manual — DRM047 Appendix C. LIN Frames and Signals This section describes LIN messaging with the frames, signals and the LIN Stepper Controller functionality. C.1 LIN Leveller Basic Frames Figure C-1 describes the LIN Leveller signals and frames.
Page 98
Freescale Semiconductor, Inc. LIN Frames and Signals Table C-1. LIN Leveller Messaging Signal Signal Normalized Accep Frame Name Provi Signal Name Signal Functionality Description Value Value tor(s)/ (ID) Range Range Axis Required absolute Position. The LIN Stepper Controller acceptor provides <0xC000,...
Page 99
Freescale Semiconductor, Inc. LIN Frames and Signals LIN Leveller Basic Frames Table C-1. LIN Leveller Messaging (Continued) Signal Signal Normalized Accep Frame Name Provi Signal Name Signal Functionality Description Value Value tor(s)/ (ID) Range Range Axis Light On Flag. The LIN Stepper...
Freescale Semiconductor, Inc. LIN Frames and Signals Table C-1. LIN Leveller Messaging (Continued) Signal Signal Normalized Accep Frame Name Provi Signal Name Signal Functionality Description Value Value tor(s)/ (ID) Range Range Axis Application Error Flags. The LIN Stepper Controller provider sends...
Freescale Semiconductor, Inc. LIN Frames and Signals LIN Leveller Configuration Frames distinguish the nodes when using Appendix C.3. LIN Leveller Configuration Frames. NOTE: The default node ID settings of the LIN Stepper software reflect the configured axis; so, Axis3 has node ID = 4, Axis2 has node ID = 3, Axis1_2 has node ID = 2, Axis1_1 has node ID = 1.
Page 102
Freescale Semiconductor, Inc. LIN Frames and Signals 2. LIN Reconfiguration Changes the dedicated LIN Stepper Controller configuration. It sets its LIN driver to select the frames and signals according to the defined axis. The axis are described in Section 4.1. Axis and Signal Providers and Acceptors.
Freescale Semiconductor, Inc. LIN Frames and Signals LIN Leveller Configuration Frames Table C-2. LIN Leveller Configuration Frames Signal Signal Frame Accep Provi Name Signal Name Signal Functionality Description Value Normalized Value Range tor(s)/ (ID) Range Axis 0x00 - Sleep Service Byte. Specifies the Master 0x00 <0x01 - 0x7F>...
Page 104
Freescale Semiconductor, Inc. LIN Frames and Signals Table C-2. LIN Leveller Configuration Frames (Continued) Signal Signal Frame Accep Provi Name Signal Name Signal Functionality Description Value Normalized Value Range tor(s)/ (ID) Range Axis in case paramArray = 0 [PARAMS_CONFIG] the data signals has the below described meaning...
Page 105
Freescale Semiconductor, Inc. LIN Frames and Signals LIN Leveller Configuration Frames Table C-2. LIN Leveller Configuration Frames (Continued) Signal Signal Frame Accep Provi Name Signal Name Signal Functionality Description Value Normalized Value Range tor(s)/ (ID) Range Axis in case paramArray = 1 [PARAM_SPEED] the data signals has the below described meaning...
Page 106
Freescale Semiconductor, Inc. LIN Frames and Signals Table C-2. LIN Leveller Configuration Frames (Continued) Signal Signal Frame Accep Provi Name Signal Name Signal Functionality Description Value Normalized Value Range tor(s)/ (ID) Range Axis (paramArray = 2) positionResetRqValueH frmMaster x.L= Master...
Page 107
Freescale Semiconductor, Inc. LIN Frames and Signals LIN Leveller Configuration Frames Table C-2. LIN Leveller Configuration Frames (Continued) Signal Signal Frame Accep Provi Name Signal Name Signal Functionality Description Value Normalized Value Range tor(s)/ (ID) Range Axis The frame frmSlaveResponse provides the LIN Stepper Controller previously addressed (initiated) with...
Freescale Semiconductor, Inc. LIN Frames and Signals Request and Slave response frames. The parameters space of these data signals is addressed the parameters RAM according to paramArray pointer. paramRAM paramROM BASE_ADDR_PARAM_RAM+0 nodeID nodeID AppConfiByte1 AppConfiByte1 currentBlockRun currentBlockRun l_u8_rd_paramAray RESERVED RESERVED...
Page 109
Freescale Semiconductor, Inc. LIN Frames and Signals Possible Software Extension Programming via LIN The resident constant software segment cannot be reprogrammed. Since the LIN-bus communication and some control features are necessary for the software download. The re-programmable software segment could be reprogrammed using the same principle as the parameters configuration.
Freescale Semiconductor, Inc. LIN Frames and Signals Designer Reference Manual DRM047 — Rev 0 LIN Frames and Signals MOTOROLA For More Information On This Product, Go to: www.freescale.com...
Freescale Semiconductor, Inc. Designer Reference Manual — DRM047 Appendix D. LIN Stepper Software Data Variables Table D-1 describes the LIN Stepper Controller data variables. Table D-1. Stepper Controller Software Data Variables Name Components Description enumeration constants: APP_INIT, APP_RUN, APP_POS_INIT, eAppState...
Page 112
Freescale Semiconductor, Inc. LIN Stepper Software Data Variables Table D-1. Stepper Controller Software Data Variables (Continued) Name Components Description RAM structure with control parameters Table C-2, frmMasterRequest for details on each component positionCorrection Motor Position Correction motor Parking/ positionPark position reset position...
Page 113
Freescale Semiconductor, Inc. LIN Stepper Software Data Variables Possible Software Extension Programming via LIN Table D-1. Stepper Controller Software Data Variables (Continued) Name Components Description Application Error Flags register Table C-1, l_u8_wr_AppErrFlagsA1_1 details on each components HighTemperature HTF Over Temperature Status Bit...
Page 114
Freescale Semiconductor, Inc. LIN Stepper Software Data Variables Designer Reference Manual DRM047 — Rev 0 LIN Stepper Software Data Variables MOTOROLA For More Information On This Product, Go to: www.freescale.com...
Freescale Semiconductor, Inc. Designer Reference Manual — DRM047 Appendix E. System Setup E.1 Hardware Setup The hardware setup depends on desired functionality of the whole system. There are two main possible setups. The first is for a LIN HID demo application (see...
Freescale Semiconductor, Inc. System Setup 12V Power Supply Personal Computer HID Lamp system Slave Board Master Board Figure E-1. LIN HID Demo Application Designer Reference Manual DRM047 — Rev 0 System Setup MOTOROLA For More Information On This Product, Go to: www.freescale.com...
Freescale Semiconductor, Inc. System Setup Jumper Settings of Master and Slave Boards Slave Board Power Supply Master Board Personal Computer Figure E-2. Programming and Debugging Application - Detail E.2 Jumper Settings of Master and Slave Boards The jumper settings depend on the desired device functionality and are specified by Table E-1.
Freescale Semiconductor, Inc. System Setup E.3 Required Software Tools The application requires the following software development tools: • Metrowerks CodeWarrior for HC08 microcontrollers, version 2.1 or later. • PEMICRO PROG08SZ Flash/EEprom Programmer HC08 devices using MON08, version 1.68 • Metrowerks CodeWarrior for HC12 microcontrollers with BDM support, version 2.0 or later.
Page 119
Freescale Semiconductor, Inc. System Setup Building and Uploading the Application created in the folder lin_leveller\lin_stepper\bin. Prior to the compile, the target must be set according to required the axis (see Figure E-3). This sets the LIN signal drivers to receive the required signals.
Freescale Semiconductor, Inc. System Setup Depending on used PC serial port Figure E-4. Bootloader Setting E.5 Executing the LIN HID Demo Application The LIN HID demo application is prepared for operation when connected according to Figure E-1 in Appendix E.1. Hardware Setup, with jumpers setting according to Appendix E.2.
Freescale Semiconductor, Inc. System Setup Executing the LIN HID Demo Application Depending on the PC serial port used Figure E-5. Communication Page DRM047 — Rev 0 Designer Reference Manual MOTOROLA System Setup For More Information On This Product, Go to: www.freescale.com...
Freescale Semiconductor, Inc. System Setup Figure E-6. Variables Source page Now the system is prepared. Its control is described in the User Interface Description. NOTE: Do not forget to click on the button RUN at the bottom right corner of the control page, to start sending signals on the bus.
Page 123
Freescale Semiconductor, Inc. For More Information On This Product, Go to: www.freescale.com...
Page 124
Freescale Semiconductor, Inc. HOW TO REACH US: USA/EUROPE/LOCATIONS NOT LISTED: Motorola Literature Distribution; P.O. Box 5405, Denver, Colorado 80217 1-303-675-2140 or 1-800-441-2447 JAPAN: Motorola Japan Ltd.; SPS, Technical Information Center, 3-20-1, Minami-Azabu Minato-ku, Tokyo 106-8573 Japan 81-3-3440-3569 ASIA/PACIFIC: Information in this document is provided solely to enable system and software Motorola Semiconductors H.K.
Need help?
Do you have a question about the M68HC08 series and is the answer not in the manual?
Questions and answers