Freescale Semiconductor M68HC08 series Designer Reference Manual

Freescale Semiconductor, Inc.
LIN-bus HID Lamp
nc...
I
cale Semiconductor,
Frees
M68HC08
Microcontrollers
Motor Control Using
Motorola 908E625
Designer Reference Manual
DRM047 Rev. 0, 12/2003
MOTOROLA.COM/SEMICONDUCTORS
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
nc...
I
cale Semiconductor,
Frees
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
LIN-bus HID Lamp Levelling Stepper Motor Control Using
nc...
I
cale Semiconductor,
Frees
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.
®
Metrowerks of Metrowerks, Inc., a wholly owned subsidiary of Motorola, Inc.
and the Metrowerks logo are registered trademarks
CodeWarrior wholly owned subsidiary of Motorola, Inc.
Microsoft® is a registered trademark of Microsoft Corporation in the U.S. and other countries
DRM047 — Rev 0 Designer Reference Manual
MOTOROLA 1
For More Information On This Product,
Go to: www.freescale.com
®
is a registered trademark of Metrowerks, Inc., a
Freescale Semiconductor, Inc.
nc...
I
cale Semiconductor,
Frees
Designer Reference Manual DRM047 — Rev 0
2 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. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13
1.2 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14
Table of Contents
nc...
I
cale Semiconductor,
Frees
1.3 HID Headlamp Levelling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.4 LIN-bus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
1.5 Definitions and Acronyms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Section 2. System Concept
2.1 System Features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .20
2.2 LIN Stepper Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2.3 LIN Master . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
2.4 Personal Computer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .24
Section 3. Hardware Description
3.1 Master Board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.2 Slave Board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Section 4. Messaging Scheme Description
4.1 Axis and Signal Providers and Acceptors. . . . . . . . . . . . . . . . .35
4.2 LIN Leveller Basic Messaging . . . . . . . . . . . . . . . . . . . . . . . . .36
4.3 LIN Leveller Configuration Messaging . . . . . . . . . . . . . . . . . . .37
Section 5. LIN Master Software Description
DRM047 — Rev 0 Designer Reference Manual
MOTOROLA 5
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
5.1 State Machine. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .39
5.2 Data Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .42
Section 6. LIN Stepper Software Description
6.1 LIN Stepper Software Data Flow . . . . . . . . . . . . . . . . . . . . . . . 51
6.2 LIN Stepper Software Application State Diagram. . . . . . . . . . .62
6.3 LIN Stepper Software Implementation . . . . . . . . . . . . . . . . . . .65
Section 7. User Interface Description
nc...
I
cale Semiconductor,
Frees
7.1 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
7.2 PC Master Software General Overview . . . . . . . . . . . . . . . . . .71
7.3 LIN-bus Control. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .73
7.4 Slave Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
7.5 Recorder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
7.6 Oscilloscope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .78
7.7 Programming and Configuration. . . . . . . . . . . . . . . . . . . . . . . .83
Section 8. Conclusion
Section 9. References
Appendix A. Hardware Schematics
A.1 LIN Master Board Schematic . . . . . . . . . . . . . . . . . . . . . . . . . .93
A.2 LIN Stepper Board Schematic . . . . . . . . . . . . . . . . . . . . . . . . . 94
Appendix B. 908E625 Advantages and Features
Appendix C. LIN Frames and Signals
C.1 LIN Leveller Basic Frames . . . . . . . . . . . . . . . . . . . . . . . . . . . .97
C.2 Node ID. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Designer Reference Manual DRM047 — Rev 0
6 MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
C.3 LIN Leveller Configuration Frames. . . . . . . . . . . . . . . . . . . . .101
C.4 Possible Software Extension Programming via LIN . . . . . . . .108
Appendix D. LIN Stepper Software Data Variables
Appendix E. System Setup
E.1 Hardware Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .115
E.2 Jumper Settings of Master and Slave Boards . . . . . . . . . . . .117
E.3 Required Software Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
E.4 Building and Uploading the Application . . . . . . . . . . . . . . . . . 118
nc...
I
E.5 Executing the LIN HID Demo Application . . . . . . . . . . . . . . . .120
cale Semiconductor,
Frees
DRM047 — Rev 0 Designer Reference Manual
MOTOROLA 7
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
nc...
I
cale Semiconductor,
Frees
Designer Reference Manual DRM047 — Rev 0
8 MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Designer Reference Manual — DRM047
Figure Title Page
1-1 System Concept . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13
2-1 System Concept . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .20
2-2 PC Master Software Principle. . . . . . . . . . . . . . . . . . . . . . . . . . 25
nc...
I
cale Semiconductor,
Frees
3-1 Master Board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3-2 Master Board Concept . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
3-3 LIN Stepper (Slave) Board . . . . . . . . . . . . . . . . . . . . . . . . . . . .29
3-4 LIN Stepper Controller (Slave) Board Schematic . . . . . . . . . . .30
3-5 908E625 Blocks Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .31
5-1 Software State Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .41
5-2 PC Master Mode Data Flow Chart - Part1 . . . . . . . . . . . . . . . . 44
5-3 PC Master Mode Data Flow Chart - Part2 . . . . . . . . . . . . . . . . 46
5-4 Master Mode Data Flow Chart . . . . . . . . . . . . . . . . . . . . . . . . . 47
5-5 Debug Mode Data Flow Chart . . . . . . . . . . . . . . . . . . . . . . . . .49
5-6 Pass Mode Data Flow Chart. . . . . . . . . . . . . . . . . . . . . . . . . . . 50
6-1 LIN Stepper Software - Data Flow 1. . . . . . . . . . . . . . . . . . . . . 53
6-2 Motor Position and Speed Control - Service
Updated Requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
6-3 Motor Position and Speed Control - Service
Updated Actual Position . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .57
6-4 Frequency Acceleration and Deceleration - Flow Chart . . . . . . 58
6-5 LIN Stepper Software - Data Flow 2 - Configuration . . . . . . . .61
6-6 LIN Stepper Software Application State Diagram. . . . . . . . . . . 63
7-1 PC Master Software Main Page . . . . . . . . . . . . . . . . . . . . . . . .72
7-2 LIN-bus Control Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .75
7-3 Recorder Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .78
7-4 Oscilloscope Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
7-5 Programming and Configuration Page . . . . . . . . . . . . . . . . . . .84
8-1 Slow-Fast Signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
8-2 Low-High (Amplitude) Signal . . . . . . . . . . . . . . . . . . . . . . . . . . 88
List of Figures
DRM047 — Rev 0 Designer Reference Manual
MOTOROLA 9
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
8-3 Road1 Signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
A-1 LIN Master Board Schematic . . . . . . . . . . . . . . . . . . . . . . . . . .93
A-2 LIN Enhanced Stepper Board Schematic. . . . . . . . . . . . . . . . .94
B-1 908E625 Simplified Block Diagram . . . . . . . . . . . . . . . . . . . . . 95
C-1 Configuration Parameters Addressing . . . . . . . . . . . . . . . . . .108
E-1 LIN HID Demo Application . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
E-2 Programming and Debugging Application - Detail . . . . . . . . .117
E-3 Metrowerks Compiler with lin_stepper.mcp . . . . . . . . . . . . . . 119
E-4 Bootloader Setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .120
E-5 Communication Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .121
E-6 Variables Source page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .122
nc...
I
cale Semiconductor,
Frees
Designer Reference Manual DRM047 — Rev 0
10 MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Designer Reference Manual — DRM047
Table Title Page
3-1 Connector J2 Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .32
3-2 Connector J3 Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33
3-3 Connector J4 Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .34
nc...
I
5-1 Debug Line Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .48
6-1 Stepper Controller Software Memory Utilization. . . . . . . . . . . .70
7-1 LIN-bus Control Page and Variable Watch Variables
Comparison - Loop1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
7-2 LIN-bus Control Page and Variable Watch Variables
Comparison - Loop2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
7-3 LIN-bus Control Page and Variable Watch Variables
Comparison - Status Notes and State Buttons . . . . . . . . . . . . .83
C-1 LIN Leveller Messaging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
C-2 LIN Leveller Configuration Frames . . . . . . . . . . . . . . . . . . . . .103
D-1 Stepper Controller Software Data Variables. . . . . . . . . . . . . .111
E-1 Master and Slave Boards Jumper Settings . . . . . . . . . . . . . .117
cale Semiconductor,
List of Tables
Frees
DRM047 — Rev 0 Designer Reference Manual
MOTOROLA 11
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
nc...
I
cale Semiconductor,
Frees
Designer Reference Manual DRM047 — Rev 0
12 MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Designer Reference Manual — DRM047

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
nc...
I
vehicle. (In this implementation, the vehicle’s movement is simulated on a PC). The design consists of a master control board that is based on a 16-bit HCS12 MCU, a PC with graphical user interface (GUI) and slave nodes that control the levelling stepper motors (see Section 2. System Concept for a full description). The slave nodes are driven by an innovative dual-die product (908E625) that contains an industry-standard FLASH based, M68HC08 MCU and an SMOS power die that includes VReg, LIN interface, Hall Sensor interface and high-side and low-side drivers. (See appendices and data sheet for additional information.)
cale Semiconductor,

