32
1 Introduction The S12ZVMx12EVB board is designed to drive 3-phase BLDC or PMSM motors, enabling implementation of motor control techniques: • Sensor-less: Back-EMF signal sensing using the MCU integrated ADC modules Back-EMF zero-cross signal monitoring using MCU integrated comparators • Sensor-based: Hall sensor signal monitoring Resolver sin/cos signal monitoring The board features the S12ZVM, a 16-bit automotive microcontroller from the MagniV family. This System on Chip integrates an S12Z microcontroller with a Local Interconnect Network (LIN) physical interface, a 5-V regulator and a Gate Driver Unit (GDU). The motor power stage comprises 6 N-channel power MOSFETs that are controlled by the MCU integrated GDU. A USB to SCI interface is available and can be used for FreeMaster PC-based application control. An integrated OSBDM debugger interface is also provided for easy programming/debugging of the S12ZVM microcontroller device. The board is available in the following versions: S12ZVML12EVBLIN – Features the MC9S12ZVML12, with integrated LINPHY Freescale Semiconductor Document Number: MC9S12ZVM128MCBUG User's Guide Rev. 2, 03/2016 S12ZVM12EVB Evaluation Board User Guide © 2016 Freescale Semiconductor, Inc. Contents 1 Introduction................................................................1 2 Interface Description.................... .............................4 3 Design Considerations.................... ........................ 11 4 Motor Control Kit Board Set-Up........... ................. 29 5 Electrical Characteristics................ .........................30 6 References.............................. ................................. 30 7 S12ZVMxEVB Board Schematics..... .................... 31

MC9S12ZVM128MCBUG, S12ZVM12EVB Evaluation Board User Guidecache.freescale.com/files/microcontrollers/doc/user_guide... · Freescale Semiconductor Document ... The PDO and PDOCLK signals

  • Upload
    buianh

  • View
    218

  • Download
    0

Embed Size (px)

Citation preview

1 IntroductionThe S12ZVMx12EVB board is designed to drive 3-phaseBLDC or PMSM motors, enabling implementation of motorcontrol techniques:

• Sensor-less:• Back-EMF signal sensing using the MCU

integrated ADC modules• Back-EMF zero-cross signal monitoring using

MCU integrated comparators• Sensor-based:

• Hall sensor signal monitoring• Resolver sin/cos signal monitoring

The board features the S12ZVM, a 16-bit automotivemicrocontroller from the MagniV family. This System onChip integrates an S12Z microcontroller with a LocalInterconnect Network (LIN) physical interface, a 5-Vregulator and a Gate Driver Unit (GDU). The motor powerstage comprises 6 N-channel power MOSFETs that arecontrolled by the MCU integrated GDU.

A USB to SCI interface is available and can be used forFreeMaster PC-based application control. An integratedOSBDM debugger interface is also provided for easyprogramming/debugging of the S12ZVM microcontrollerdevice.

The board is available in the following versions:• S12ZVML12EVBLIN – Features the

MC9S12ZVML12, with integrated LINPHY

Freescale Semiconductor Document Number: MC9S12ZVM128MCBUG

User's Guide Rev. 2, 03/2016

S12ZVM12EVB Evaluation BoardUser Guide

© 2016 Freescale Semiconductor, Inc.

Contents

1 Introduction................................................................1

2 Interface Description.................... .............................4

3 Design Considerations.................... ........................ 11

4 Motor Control Kit Board Set-Up........... ................. 29

5 Electrical Characteristics................ .........................30

6 References.............................. ................................. 30

7 S12ZVMxEVB Board Schematics..... .................... 31

• S12ZVMC12EVBCAN – Features the MC9S12ZVMC12, with a Voltage Regulator controller to supply an externalCAN transceiver

• MTRCKTSBNZVM128 – Motor Control Kit integrating the S12ZVML12EVBLIN Evaluation Board with a 3-phaseBLDC Motor with Hall sensor, running a sensorless control application using Back-EMF zero-crossing detection

1.1 EVB Features• MC9S12ZVML12MKH or MC9S12ZVMC12MKH microcontroller, 64LQFP package• BDM interface for MCU code download and debugging, via 6-pin header• On-board OSBDM for MCU code download and debugging, via USB connector• 6 N-channel Power MOSFETs in 3-phase half H-bridge array• Motor Control Interface:

• Hall Sensor• Resolver interface• SINCOS interface

• Connectivity:• LIN• CAN• USB-to-SCI serial port

• Phase and DC-bus current sensing circuits• LED indicators:

• Supply voltage indicator• Reset indicator• VDDX (MCU 5 V supply) indicator• FAULT indicator

• Over-voltage and over-current FAULT indicator with potentiometer adjustments• 2 general-purpose, user configurable LEDs• 2 general-purpose, user configurable push buttons• 1 general-purpose, user configurable switch• Optional 4 MHz external oscillator• 1 general-purpose Potentiometer

1.2 Board ArchitectureThe S12VMx12EVB Controller Board basic building blocks are depicted in the following figure.

Introduction

S12ZVM12EVB Evaluation Board User Guide, Rev. 2, 03/2016

2 Freescale Semiconductor, Inc.

Figure 1. S12ZVMx12EVB block diagram

The board is supplied by VBAT voltage in the range from 3.5 V to 26 V. The board includes a reverse battery protection FETto the output Field Effect Transistor (FET) power bridge, as well as a reverse battery protection diode to the logic supply. Aboost converter can be enabled by using the integrated boost controller and external inductor and diode components, for lowvoltage operation (VBAT < 7 V).

The S12ZVM microcontroller integrates the necessary regulation stages, so that VBAT is supplied directly to themicrocontroller device. The VDDX regulator integrated into the S12ZVM provides 5 V to the I/O stages of themicrocontroller.