Section 1. Introduction

.
Frees
Figure 1-1. System Concept
DRM047 — Rev 0 Designer Reference Manual
MOTOROLA Introduction 13
For More Information On This Product,
Go to: www.freescale.com
Introduction

1.2 Summary

nc...
I

1.3 HID Headlamp Levelling

cale Semiconductor,
Frees
Freescale Semiconductor, Inc.
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. Finally, a description of the user interface is provided to demonstrate the ease of use and flexibility of the system.
The reference design demonstrates that the HID lamp levelling system can be controlled over the LIN-bus, and that several system benefits can be achieved using this method, compared with the conventional wired implementation. These benefits include system configuration, as the software and parameters can be updated over the LIN-bus, and scalability, as it is easier to add functions to a bus-based application. In addition, using the 908E625 dual-die device offers a low-cost implementation, as the system cost is reduced due to the minimal external hardware required. The 908E625 provides all the functions necessary to implement the slave nodes, and its small footprint and on-board FLASH make this device ideal for many stepper motor control applications.
At the present time, car front lighting systems are changing rapidly. There are many techniques that can improve visibility under low light conditions. One of the requirements is automatic vertical beam control. This is necessary for headlamps based on discharge lamps.
Other systems are Bi-Xenon headlamps. Today’s Bi-Xenon headlamp operates with one single Xenon bulb and creates both low beam and high beam. The cut-off is generated via a special shield, which can be flipped. The shield control is provided by means of an actuator, which can be a motor or a solenoid.
Designer Reference Manual DRM047 — Rev 0
14 Introduction MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
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. A new lighting system can be adopted to this various conditions. The target is to achieve better visibility at night, when directing the lights according to the steering wheel angle or due to the speed. To see where the car is going, rather than putting the light always straight, is the background of this idea. So we have horizontal beam control. Other systems use an auxiliary bending lamp. See Section 9. References: 3, 4, 5, 6, 7, and 8.
Introduction
LIN-bus
nc...
I

1.4 LIN-bus

cale Semiconductor,
Frees
Advanced headlamp systems are quite complex. They need sophisticated optics, sensors and actuators. So, today the system costs targets their implementation to high-end car segments. If we lower the cost, we spread them to all car segments. A key factor in lowering the system cost is integration and the use of reasonable components and protocols.
This reference design describes a good solution for headlamp levelling systems based on stepper motor actuators with a possibility of vertical and also horizontal beam control. The system can benefit from a single chip solution and communication via low-cost LIN-bus protocol.
All modern car electronic communication is based on serial bus protocols. These have many advantages over classical wired systems. For example, a control system with stepper motor actuators can be split into distributed controllers connected with a single-wire bus. There is no doubt that this bus system saves on wiring and connectors, so the system cost is significantly reduced.
The LIN-bus serial communication protocol (see Section 9.
References, 2) was designed for automotive applications, but it can also
be used for other devices (white-goods, printers, and copiers, for example). In the case of car-body electronics, it is used for air-conditioning, mirror control, seat control, and light levelling. The
DRM047 — Rev 0 Designer Reference Manual
MOTOROLA Introduction 15
For More Information On This Product,
Go to: www.freescale.com
Introduction
nc...
I
Freescale Semiconductor, Inc.
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.
Other serial bus protocols like CAN require a specialized hardware module. They can have higher communication speed than LIN-bus. But the overall system cost of such systems is much higher. Therefore many of car electronics systems should be based on LIN-bus protocol.
This reference design shows that the LIN-bus protocol speed is fully sufficient for a headlamp leveller with a stepper motor actuators. The advantage versus other bus protocols, such as CAN-bus, is low system cost.