The S12ZVM can supply 5 V to an external Hall sensor via the EVDD pin. Another integrated voltage regulator provides thenecessary voltages to drive the power MOSFETs.

The MCU also integrates a Gate Driver Unit to drive the power MOSFETs directly from the MCU pins, using externalbootstrap capacitors on the high side FETs. The GDU module includes a Charge Pump to enable 100% duty cycle driving onthe high side FETs. The GDU outputs are internally controlled by the Pulse Width Modulator with Fault Protection module(PMF) inside the MCU. The PMF module can drive the different channels independently or in complementary pairs, withautomatic dead time insertion.Several FAULT monitoring comparators are connected to the PMF’s external FAULT pin. Thesettings for FAULT triggering can be configured using on-board potentiometers.

Introduction

S12ZVM12EVB Evaluation Board User Guide, Rev. 2, 03/2016

Freescale Semiconductor, Inc. 3

Figure 2. MC9S12ZVM128MCB controller board

2 Interface Description

2.1 Power Supply, J54 or J58The S12VMx12EVB board can be supplied either by using the 2.1 mm DC power plug J54, or the alternate connector J58.The board can accept input voltage in the range from 3.5 V to 26 V. The board is protected against a reverse batterycondition.

2.2 Alternative Power Supply, J64 and J65The S12VMx12EVB board can also be supplied either by populating a blade terminal on both J64 (positive) and J65 (groundreference) for applications requiring higher current capabilities.

Interface Description

S12ZVM12EVB Evaluation Board User Guide, Rev. 2, 03/2016

4 Freescale Semiconductor, Inc.

2.3 3-Phase Motor Connector, J24Power outputs to the motor are located on connector J24. Phase outputs are labeled 0, 1, and 2. A permanent magnetsynchronous (PMSM) or a brushless DC (BLDC) motor phase windings can be connected into these connectors.

Table 1. 3-phase motor connector

Connector Signal name Description

J24 pin 1 Phase 0 Supplies power to motor phase A

J24 pin 2 Phase 2 Supplies power to motor phase C

J24 pin 3 Phase 1 Supplies power to motor phase B

2.4 Hall Sensor Interface, J11In Hall sensor based BLDC applications, the Hall sensor inputs are used to determine the actual motor rotor sector. The MCUis capable of providing a regulated 5 V supply to an external Hall sensor by the EVDD pin.

The signals from this connector can be routed to the timer related inputs on the MCU. The following table shows the pinoutdescription of the Hall Sensor connector interface.

Table 2. Hall Sensor connector interface

Interface pin Signal name MCU signal Description Direction

1 EVDD EVDD (PP0 throughJ14)

5 V supply to Hallsensor

Power Output

2 GND — Ground reference Power Reference

3 HALL_A/PH_A IOC1 (PT1 through J15) Hall sensor A Digital Input

4 HALL_B/PH_B IOC2 (PT2 through J16) Hall sensor B Digital Input

5 HALL_C/Index IOC3 (PT3) Hall sensor C Digital Input

6 — — (Not connected) —

2.5 Resolver Interface, J62In applications using a resolver sensor, the position of the rotor is encoded into sine and cosine signals indicating the shaftangle. A reference signal is generated out of an MCU timer pin. The sine and cosine signals can be routed to two differentADC channels, depending on the appropriate jumper configuration.

The resolver driver circuit shapes a rectangular reference signal from the timer port PT0 output to a sinusoidal waveform. Itconsists of an integrator that transforms the rectangular signal into a triangle. The higher harmonic components are filteredout by the following stage. The output of the filter stage drives the resolver reference winding (RES_GENP/RES_GENM).

The resolver sine and cosine signals are input into a conditioning circuitry that adjusts voltage levels down to the rangeacceptable to the on-chip ADC module.

Interface Description

S12ZVM12EVB Evaluation Board User Guide, Rev. 2, 03/2016

Freescale Semiconductor, Inc. 5

The following table shows the pinout description of the resolver connector interface.

Table 3. Resolver connector interface

Interface pin Signal name MCU signal Description Direction

1 RES_GENP (Linked to PT0) Resolver GeneratorPositive Output

Analog Output

2 RES_GENM (Linked to PT0) Resolver GeneratorNegative Output

Analog Output

3 RES_SIN AN0_0 (through J35) orAN0_3 (through J46) or

AN1_2 (through J51)

Resolver Sensor SINInput

Analog Input

4 RES_SIN_REF — Resolver Sensor SINReference

5 RES_COS AN1_1 (through J50) orAN1_3 (through J52)

Resolver Sensor COSInput

Analog Input

6 RES_COS_REF — Resolver Sensor COSReference

7 AGND — Analog groundreference

Power Reference

8 +5VA — 5 V supply voltage Power Supply

2.6 SINCOS Interface, J61An alternative simplified resolver interface is also available on the SINCOS connector.

The following table shows the pinout description of the SINCOS interface.

Table 4. Pinouts of SINCOS interface

Interface pin Signal name MCU signal Description Direction

1 PH_A IOC1 (PT1 through J15) Resolver Sensor PhaseA Output

Digital Input

2 RES_SIN AN0_0 (through J35) orAN0_3 (through J46) or

AN1_2 (through J51)

Resolver Sensor SINInput

Analog Input

3 PH_B IOC2 (PT2 through J16) Resolver Sensor PhaseB Output

Digital Input

4 RES_COS AN1_1 (through J50) orAN1_3 (through J52)

Resolver Sensor COSInput

Analog Input

5 AGND — Analog groundreference

Power Reference

6 +5 VA — 5 V supply voltage Power Supply

Interface Description

S12ZVM12EVB Evaluation Board User Guide, Rev. 2, 03/2016

6 Freescale Semiconductor, Inc.

2.7 CAN Connector, J8An external CAN transceiver is available on board and can be routed to the MCU MSCAN module.

Table 5. CAN connector

Interface pin Signal name MCU signal Description Direction

1 MSCAN_H RXCAN/TXCAN CAN Bus H Diff. bidirectional

2 MSCAN_L RXCAN/TXCAN CAN Bus L Diff. bidirectional

3 — — (Not connected) —

4 — — (Not connected) —

2.8 LIN Connector, J13The integrated LIN physical layer is used as the LIN interface.

Table 6. LIN connector

Interface pin Signal name MCU signal Description Direction

1 LGND — Ground reference Power Reference

2 LGND — Ground reference Power Reference

3 HD (VBAT) — Power Supply —

4 LIN LIN LIN Bus Digital bidirectional

2.9 LINPHY Header, J17The LINPHY interface header provides connections to the TXD and RXD functionality of the LIN physical layer integratedinto the MCU.

Table 7. LINPHY interface header

Interface pin Signal name MCU signal Description Direction

1 LPRXD LPRXD LIN Physical LayerRXD

Digital Output

2 LPTXD LPTXD LIN Physical Layer TXD Digital Input

Interface Description

S12ZVM12EVB Evaluation Board User Guide, Rev. 2, 03/2016

Freescale Semiconductor, Inc. 7

2.10 External BDM Connector, J34A BDM interface for MCU code download and debugging is provided.

Table 8. External BDM connector

Interface pin Signal name MCU signal Description Direction

1 BKGD BKGD Background Digital Input

2 GND — Ground reference Power Reference

3 PDO PS5/PDO Extended DBG moduledata output

Digital Output

4 RESET_B RESET Reset Digital Bidirectional

5 PDOCLK PS4/PDOCLK Extended DBG moduledata clock

Digital Output

6 VDDX_BDM VDDX 5 V supply to externalBDM interface

Power Supply

2.11 Extended DBG Module Header, J38The PDO and PDOCLK signals to the DBG extended debug module are available for interfacing with dedicated debughardware.

Table 9. Extended DBG module header

Interface pin Signal name MCU signal Description Direction

1 PDO PS5/PDO Extended DBG moduledata output

Digital Output

2 PDOCLK PS4/PDOCLK Extended DBG moduledata clock

Digital Output

2.12 BDM Connector for OSBDM Microcontroller, J1A BDM interface is provided to load code to the OSBDM microcontroller, U1.

Table 10. BDM connector for OSBDM microcontroller

Interface pin Signal name OSBDM MCU signal Description Direction

1 U_BKGD BKGD Background Digital Input

2 GND — Ground reference Power Reference

3 — — (Not connected) —

4 U_RESET RESET Reset Digital Bidirectional

5 — — (Not connected) —

6 +5 VU VDD1 5 V supply fromOSBDM USB interface

Power Supply

Interface Description

S12ZVM12EVB Evaluation Board User Guide, Rev. 2, 03/2016

8 Freescale Semiconductor, Inc.

2.13 USB Connector for OSBDM Microcontroller, J7This USB interface is used to communicate with a PC as an interface to load and debug code to the microcontroller. TheOSBDM tool also may enable a virtual serial port that can be routed to SCI1 serial port in the MCU, at pins PS2 and PS3, bysetting the appropriate registers.

Table 11. USB Connector for OSBDM microcontroller

Interface pin Signal name MCU signal Description Direction

1 +5VU — USB Power Supply Power Supply

2 D- PS2/PS3 or RESET/BKGD

Data - Digital Bidirectional

3 D+ PS2/PS3 or RESET/BKGD

Data + Digital Bidirectional

4 GND — Ground reference Power Reference

2.14 USB Connector for USB-to-SCI Interface, J25This USB interface is used to communicate with a PC as an interface to a virtual serial port.

Table 12. USB Connector for USB-to-SCI interface

Interface pin Signal name MCU signal Description Direction

1 VBUS_USB — USB Power Supply Power Supply

2 D- PS2/PS3 Data - Digital Bidirectional

3 D+ PS2/PS3 Data + Digital Bidirectional

4 GND_USB — Ground reference Power Reference

2.15 MCU Port P Header, J21The MCU signals from GPIO port P can be monitored using this header.

Table 13. MCU Port P header

Interface pin MCU signal Pin functionality

1 PP0 PP0/EVDD1/KWP0/(PWM0)/ECLK/FAULT5/XIRQ

2 PP1 PP1/KWP1/(PWM1)/IRQ

3 PP2 PP2/KWP2/(PWM2)

4 GND Ground reference

Interface Description

S12ZVM12EVB Evaluation Board User Guide, Rev. 2, 03/2016

Freescale Semiconductor, Inc. 9

2.16 MCU Port E Header, J22The MCU signals from GPIO port E can be monitored using this header.

Table 14. MCU Port E header

Interface pin MCU signal Pin functionality

1 PE0 PE0/EXTAL

2 PE1 PE1/XTAL

3 GND Ground reference

2.17 MCU Port T Header, J23The MCU signals from GPIO port T can be monitored using this header.

Table 15. MCU Port T header

Interface pin MCU signal Pin functionality

1 PT3 PT3/IOC3/(SS)

2 PT2 PT2/IOC2/(PWM5)/(SCK)

3 PT1 PT1/IOC1/(PWM4)/(MOSI)/(TXD0)/LPDR1/PTURE

4 PT0 PT0/IOC0/(PWM3)/(MISO)/(RXD0)

5 GND Ground reference

2.18 MCU Port S Header, J31The MCU signals from GPIO port S can be monitored using this header.

Table 16. MCU Port S header

Interface pin MCU signal Pin functionality

1 PS0 PS0/KWS0/RXD1/RXCAN/(LPRXD)/PTUT0