1.5 Definitions and Acronyms

The definitions and acronyms used in this reference design are listed below.
(signal) Acceptor the device which receives and responses to
AFS Advanced Front Lighting System
Cairone see Power Die
cale Semiconductor,
ESCI Enhanced Serial Communication Interface
DSP Digital Signal Processor
Frees
ECT Enhanced Capture Timer
HID Lamp High Intensity Density headlamp
LIN Leveller the system described in this reference
a bus signal
design. It consists of the LIN master and LIN stepper controllers
LIN-bus a local interface network standard for serial
asynchronous communication (see Section 9. References, 2)
Designer Reference Manual DRM047 — Rev 0
16 Introduction MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
LIN Master master board with LIN master software
LIN Master Software the LIN-bus master software for stepper
LIN SIO Wire LIN-bus signal (Serial Input Output) wire
LIN Stepper Controller LIN-bus slave board with General Purpose
LIN Stepper Software the LIN-bus slave stepper motor control
LIN Stepper Board slave stepper board hardware for LIN slave
nc...
I
Introduction
Definitions and Acronyms
motors control and communication
IC 908E625 with LIN Stepper software
software for 908E625 described in this AN
stepper controller. The PCB layout is same as LIN Enhanced Stepper Board. Some parts are not populated.
cale Semiconductor,
Frees
LIN Enhanced Stepper Board
LIN Master Board master board hardware for LIN Master
MCU microcomputer unit
PCB printed circuit board
Power Die part of 908E625 with H-bridges LIN
SCI Serial Communication Interface module
(signal) provider the device which send the slave task of the
slave stepper board hardware for LIN Master with sensor connector and other components
physical layer high-side switch connected to the MCU part with SPI interface. In some references, the Power Die chip is called Cairone
(outside Motorola called also UART)
bus signal
DRM047 — Rev 0 Designer Reference Manual
MOTOROLA Introduction 17
For More Information On This Product,
Go to: www.freescale.com
Introduction
nc...
I
Freescale Semiconductor, Inc.
cale Semiconductor,
Frees
Designer Reference Manual DRM047 — Rev 0
18 Introduction MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Designer Reference Manual — DRM047
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. The master controller can handle
nc...
I
several stepper motor actuators, so it can demonstrate levelling of two headlamps around vertical and horizontal axes. Each actuator consists of one stepper motor and LIN Stepper Controller slave node. The actuators control positioning around a dedicated axis.

Section 2. System Concept

cale Semiconductor,
Frees
The control system consists of the following modules:
Personal Computer
LIN Master – LIN master node
LIN Stepper Controller – LIN slave node
Each module is programmed with dedicated software.
DRM047 — Rev 0 Designer Reference Manual
MOTOROLA System Concept 19
For More Information On This Product,
Go to: www.freescale.com
System Concept
Freescale Semiconductor, Inc.
RS232
RS232
LIN Master Board
LIN Master Board
LIN physical
LIN physical
interface
interface
HC12 CPU
HC12 CPU
RS-232
RS-232
Application Control GUI
Application Control GUI
pc master s/w
pc master s/w
Master HC12 S/W
Master HC12 S/W
LIN Stepper
LIN Stepper
Slave HC08 S/W
Slave HC08 S/W
LIN bus
LIN bus
Stepper
Stepper
LIN Stepper Controller
LIN Stepper Controller
Axis 2
Axis 2
LIN Stepper Board
LIN Stepper Board
PM908E625
PM908E625
Stepper
Stepper
Axis 3
Axis 3
nc...
I

2.1 System Features