2 PS1 PS1/KWS1/TXD1/TXCAN/(LPTXD)/PTUT1

3 PS2 PS2/KWS2/(RXD1)/MISO

4 PS3 PS3/KWS3/DBGEEV/(TXD1)/MOSI

5 PS4 PS4/KWS4/SCK/PDOCLK

6 PS5 PS5/KWS5/SS/PDO

7 GND Ground reference

Interface Description

S12ZVM12EVB Evaluation Board User Guide, Rev. 2, 03/2016

10 Freescale Semiconductor, Inc.

2.19 MCU Port AD Header, J41The MCU signals from GPIO port AD can be monitored using this header.

Table 17. MCU Port AD header

Interface pin MCU signal Pin functionality

1 PAD0 PAD0/KWAD0/AMP0/AN0_0

2 PAD1 PAD1/KWAD1/AMPM0/AN0_1

3 PAD2 PAD2/KWAD2/AMPP0/AN0_2

4 PAD3 PAD3/KWAD3/AN0_3/

5 PAD4 PAD4/KWAD4/AN0_4/

6 PAD5 PAD5/KWAD5/AMP1/AN1_0

7 PAD6 PAD6/KWAD6/AMPM1/AN1_1/(SS)

8 PAD7 PAD7/KWAD7/AMPP1/AN1_2

9 PAD8 PAD8/KWAD8/AN1_3/VRH

10 GND Ground reference

3 Design ConsiderationsThis section provides additional information about the functional blocks of the S12ZVMx12EVB motor control board.

3.1 MC9S12ZVM FeaturesThe MC9S12ZVM-Family is an automotive 16-bit microcontroller family using the 180 nm NVM + UHV technology thatoffers the capability to integrate 40 V analog components. The particular differentiating features of this family are theenhanced S12Z core, the combination of dual-ADC synchronized with PWM generation and the integration of “high-voltage”analog modules, including the voltage regulator (VREG), Gate Driver Unit (GDU) and a Local Interconnect Network (LIN)physical layer. These features enable a fully integrated single chip solution to drive up to 6 external power MOSFETs forBLDC or PMSM motor drive applications.

• S12Z CPU core• Memory

• 128, 64 or 32 KB on-chip flash with ECC• 512 byte EEPROM with ECC• 8, 4, or 2 KB on-chip SRAM with ECC

• Clock Modules• Phase locked loop (IPLL) frequency multiplier with internal filter• 1 MHz internal RC oscillator with +/-1.3% accuracy over rated temperature range• 4-16 MHz amplitude controlled pierce oscillator• Internal COP (watchdog) module• Autonomous periodic interrupt (API)

• Low side and high side FET pre-drivers for each phase• Gate drive pre-regulator• LDO (Low Dropout Voltage Regulator) (typically 11 V)• High side gate supply generated using bootstrap circuit with external diode and capacitor

Design Considerations

S12ZVM12EVB Evaluation Board User Guide, Rev. 2, 03/2016

Freescale Semiconductor, Inc. 11

• Sustaining charge pump with two external capacitors and diodes• High side drain (HD) monitoring on internal ADC channel using HD/5 voltage

• 6-channel, 15-bit pulse width modulator with fault protection (PMF)• Independent or complementary pair operation• Center-aligned or edge-aligned outputs• Dead time insertion available for each complementary pair

• Two parallel analog-to-digital converters (ADC) with 12-bit resolution and up to 9 channels available on external pins• Programmable Trigger Unit (PTU) for synchronization of PMF and ADC• Connectivity

• One on-chip LIN physical layer transceiver fully compliant with the LIN 2.1 standard (MC9S12ZVML12MKHversion)

• One serial communication interface (SCI) module with interface to internal LIN physical layer transceiver (withRX connected to a timer channel for frequency calibration purposes, if desired)

• Up to one additional SCI (not connected to LIN physical layer)• MSCAN (1 Mbit/s, CAN 2.0 A, B software compatible) module• One serial peripheral interface (SPI) module

• 4-channel timer module (TIM) with input capture/output compare• Voltage Regulator

• On-chip voltage regulator (VREG) for regulation of input supply and all internal voltages• Optional VREG ballast control output to supply an external CAN physical layer (MC9S12ZVMC12MKH

version)• 20 mA high-current output for use as Hall sensor supply

• Supply voltage sense with low battery warning• Chip temperature sensor• Two current sense circuits for over-current detection or torque measurement

3.2 Power SupplyThe S12ZVMx12EVB motor control board can be supplied from three different options. It can be supplied by J54 and J58and alternatively by populating blade terminals at locations J64 (positive supply) and J65 (ground). The battery connection tothe MCU main supply, VSUP, is protected against a reverse polarity condition, through diode D19. The capacitor C43 isprovided as a bulk capacitor to store energy and maintain MCU operation for a short duration upon loss of battery. Thecapacitor C38 is there to filter the voltage supply into the MCU pin.

3.2.1 Boost DC/DC ConverterThe board also provides the external components required to enable a boost DC/DC converter, using the BOOST controllerpin in the MCU, namely the inductor L7, and diodes D19 and D21. When the internal switch at the BOOST pin closes, thecurrent builds up through L7. When the switch opens, the current flows through D19 and into the storage capacitor, C43.Diode D21 provides protection to the BOOST pin in case of a reverse battery condition. If the VBAT node shown in thefigure below is already protected against a reverse battery condition, the diode D21 is not needed.

Design Considerations

S12ZVM12EVB Evaluation Board User Guide, Rev. 2, 03/2016

12 Freescale Semiconductor, Inc.

Figure 3. Boost DC/DC converter option

3.2.2 Bridge Supply (DC Link) Reverse Battery ProtectionA separate reverse battery protection is provided for the FET bridge voltage supply. In this case, a power n-channelMOSFET, Q9, is provided, with its source connected to the battery input. Using external components, a charge pump drivenby pin CP can be enabled to drive the reverse battery MOSFET. Additionally, a circuit is available on the board to enable afast turn-off of the n-channel MOSFET in case of a reverse battery condition, using an external bipolar transistor. Upon areverse battery condition, the bipolar transistor, Q10, turns on and isolates the HD pin from VBAT by opening the externalMOSFET.

Figure 4. Reverse Battery Protection and Charge Pump circuit

Design Considerations

S12ZVM12EVB Evaluation Board User Guide, Rev. 2, 03/2016

Freescale Semiconductor, Inc. 13

3.2.3 Charge Pump for High-Side Driver SupplyIn the Figure 4, there are two different implementations of charge pumps, using the same pin on the MCU. As describedbefore, the first charge pump drives the N-channel MOSFET for reverse battery protection based on components D25, D26,C34 and C107. The second charge pump, composed of C35, C40, D16, and D17, feeds a voltage into the MCU, through theVCP pin.

3.3 Voltage RegulatorsThe main 5 V regulator is a linear voltage regulator integrated into the MCU. It is supplied directly from the VSUP batteryinput pin and delivers up to 70 mA on a regulated 5 V output on pins VDDX1, VDDX2. In case a larger current is requiredout of the VDDX node, an external ballast PNP transistor is provided on board, which is controlled by the BCTL pin.

To enable the ballast transistor, a couple of bits in register CPMUVREGCTL need to be adjusted by software (EXTXON = 1,INTXON = 0). Additionally, a jumper needs to be placed on header J40, shorting pins 1 and 2.

Figure 5. External ballast transistor option

The maximum current capability of the ballast transistor will be highly dependent on the operating conditions (mainlytemperature and battery voltage). For example, the BCP53 PNP transistor on board is rated to 1.5 W at 25°C. At a nominalbattery voltage of 12 V, the estimated current capability of the transistor would be:

I = P / V, where V = (VSUP –VDDX) = 7 VI = 1.5 W / 7 V = 214 mA

3.4 CAN/LIN InterfacesThere are two versions of the S12ZVMx12EVB board:

• S12ZVML12EVBLIN, populated with the MC9S12ZVML12 device that integrates a LIN physical layer• S12ZVMC12EVBCAN, populated with the MC9S12ZVMC12 device that integrates a controller for a second 5 V

voltage regulator to supply an external CAN transceiver.

Design Considerations

S12ZVM12EVB Evaluation Board User Guide, Rev. 2, 03/2016

14 Freescale Semiconductor, Inc.

3.4.1 CAN/LIN EnablementThe EVB provides an array of 0-ohm resistors that are populated according to the variant of the S12VM device that ispopulated on the board. The following image shows the different resistor pairs. Only one resistor on each pair must bepopulated at a time.

Figure 6. Resistor selection for CAN/LIN options

Table 18. Populating Resistors for CAN/LIN Enablement

S12ZVML12MKH S12ZVMC12MKH

MCU Pin LIN LIN + CAN(*) CAN(*)

1 – LIN / BCTLC R41 R41 R32

64 – LGND / VDDC R33 R33 R42

4 – PS1 (LPTXD / TXCAN) R43 R34 R34

3 – PS0 (LPRXD / RXCAN) R44 R35 R35

Other settings

J3 (VDDC supplied from USB,J25)

Open Close Open

J2 (supply to VDDC regulator) Open Open Close

(*) Using external CAN transceiver

3.4.2 LIN Physical LayerThe LIN bus pin provides a physical layer for single-wire communication in automotive applications. The LIN physical layeris designed to meet the LIN Physical Layer 2.2 specification from LIN consortium.

The LIN physical interface pins (LPTXD and LPRXD) are available on a 2-pin header, J17. This can be used to interfaceanother MCU to the LIN physical interface integrated into the S12ZVML device.

The LIN bus includes an integrated pull-up device, which can be a strong pull-up (~34 Kiloohm) or a high impedance value(~300 Kiloohm), selectable by software. A 220 pF capacitor is added at the LIN bus pin, according to the devicerecommendation. ESD protection is provided in the form of two back-to-back diodes in a single package, D8.

By default, the EVB is configured to operate in slave mode. It can be converted into a Master node by populating a 1Kiloohm resistor at R45. The footprint in the PCB will hold a 0603 size surface mount resistor. This resistor is connected inseries with the diode required from the battery voltage node. In this case, the battery voltage is taken from the HD node, thesupply to the FET bridge high side drains.

Design Considerations

S12ZVM12EVB Evaluation Board User Guide, Rev. 2, 03/2016

Freescale Semiconductor, Inc. 15

Figure 7. LIN interface

3.4.3 CAN TransceiverThe EVB includes an external CAN transceiver that can be linked to the MSCAN module of the S12ZVM device, bypopulating the appropriate resistors as shown in Table 18.

In the CAN version of the EVB, the external transceiver can be powered by a voltage regulator controlled by theS12ZVMC12 microcontroller. An external PNP BJT ballast transistor is required to deliver regulated 5 V to the CANtransceiver. The base of the transistor must be connected to the BCTLC base control pin on the microcontroller. The collectorof the transistor must be connected to the VDDC pin on the microcontroller. A 5.6 kiloohm resistor is recommended from thebase to the emitter of the transistor. The emitter terminal must be supplied from the VSUP (reverse polarity protected) batterysupply. A jumper must be populated on header J2 to enable the supply to the transistor. The jumper on header J3 must not bepopulated in this case.

Figure 8. CAN Transceiver