cale Semiconductor,
Frees
Program/
Program/
Debugging
Debugging
Interface
Interface
Stepper
Stepper
Axis 1_1
Axis 1_1
Head Lamp R Head Lamp L
Head Lamp R Head Lamp L
Stepper
Stepper
Axis 1_2
Axis 1_2
Figure 2-1. System Concept
LIN-bus Interface rev 1.2
Bus speed 19.2 kbps
Slave IC without external crystal or resonator
Slave node clock synchronization ±15%
Each LIN slave controls one biphase bipolar stepper motor
Motor phase current limitation up to 700 mA
Supply voltage 12 V d.c.
Stepper motor control with stepping acceleration and deceleration ramp
Stepping frequency up to 2500 Hz
Slave parameters configuration via LIN-bus
Slave LIN signals reconfiguration via LIN-bus
LIN signals defined for 2D control with 3 (and “half”) axes
Embedded code written in C-language
Designer Reference Manual DRM047 — Rev 0
20 System Concept MOTOROLA
For More Information On This Product,
Go to: www.freescale.com

2.2 LIN Stepper Controller

nc...
I
Freescale Semiconductor, Inc.
The LIN Stepper Controller is the LIN-bus slave node. It does the following:
controls bi-phase bipolar stepper motors to a required position
communicates with the master node via LIN-bus
provides LIN-bus clock synchronization (the slave node uses
provides parameters configuration/programming via LIN-bus
provides LIN signals reconfiguration via LIN-bus to a required axis
System Concept
LIN Stepper Controller
with automatic speed acceleration and deceleration
internal on-chip oscillator with no external components)
when requested by LIN-bus configuration signals
when requested by LIN-bus configuration signals
cale Semiconductor,
Frees
All the necessary hardware of this LIN-bus slave node is comprised in one SOIC 54-lead packaged 908E625, with some external connectors and capacitors. The 908E625 includes the Motorola M68HC08 core, and its functionality is determined by the LIN Stepper software.
The software provides all control functionality for stepper positioning control. The absolute required position and maximum speed are determined by LIN signals from the master.
The LIN Stepper Controller clock is based on an internal RC on-chip oscillator. Therefore, the LIN-bus driver (using the ESCI module on 908E625) can handle the LIN-bus clock synchronization range according to the LIN-bus specification 1.2. (see Section 9. References,
2)
The LIN stepper controller has the capability to change some configuration parameters via the LIN-bus. These parameters can be stored in FLASH memory. For this purpose, there are LIN-bus configuration signals (Master Request and Slave Response frames — see Section 5. LIN Master Software Description) defined for the system.
node ID number (0 to 255)
uAppConfigByte1
DRM047 — Rev 0 Designer Reference Manual
MOTOROLA System Concept 21
For More Information On This Product,
Go to: www.freescale.com
System Concept
nc...
I
Freescale Semiconductor, Inc.
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:
Axis 1_1 (to be used as horizontal axis, right lamp) signals group
cale Semiconductor,

2.3 LIN Master