In the LIN version of the EVB, the microcontroller can’t control the ballast transistor, because the VDDC and BCTLC pinsare replaced by the LIN and LGND pins of the LIN physical layer. However, the MSCAN module in the microcontroller canstill be linked to the external CAN transceiver. The transceiver 5 V supply can be powered from the USB connector, J25, aslong as a jumper is populated on header J3. In this case, the jumper on header J2 must be removed.

Design Considerations

S12ZVM12EVB Evaluation Board User Guide, Rev. 2, 03/2016

16 Freescale Semiconductor, Inc.

3.5 SCIThe S12ZVM EVB provides two different routing options to link one SCI module on the microcontroller to a USB port thatcould be easily connected to a personal computer.

3.5.1 SCI to USB (CP2102)The first alternative is to use the USB interface that is provided with the CP2102 USB to UART bridge. This interface isavailable through a Type B USB connector, J25, and is digitally isolated. A driver needs to be installed on the host computerto create a virtual serial COM port, linked to the USB port that is connected to the USB to UART bridge.

A couple of jumpers need to be populated on headers J27 and J28 from pin 2 to pin 3 on both headers. This links the SCI1pins from the microcontroller to the USB to UART bridge, through the digital isolator.

Figure 9. USB to SCI jumper options

3.5.2 SCI to USB (OSBDM)The second option to route the SCI1 port to a USB interface is by using the on-board OSBDM programmer. This interface isavailable through a Type B USB connector, J7. The necessary drivers to operate the serial interface provided by the OSBDMdevice should install the first time the EVB is connected to the computer through a USB cable.

In this case, a couple of jumpers need to be placed on headers J27 and J28 from pin 1 to pin 2 on both headers. This willroute the RXD and TXD signals from the SCI1 module, to the RXD and TXD signals from the OSBDM device.

3.6 3-Phase Power BridgeThe power stage is configured as a 3-phase Power Bridge with n-channel MOSFET transistors. The Gate Driver Unit (GDU)integrated into the MCU provides the supply voltage to the gates of the low-side and high-side MOSFETs. The GDU pins aredesigned to interface to external components in the automotive battery range, so they can be connected directly to theMOSFET terminals. For evaluation purposes, the connections from the GDU pins to the MOSFETs on the S12ZVM128EVBboard are done through a series of 0-ohm resistors.

The drivers for the low-side MOSFET gates are driven by the internal LDO regulator (VLS_OUT). Each driver uses the pinLSx as its reference, and supplies the voltage into pin LGx to drive the MOSFET gate.

The drivers for the high-side MOSFET gates are driven by the voltage stored in a bootstrap capacitor, which is external to theMCU. This voltage is derived from the LDO regulator through an external diode and fed into the bootstrap voltage VBSx pin.Each high-side driver uses the pin HSx as its reference, and supplies the bootstrap voltage into pin HGx to drive the high-sideMOSFET gate.

Design Considerations

S12ZVM12EVB Evaluation Board User Guide, Rev. 2, 03/2016

Freescale Semiconductor, Inc. 17

Figure 10. 3-phase output stage

3.7 Current SenseA set of four different resistors are provided on the board for current sensing in different applications. There is one currentsense resistor for each phase (R48, R56, R68), plus one resistor to sense the DC bus current (R71). The componentspopulated on the board are 10 milliohm, 1% tolerance resistors. Several different options are provided on the board to enablecurrent sense on multiple resistors at the same time. The MCU integrates two current sense amplifiers, and there are threeadditional amplifiers provided on board using external op-amps.

The two current sense amplifiers integrated into the MCU are mapped each to a different ADC module, to allow forsimultaneous conversions.

Option 1) Internal Op-Amp 0:

The internal current sense amplifier 0 is mapped to the ADC pins at PAD0, PAD1, and PAD2, with the followingconfiguration:

PAD0 = AMP0, the operational amplifier output.PAD1 = AMPM0, the operational amplifier inverting input (minus).PAD2 = AMPP0, the operational amplifier non-inverting input (plus).

Design Considerations

S12ZVM12EVB Evaluation Board User Guide, Rev. 2, 03/2016

18 Freescale Semiconductor, Inc.

Figure 11. Integrated current sense amplifiers

On this board, two different current sense resistors can be connected to the internal operational amplifier, by selecting theappropriate configuration using jumpers in J60 and J57. To measure the current from Phase A, the jumpers must be on J60pins 1-2 and on J57 pins 1-2. To measure the DC Bus current, the jumpers must be on J60 pins 2-3 and on J57 pins 2-3.

Table 19. Measurement of the DC Bus current

Header Setting Description

J60 1-2 Positive end of current sense fromPhase A

2-3 Positive end of current sense from DCBus

J57 1-2 Negative end of current sense fromPhase A

2-3 Negative end of current sense from DCBus

To map the operational amplifier to the AMPx pins, the following jumpers need to be placed, too: J35 pins 1-2, J44 pins 1-2,J45 pins 1-2.

The gain of the amplifier is set using external resistors where R198 = 199 = 2.2 kiloohm, and R196 = R200 = 40 kiloohm.With these resistor values, the gain of the amplifier is A = R196 / (R198 + 1K) = 40K/3.2K = 12.5. Please note thedenominator considers additional 1K in series, which is the resistor before the jumper that is used to select which senseresistor is connected to the operational amplifier.

The output voltage is shifted up by 2V5_REF, a 2.5 V supply which is mid range from the full scale voltage of the ADC, 5 V,to accommodate positive and negative current swings. The voltage shift can be eliminated by removing R196 and replacing itwith R197 instead.

Design Considerations

S12ZVM12EVB Evaluation Board User Guide, Rev. 2, 03/2016

Freescale Semiconductor, Inc. 19

Figure 12. Phase A/DC Bus current sense option

With the sense resistor value of 10 milliohms, and the gain being 12.5, the maximum excursion of +/- 2.5 V from the mid-range voltage of 2.5 V corresponds to a sensed current of 20 A:

Vamp, max = +/-2.5 VVsensed, max = (Vamp, max) / Gain = (+/-2.5V) / 12.5 = 0.2 VIsensed, max =( Vsensed, max) / Rsense = (+/-0.2V) / 0.01ohm = +/- 20 A.

Option 2) Internal Op-Amp 1:

The internal current sense amplifier 1 is mapped to the ADC pins at PAD5, PAD6, and PAD7, with the followingconfiguration:

PAD5 = AMP1, the operational amplifier output.PAD6 = AMPM1, the operational amplifier inverting input (minus).PAD7 = AMPP1, the operational amplifier non-inverting input (plus).

This amplifier has fixed connections to the Phase B current sense resistor. The external gain setting resistors have the samevalues as described before. It is also connected to a 2.5 V reference to allow for positive and negative current swings.

Design Considerations

S12ZVM12EVB Evaluation Board User Guide, Rev. 2, 03/2016

20 Freescale Semiconductor, Inc.

Figure 13. Phase B current sense using internal Op-Amp 1

Option 3) External Op-Amps:

There is an option to use op-amps provided on-board, external to the MCU, to sense the current from each of the threephases, routed to three different ADC channels.

The gain setting resistors have the same values as in the previous two cases, with the connection to a 2.5V reference voltagefor positive and negative current swings.

Design Considerations

S12ZVM12EVB Evaluation Board User Guide, Rev. 2, 03/2016

Freescale Semiconductor, Inc. 21

Figure 14. Phase A current sense using external Op-Amp

3.8 ADC Channel MappingThe following figures show the jumper configurations for the different ADC external channel mapping options:

Figure 15. Resolver interface plus 3-phase sensing

Design Considerations

S12ZVM12EVB Evaluation Board User Guide, Rev. 2, 03/2016

22 Freescale Semiconductor, Inc.

Figure 16. Resolver interface plus 1-phase sensing

Figure 17. Resolver interface plus 2-phase sensing

3.9 Hall Sensor InterfaceThe Hall sensor interface is used for BLDC sensor based motor control applications. The Hall sensors are used to determinethe actual motor rotor sector.

The on-board interface provides the 5 V power supply voltage to supply the sensors. The Hall interface inputs are designed tosupport an open collector as well as push-pull Hall sensors outputs (see Figure below). A single pole RC low pass filter ispresent to reduce a signal noise.

Design Considerations

S12ZVM12EVB Evaluation Board User Guide, Rev. 2, 03/2016

Freescale Semiconductor, Inc. 23

Figure 18. Hall Sensor Interface

The three signals from the Hall sensor need to be routed to the appropriate timer pins on the microcontroller. For Phase A, ajumper must be placed on pins 2-3 of header J15. For Phase B, a jumper must be placed on pins 1-2 of header J16. For phaseC, there is a 0-ohm resistor that links it directly to the microcontroller pin PT3.

Figure 19. Hall Sensor routing options

Design Considerations

S12ZVM12EVB Evaluation Board User Guide, Rev. 2, 03/2016

24 Freescale Semiconductor, Inc.

The next figure shows the Hall sensor signal alignment to BLDC motor Back-EMF signal. The Hall sensors detect the rotorflux, so their actual state is not influenced by stator current. The Hall effect outputs in BLDC motors divide the electricalrevolution into three equal sections of 120°. In this so-called 120° configuration, the Hall states 111 and 000 never occur.

Figure 20. BLDC motor back-EMF and Hall sensor signal alignment

Based on the Hall sensor signal, the BLDC motor commutation table is developed. An example is shown in the next table.The right-hand side of the table shows the Hall sensors signal, while the left side applied phase voltage.

Table 20. BLDC motor commutation example

Commutation Vector Vector Hall sensor pattern definition Hall sensorpattern resultPhase A Phase B Phase C Hall Sensor C Hall Sensor B Hall Sensor A

NC +VDCB -VDCB A 1 0 1 6

-VDCB +VDCB NC B 1 0 0 5

-VDCB NC +VDCB C 1 1 0 4

NC -VDCB +VDCB D 0 1 0 3

+VDCB -VDCB NC E 0 1 1 2

+VDCB NC -VDCB F 0 0 1 1

3.10 Resolver InterfaceThe resolver interface is included to observe motor rotor position. The board is populated with the hardware interface tomeasure motor position and speed. The resolver connector can be connected to J62.

For detailed description, see application note AN1942 or patent WO/2007/137625.

Design Considerations

S12ZVM12EVB Evaluation Board User Guide, Rev. 2, 03/2016

Freescale Semiconductor, Inc. 25

Figure 21. Resolver interface connector

3.10.1 Resolver Generator InputsThe jumpers J59 and J56 provide positive input to differential amplifiers. For resolver sensor use, pins two and three shouldbe shorted. The resolver interface analog signals POS_SIN and POS_COS are available to be routed to the ADC pins, asdescribed in ADC Channel Mapping.

Additionally, the POS_SIN and POS_COS signals pass through a comparator stage, to deliver two digital signals that can betreated as two phase signals RES_PH_A and RES_PH_B. Jumpers must be placed on headers J39 and J49, pins 2-3,respectively. These signals can then be routed to the microcontroller Timer inputs, by populating the proper jumpers. ForPhase A, a jumper must be placed on pins 2-3 of header J15. For Phase B, a jumper must be placed on pins 1-2 of header J16.For phase C, there is a 0- ohm resistor that links it directly to the microcontroller pin PT3.

Figure 22. Resolver input interface

Design Considerations

S12ZVM12EVB Evaluation Board User Guide, Rev. 2, 03/2016

26 Freescale Semiconductor, Inc.