Frees
Axis 1_2 (to be used as horizontal axis, left lamp) signals group
Axis 2 (to be used as vertical axis, right lamp) signals group
Axis 3 (to be used as vertical axis, left lamp) signals group
The reconfiguration of the LIN signals (see above) means that the slave can be programmed to be active only on one of the four signal groups (so it ignores signals for other actuators). This signal group can also be chosen from the LIN-bus master with the LIN-bus configuration signals (Master Request and Slave Response frames). The benefit of this solution is that there can be one universal controller software for any axis actuator. It can then be configured via LIN-bus for any axis, as required.
The function of the master board depends on the selected mode, chosen by means of a jumper on the board (see Section 3.1. Master Board).
The modes are as follows:
PC master mode (PCM)
Master mode (M)
Debug mode (D)
Pass mode (P)
Designer Reference Manual DRM047 — Rev 0
22 System Concept MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
2.3.1 PC Master Mode
nc...
I
Freescale Semiconductor, Inc.
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).
The LIN Master performs the following functions:
LIN-bus Run/Stop/Sleep/Wake-up control
Periodical sending/receiving of up to 2*3 LIN-bus frames within
Possibly fully control the position of up to two independent LIN
Manual or automatic generation of the required position of LIN
System Concept
LIN Master
two timing loops
steppers
stepper. In the case of automatic generation, a read-out of a predefined signal curve (simulation of real application) is provided
2.3.2 Master Mode
cale Semiconductor,
2.3.3 Debug Mode
Frees
LIN Stepper configuration and programing (using master request, slave response frames defined for this application)
The master board acts as a an autonomous LIN Master node (without using a personal computer). It is similar to the PC master mode in automatic mode (automatic generation of the required position of the LIN Stepper).
In this mode it is possible to program and debug any LIN Stepper controller via a special 10-pin connector. The LIN Master performs the following two functions:
it gives some defined signals to the 10-pin connector to put the LIN Stepper controller into MON08 debugging mode (see Section 9.
References, 10, Section 10. Monitor ROM).
it provides a serial communication gateway between the personal computer (using RS232 line) and the 10 pin connector
DRM047 — Rev 0 Designer Reference Manual
MOTOROLA System Concept 23
For More Information On This Product,
Go to: www.freescale.com
System Concept
2.3.4 Pass Mode

2.4 Personal Computer

nc...
I
Freescale Semiconductor, Inc.
The personal computer provides software download or debugging with a dedicated programming (e.g. Pemicro) or debugging software (e.g. Metrowerks Hiwave Debugger)
Master board acts as a gateway between RS232 and LIN-bus (copy signals between RS232 and LIN-bus). The mode can be used, if LIN-bus protocol is implemented in the personal computer.
The personal computer is used for application control using a graphical user interface. The PC host computer communicates with the LIN Master via the RS232 serial port.
cale Semiconductor,
Frees
The graphical user interface is implemented as an HTML script running on PC master software (see Section 9. References, 1). The PC master software is a universal software tool for communication between the personal computer and embedded applications based on an MCU or DSP. The principle of the PC master software is shown in Figure 2-2.
Designer Reference Manual DRM047 — Rev 0
24 System Concept MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
nc...
I
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
cale Semiconductor,
Frees
LIN Master variables
Master Application
Figure 2-2. PC Master Software Principle
It consists of a PC master software running on a PC and a PC master software driver with protocol implementation running on the LIN Master. The driver is implemented as a resident software routine (interrupt based) included in the LIN Master software. The communication medium is RS232 in this headlamp levelling application.
The basic feature of the PC master software is that all the MCU/DSP variables can be easily transferred to the personal computer for reading or modification. The user can simply specify which of them will be read/modified and the period of each variable reading.
NOTE: The PC master software provides a communication layer between any
LIN Master software variables and the graphical interface control page, which is written in HTML language.
DRM047 — Rev 0 Designer Reference Manual
MOTOROLA System Concept 25
For More Information On This Product,
Go to: www.freescale.com
System Concept
nc...
I
Freescale Semiconductor, Inc.
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. User Interface Description.
cale Semiconductor,
Frees
Designer Reference Manual DRM047 — Rev 0
26 System Concept MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Designer Reference Manual — DRM047

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. LIN Master,
nc...
I
depending on position of the jumper on the MODE SELECTION header (currently PCM -> PC master mode). After each change of mode, the RESET button must be pressed.

Section 3. Hardware Description

cale Semiconductor,
Frees
MODE SELECTION
RS232
MONs
Figure 3-1. Master Board
BUTTON
DEBUG
+12V
LINRESET
DRM047 — Rev 0 Designer Reference Manual
MOTOROLA Hardware Description 27
For More Information On This Product,
Go to: www.freescale.com
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.
nc...
I

3.2 Slave Board