3.10.2 Resolver Generator OutputThe RES_GEN source signal is output from TIM0 timer module, PT0. The output signal level is set up by trimmer R78.

Figure 23. Resolver output interface

3.11 User InterfaceSeveral general-purpose features are available on board, and are configurable by the user for different applications.

3.11.1 LEDsTwo LEDs are available as general purpose features, mapped to port S, pins PS4 and PS5. To enable each LED, a jumpermust be populated on header J37 and J53, respectively. Because the PS4 and PS5 pins are also available as part of theextended debug option, care must be taken when populating the jumpers on headers J37 and J53.

Figure 24. User LED options

Design Considerations

S12ZVM12EVB Evaluation Board User Guide, Rev. 2, 03/2016

Freescale Semiconductor, Inc. 27

3.11.2 Push ButtonsTwo momentary push buttons are available on the board as general-purpose features, mapped to port P pins PP1 and PP2.Both push buttons are connected in an active low configuration, pulled up to VDDX through a 4.7 kiloohm resistor each. Toenable each push button, a jumper must be populated on header J19 and J20, respectively.

Figure 25. User push button options

3.11.3 SwitchA SPDT mechanical switch is provided as a general-purpose feature, mapped to port PT1. It provides an active low input,pulled up to VDDX through a 4.7 kiloohm resistor when the switch is in the “open” position. Because PT1 could be used as a“Phase A” input from a Resolver, a Hall Sensor, or a Quadrature Encoder, care must be taken when populating the jumper onJ9 that links the SPDT switch to port PT1.

Figure 26. User switch option

Design Considerations

S12ZVM12EVB Evaluation Board User Guide, Rev. 2, 03/2016

28 Freescale Semiconductor, Inc.

3.11.4 PotentiometerA potentiometer is provided on board, to simulate a general-purpose analog signal feed to the microcontroller. As highlightedin the ADC routing options shown in ADC Channel Mapping, it can be mapped to either PAD4 (channel 4 of module ADC0)or PAD7 (channel 2 of module ADC1).

The Potentiometer is enabled by placing a jumper on header J30, providing 5 V from the analog supply, VDDA, to one endof the potentiometer while the other end is grounded. To map the potentiometer to PAD4, a jumper must be placed on J47,from pin 2 to pin 3. To map it to PAD7, a jumper must be placed from J51 pin 2 to J42, instead.

Figure 27. Potentiometer configuration options

4 Motor Control Kit Board Set-UpThe S12ZVML12EVBLIN is also available as part of a motor control kit that includes a 3-phase BLDC motor, along with theapplication code to run the BLDC motor with sensorless control using Back-EMF zero-crossing detection. The MotorControl Kit based on the S12ZVML128 MCU can be ordered at http://www.freescale.com/AutoMCDevKits.

Motor Control Kit Board Set-Up

S12ZVM12EVB Evaluation Board User Guide, Rev. 2, 03/2016

Freescale Semiconductor, Inc. 29

Figure 28. S12ZVM BLDC motor control kit

5 Electrical CharacteristicsThe electrical characteristics in the table apply to an operation at 25 °C.

Table 21. Electrical Characteristics

Characteristic Symbol Min Typ Max Units

Power SupplyVoltage

VDC 7 12 20 V

Extended PowerSupply Voltage

VDC-EXT 3.5 12 26 V

CurrentConsumption1

ICC - 100 - mA

1. 12 V Power Supply, MCU without software

6 ReferencesAll the references can be found in freescale.com.

1. MC9S12ZVM Family Reference Manual, MC9S12ZVMRM2. S12ZVML12EVBQSG, Quick Start Guide for S12ZVML12EVB evaluation board

Electrical Characteristics

S12ZVM12EVB Evaluation Board User Guide, Rev. 2, 03/2016

30 Freescale Semiconductor, Inc.

3. MTRCKTSBNZVM128QSG, Quick Start Guide for 3-Phase Sensorless BLDC Motor Control Development Kit withS12 MagniV MC9S12ZVML128 MCU

4. AN4704, Application Note, 3-phase Sensorless BLDC Motor Control Kit with the S12 MagniV MC9S12ZVM5. AN1942, Application Note, 56F80x Resolver Driver and Hardware Interface

7 S12ZVMxEVB Board SchematicsFor a complete list of schematics, see s12zvm-evaluation-board:S12ZVMEVB

S12ZVMxEVB Board Schematics

S12ZVM12EVB Evaluation Board User Guide, Rev. 2, 03/2016

Freescale Semiconductor, Inc. 31

How to Reach Us:

Home Page:freescale.com

Web Support:freescale.com/support

Information in this document is provided solely to enable system andsoftware implementers to use Freescale products. There are no expressor implied copyright licenses granted hereunder to design or fabricateany integrated circuits based on the information in this document.Freescale reserves the right to make changes without further notice toany products herein.

Freescale makes no warranty, representation, or guarantee regardingthe suitability of its products for any particular purpose, nor doesFreescale assume any liability arising out of the application or use ofany 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 data sheetsand/or specifications can and do vary in different applications, andactual performance may vary over time. All operating parameters,including “typicals,” must be validated for each customer application bycustomer's technical experts. Freescale does not convey any licenseunder its patent rights nor the rights of others. Freescale sells productspursuant to standard terms and conditions of sale, which can be foundat the following address: freescale.com/SalesTermsandConditions.

Freescale and the Freescale logo are trademarks of FreescaleSemiconductor, Inc., Reg. U.S. Pat. & Tm. Off. MagniV is trademark ofFreescale Semiconductor, Inc. All other product or service names arethe property of their respective owners.

© 2016 Freescale Semiconductor, Inc.

Document Number MC9S12ZVM128MCBUGRevision 2, 03/2016