cale Semiconductor,
Frees
RS232 physical interface
RS232
+12V
This board is protected against incorrect supply voltage polarity and provides this feature to all LIN Stepper Controllers supplied by the Master Board.
The LIN Stepper Controller hardware is based on the 908E625 device. The hardware consists only of few components as shown in Figure 3-3. It is due to the fact that all the functionality is provided by the 908E625 device.
Power stage
Figure 3-2. Master Board Concept
Microcontroller
MC9S12DP256B
Debug physical interface
LIN physical interface
Debug
LIN
Designer Reference Manual DRM047 — Rev 0
28 Hardware Description MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
J2 - Debugging
J2 - LIN
Hardware Description
Slave Board
J3 - Motor
nc...
I
cale Semiconductor,
Frees
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. The sensor support - connector J4 and resistors R2, R1 from Figure A-2 are not populated. It ‘s because they are not used for current LIN Stepper Controller with the LIN Stepper software. Also the LED diode D1, R4 and headers J5, J6 are not necessary for system functionality.
The PCB layout was designed as an universal LIN Enhanced Stepper Board according the schematics in Figure A-2. It has some additional sensor inputs. This could be used for some applications with a Hall sensor or analog signal feedback.
The LIN Stepper Controller does not use any sensor feedback. The schematics of the LIN Stepper Board s displayed in Figure 3-4. It uses the LIN Enhanced Stepper Board PCB layout, but some components are not populated.
DRM047 — Rev 0 Designer Reference Manual
MOTOROLA Hardware Description 29
For More Information On This Product,
Go to: www.freescale.com
Hardware Description
J1
VSUP_LIN
1
3
2
4
POWER_HDR4
J2
10 9 8 7 6 5 4 3 2
JP1
HDR 2X1
1
IRQ_IN
1
IRQ_RQ
2
nc...
I
CON/10MICROMATCH
cale Semiconductor,
1
J5 HDR 1
PTB4/AD4 PTB3/AD3 PTA1/KBD1 PTA0/KBD0 RST IRQ_RQ IRQ_IN VDD VSS PTC4/OSC
Freescale Semiconductor, Inc.
+
C2 330u/35
C1 100p
GND
VDD
BEMF FGEN
VDD_A
C4 100n
VDD_A
VSS_A VSS
C3 100n
SSB
SensorA1 SensorA2
RST
U1
20
LIN
42
PTE1/RxD
41
RxD
54
PTA0/KBD0
53
PTA1/KBD1
52
PTA2/KBD2
50
PTA3/KBD3
49
PTA4/KBD4
14
PTA6/SSB
11
PTB1/AD1
8
PTB3/AD3
7
PTB4/AD4
6
PTB5/AD5
2
PTB6/AD6/TBCH0
1
PTB7/AD7/TBCH1
5
PTC2/MCLK
4
PTC3/OSC2
3
PTC4/OSC1
12
PTD0/TACH0/BEMF
13
PTD1/TACH1
10
RSTB_MCU
17
RSTB_SMOS
9
IRQB_MCU/FLSEPGMN
51
FLSVPP
48
VREFH
47
VDDA
46
EVDD
43
VREFL
44
VSSA
45
EVSS
VSUP
27
24
VSUP
VSUP
GND
GND
30
25
PM908E625ACDWB
GND
31
VSUP
IRQB_SMOS
GC3 CON
HVDD
VDD
FGEN
BEMF
HB1
HB2
HB3
HB4
PA1
VSS
SSB
23
26
29
32
28
HS
39
37
H1
36
H2
35
H3
34
38
+
40
18
19
15
16
33
NC
22
NC
21
NC
C5
2u2/10
IRQ_RQ
SSB
FGEN
BEMF
GC2 CON
GC1 CON
VDD_A
VDD
VSS
VSS_A
Figure 3-4. LIN Stepper Controller (Slave) Board Schematic
The 908E625 schematics with the LIN Stepper Controller functional blocks is in Figure 3-5. The he functional blocks are described below.
VDD_A
1
2
3
4
5
6
VDD
J3
HDR 6X1
R4 1k5
D1
LED_YELL
Frees
3.2.1 MCU and Power Die with SPI
MCU 908EY16 chip and Power Die chip (Cairone) forms the 908E625 device in one package. These two chips are connected with SPI signals and some other signals. So the control of the Power Die (like Half-bridges control) is provided with SPI communication. The SPI communication pins MISC, MOS, SPCLK are connected inside of the 908E625 package (see Section 9. References, 9).
Designer Reference Manual DRM047 — Rev 0
30 Hardware Description MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Loading...
+ 94 hidden pages