hands-on workshop: body controller training€¦ · tm freescale semiconductor proprietary...
TRANSCRIPT
TM
Freescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008.
Hands-on Workshop: Body Controller TrainingFA108
Petr Cholasta, System Application EngineerPetr Fajmon, System Application Engineer
October 7th, 2008
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 1
AgendaBody Electronics IntroductionBCU Demonstration Board features Introduction to Analog Freescale Solutions for BodyTraining Platform IntroductionLow Power Modes
• LAB1 – Sleep Mode (VDD OFF)• LAB2 – Stop Mode (VDD ON)
Lighting • LAB3 – Direct Output Control • LAB4 – Dimming with Self PWM• LAB5 – Protections and Diagnostics• LAB6 – Current Sensing
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 2
Agenda
Body Electronics IntroductionBCU Demonstration Board features Introduction to Analog Freescale Solutions for BodyTraining Platform IntroductionLow Power Modes
• LAB1 – Sleep Mode (VDD OFF)• LAB2 – Stop Mode (VDD ON)
Lighting • LAB3 – Direct Output Control • LAB4 – Dimming with Self PWM• LAB5 – Protections and Diagnostics• LAB6 – Current Sensing
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 3
BCU Mission
Lights Door System
• Window Lift • Mirror Unit• Door Lock
HVAC Heating, Ventilation, Air Condition RKE Remote Keyless Entry (Car Key Fob)
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 4
CAN P/L
LIN P/LLIN P/LLIN P/L
Generic Body Control ModuleOutput blocksProcessing blockInput / Output blocks
Vreg
CAN
Watchdog
CAN
Wakeup
HC9S08HC9S12XMPC55XXMPC560X
SPI
SPI
ElectricMotor drivers
LIN
CANCAN
LIN
Switch inputs
Analog inputs
High side drivers
Low side drivers
SPIRKESPI
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 5
High End Body Controller EVB
Processing
High Side & Low Side High Power Outputs (8 x 20A, 4x 10A, 8x 1A)
Digital & Analog Inputs/ Low Power Outputs
(44x)
Communications (6x LIN, 5x CAN, 1x FlexRay, 1x RS232)
RKE (FSK, ON-OFF)
Motor Driver (5A H-bridge)
Power supply, Watchdog,
Wake-up
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 6
Real Lighting Module Example - Size and Layout
85mm X 50mm16 outputs = 55A @ 85°C
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 7
AgendaBody Electronics Introduction
BCU Demonstration Board features Introduction to Analog Freescale Solutions for BodyTraining Platform IntroductionLow Power Modes
• LAB1 – Sleep Mode (VDD OFF)• LAB2 – Stop Mode (VDD ON)
Lighting • LAB3 – Direct Output Control • LAB4 – Dimming with Self PWM• LAB5 – Protections and Diagnostics• LAB6 – Current Sensing
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 8
High-End Body Controller Example – IC Level
MCU daughter cardS08DZ60, S12XE or
MPC5516
eXtreme switches Gen IIIMC15XS3400, MC35XS3400, MC10XS3412
MSDIMC33972
HS-CANPhysical Interface
MC33902
LINPhysical Interface
MCZ33661
RS232FreeMASTER Interface
COSS LiteMC33879
ECHO+MC33696
H-bridge MC33887
System Basis ChipMC33905
FlexRay™Physical Interface
SPITM
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 9
BCU High End Demonstration Using MPC5516
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 10
AgendaBody Electronics IntroductionBCU Demonstration Board features
Introduction to Analog Freescale Solutions for BodyTraining Platform IntroductionLow Power Modes
• LAB1 – Sleep Mode (VDD OFF)• LAB2 – Stop Mode (VDD ON)
Lighting • LAB3 – Direct Output Control • LAB4 – Dimming with Self PWM• LAB5 – Protections and Diagnostics• LAB6 – Current Sensing
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 11
CAN P/L
LIN P/LLIN P/LLIN P/L
Generic Body Control ModulePower Supply, Watchdog and Communication
Output blocksProcessing blockInput / Output blocks
Vreg
CAN P/L
Watchdog
CAN
Wakeup
HC9S08HC9S12XMPC55XXMPC560X
SPI
SPI
Motor drivers
LIN P/L
CAN P/LCAN
LIN
Switch inputs
Analog inputs
High side drivers
Low side drivers
SPIRKESPI
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 12
High-End Body Controller EVB – IC Level
HS-CANPhysical Interface
MC33902
LINPhysical Interface
MCZ33661
System Basis ChipMC33905
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 13
SBC Simplified Application Diagram
Low Drop Out Linear Regulator• Current Limit, Over Voltage and Temp Protection • 5V or 3.3V (Part Number Selectable)•150mA MAX current capability w/o ballast• 300mA MAX current capability w/external ballast transistor (optional)• +/- 2% Accuracy
Embedded 5 Volt CAN Regulator• Over Current, over Temp and UndervoltageDetection and Protection.• 2.2uF Min de-coupling Capacitor.• Default ON at power up and user defined thereafter
VSup1 and VSup2• VSup1 – VDD• VSup2 – Vaux, 5V-CAN, LIN Interface• Undervoltage detect (6V): can generate interrupt• Loss of Battery (3V): generates POR• Normal Mode: ~7mA• Low Power VDD ON (stop mode): ~25uA• Low Power VDD OFF (sleep mode): ~15uA
Safe Pin• Asserted ‘Low’ in the event of a Fault• Can drive Safe Circuitry isolated from SBC and MCU• Safe Mode Operation selectable through resistor on DBG pin.
Low Drop Out Auxiliary Linear Regulator• Current Limit, Over Voltage Protection • 5V or 3.3V SPI Configurable• 250mA MAX current capability w/external ballast transistor (Required)
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 14
SBC Simplified Application DiagramSPI• 8MHz MAX Frequency• 16 bits • Optional Parity• Multiple of 8 clock pulses messaging (otherwise ignored)• Secured SPI• Write registers can be read back for device configuration and flags set• CSB short to GND detection
VSense pin• Direct connection to battery (before Reverse Battery Diode) through a resistor.• Battery monitoring• Undervoltage Detection• Voltage can be measured as output on MUX
MUX• Outputs internal voltage into MCU’sA/D• VSup1, VSense, I/O0, I/O1, VRef (2.5), Die Temp, VDD Current (SPI Selectable)• Output is clamped at VDD voltage
I/Os• SPI Configurable• High-Side or Low Side configurable• LIN Terminal1 and LIN Terminal2 can be SPI configured to High-Side switches or Wake-Up inputs.
CAN Transceiver• ISO11898-2 and 11898-5 Compliant• 40kb/s to 1Mb/s Baud Rate compatible• Slow, Medium, Fast Slew rates (SPI Selectable)• BUS Failure Diagnostics• TX/RX Mode• Listen Only Mode• Sleep Mode LIN Transceiver/s
• LIN 2.X Compliant and SAE J2602 Compatible• Slow (10.4kb/s), Medium (20kb/s), Fast Slew rates [SPI Selectable]• LIN Output Termination Switch (configurable) – short to GND protection
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 15
CAN P/L
LIN P/LLIN P/LLIN P/L
Generic Body Control ModuleDigital and Analog Inputs
Output blocksProcessing blockInput / Output blocks
Vreg
CAN P/L
Watchdog
CAN
Wakeup
HC9S08HC9S12XMPC55XXMPC560X
SPI
SPI
Motor drivers
LIN P/L
CAN P/LCAN
LIN
Switch inputs
Analog inputs
High side drivers
Low side drivers
SPIRKESPI
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 16
High-End Body Controller EVB – IC Level
MSDIMC33972
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 17
Multiple Switch Detection Interface(MC33993, MC33972)
The Multiple Switch Detection Interface (MSDI) is a monolithic IC that performs switch monitoring functions. The device can be used to detect the closing and opening of up to 22 switch contacts.One MSDI device can replace 66 SMD devicesMSDI can handle a multitude of common I/O needs in embedded systems (Analog mux, FETs, LEDs, power sensors)
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 18
CAN P/L
LIN P/LLIN P/LLIN P/L
Generic Body Control ModuleOutput Drivers
Output blocksProcessing blockInput / Output blocks
Vreg
CAN P/L
Watchdog
CAN
Wakeup
HC9S08HC9S12XMPC55XXMPC560X
SPI
SPI
Motor drivers
LIN P/L
CAN P/LCAN
LIN
Switch inputs
Analog inputs
High side drivers
Low side drivers
SPIRKESPI
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 19
High-End Body Controller EVB – IC LeveleXtreme switches Gen III
MC15XS3400, MC35XS3400, MC10XS3412
COSS LiteMC33879
H-bridge MC33887
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 20
High Side Drivers for Interior and Exterior Lighting
Protection and diagnostic• Over temperature• Over current• Over/Under voltage• Short circuit• Reverse battery• Loss of ground/Vbat• Energy discharge protection
SPI Interface• Easy connection to the uP• Programmability• Daisy chain using SPI• Programmable overcurrent trip level
Watchdog• SPI controled
PWM Module• Calibration• 120Hz Oscillator
SMARTMOSTM
HDTMOSTM
Best-in-class MOSFET•1.7mOHM typ. at 25°C•2.9mOhm typ at 150°C
Protection in the power stage• Temperature sensor• Current sensor
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 21
LABs Hardware
MCU daughter cardMC9S12XEP100
eXtreme switche Gen IIIMC10XS3412
MSDIMC33972
System Basis ChipMC33905
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 22
AgendaBody Electronics IntroductionBCU Demonstration Board features Introduction to Analog Freescale Solutions for Body
Training Platform IntroductionLow Power Modes
• LAB1 – Sleep Mode (VDD OFF)• LAB2 – Stop Mode (VDD ON)
Lighting • LAB3 – Direct Output Control • LAB4 – Dimming with Self PWM• LAB5 – Protections and Diagnostics• LAB6 – Current Sensing
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 23
Basic BCU Demo Set Up For This Training
Input Switchesto MSDI #1
J6 is the power supply input
MSDI #1:MC33972
LEDs D22to D33
show load status
eXtreme SwitchMC10XS3412
eXtreme SwitchHigh Side Outputs
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 24
Initializations within main();
Task Handler (timer based)
First task
Second task
Third task
Scheduler’s Basic Example in CodeWarriorCompile Download
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 25
AgendaBody Electronics IntroductionBCU Demonstration Board features Introduction to Analog Freescale Solutions for BodyTraining Platform Introduction
Low Power Modes• LAB1 – Sleep Mode (VDD OFF)• LAB2 – Stop Mode (VDD ON)
Lighting • LAB3 – Direct Output Control • LAB4 – Dimming with Self PWM• LAB5 – Protections and Diagnostics• LAB6 – Current Sensing
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 26
LABs Hardware
MCU daughter cardMC9S12XEP100
eXtreme switche Gen IIIMC10XS3412
MSDIMC33972
System Basis ChipMC33905
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 27
Sleep Mode: VDD OFF
SBC
MCU
MSDI
eXtreme Switch
SPI
KeyWake/ IO
VDDLow Power mode≈1uA@IPWR
Low Power modeWaking up periodically to
monitor SW inputs≈70uA
Low Power mode≈15uA
Total≈86uA
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 28
Sleep Mode: VDD OFF
SBC
MCU
MSDI
eXtreme Switch
SPI
KeyWake/ IO
VDD
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 29
LAB1 – Sleep Mode (VDD OFF)
Please open: LAB1_Sleep_Mode.mcp
Go to main.c
app_boardLowPower.c
Contains functions for the different low power modes!
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 30
LAB1 – Sleep Mode (VDD OFF) Operation
SG0 Enters application into
Low Power mode
SG1 to SG8 can wake it up
In normal mode HS0
output will be flashing
Can you notice the time it takes for the light to start flashing?
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 31
Thread #2 handles low power modes
If SG0 in MSDI_1 is ON, we enter sleep mode
Call Functions that slept Analog ICs
This portion toggles HS0 of
MC10X3412
LAB1 – Sleep Mode (VDD OFF)
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 32
AgendaBody Electronics IntroductionBCU Demonstration Board features Introduction to Analog Freescale Solutions for BodyTraining Platform IntroductionLow Power Modes
• LAB1 – Sleep Mode (VDD OFF)• LAB2 – Stop Mode (VDD ON)
Lighting• LAB3 – Direct Output Control • LAB4 – Dimming with Self PWM• LAB5 – Protections and Diagnostics• LAB6 – Current Sensing
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 33
STOP Mode: VDD ON
MSDI
eXtreme Switch
SPI
Key
Wake/ IO
VDD
Low Power mode≈25uA
MCU
SBC
Low Power modeWaking up periodically to
monitor SW inputs≈70uA@IPWR
+≈10uA@IVDD
system stop, system pseudo stop or system
wait mode.(S12XEP100 Example)
Low Power mode≈1uA@IPWR
+≈ 5uA MAX@IVDD
Low Power mode Stop
≈100uA
Total≈211uA
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 34
STOP Mode: VDD ON
MSDI
eXtreme Switch
SPI
Key
Wake/ IO
VDD
MCU
SBC
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 35
LAB2 – Stop Mode (VDD ON) Operation
SG0 Enters application into
Stop Mode
In normal mode HS0
output will be flashing
IRQ2 will wake board up!
Higher standby current but very small delay to starting up system!
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 36
LAB2 – Stop Mode (VDD ON)
Please open: LAB2_Stop_Mode.mcp
Go to main.c
app_boardLowPower.c
Contains a lot functions for different low power modes!
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 37
Thread #2 manages low power modes
If SG0 in MSDI_1 is ON, we enter stop mode
Call Functions that slept Analog ICs
This portion toggles HS0 of
MC10X3412
LAB2 – Stop Mode (VDD ON)
Waking up application starts at this point
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 38
LAB 1 and LAB2 Sum Up
Sum-up:VDD OFF (Sleep Mode):
Total Supply Current 86uAVDD ON (Stop Mode):
Total Supply Current 211uA
Sleep Mode x Stop Mode:Total Supply Current consumption less than ½ comparing to Stop ModeWake up time is longer comparing to Stop Mode
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 39
AgendaBody Electronics IntroductionBCU Demonstration Board features Introduction to Analog Freescale Solutions for BodyTraining Platform IntroductionLow Power Modes
• LAB1 – Sleep Mode (VDD OFF)• LAB2 – Stop Mode (VDD ON)
Lighting • LAB3 – Direct Output Control• LAB4 – Dimming with Self PWM• LAB5 – Protections and Diagnostics• LAB6 – Current Sensing
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 40
LABs Hardware
MCU daughter cardMC9S12XEP100
eXtreme switche Gen IIIMC10XS3412
MSDIMC33972
System Basis ChipMC33905
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 41
eXtreme Switch Gen III Resources MCU Resources UsageUsing eXtremeSwitch Quad Devices
SW1
SW2
SWn
LO lp
STOP lp
TURN lp
HI lp
SISOSCLKCSB
RSTB
FLTB
WAKE
HS1
HS2
HS3
HS4
Quad Gen III
LO lp
STOP lp
TURN lp
HI lp
SISOSCLKCSB
RSTB
FLTB
WAKE
HS1
HS2
HS3
HS4
Quad Gen III
DO
DI
CLK
RSTB
FLTB
WAKE
CSB
MCU
PWM_CLK
IN0
IN0
One PWM signal only
Low MCU resources: Duty cycle and phase shift managed by the eXtremeSwitch (SPI)
Fault management need NOT be synchronized to the signal
8 MCU pins needed7 x standard I/O’s
1 x AD Inputs15 resistors
24 MCU pins needed16 x standard I/O’s
8 x AD Inputs24 resistor
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 42
LAB 3 – Direct Output Control
TP20/CS_MC10XS3412
C8822n
C8622n
C8922n
C8722n
MISO
MOSI
SCLK
R146 100k
TP21/FS_MC10XS3412
R147 100k
R148 100k
R149 100k
R150 100k
+
C83100uF35V
R100 0
R98 0
R102 0
/FS_MC10XS3412
HS12
R10610k
+5V_B
U15
MC10XS3412
IN02
IN13
IN25
IN36
CSNS1
FS7
WAKE8
RST9
CS10
SCLK11
SI12
VD
D13
P_G
ND
14
GN
D17
GN
D23
VP
WR
15
SO16
HS318
HS119
HS021
HS222
NC4
NC20
FSI24
+5V_B
HS9
IN0_MC10XS3412
R109
100k
R1112.5k, 1%
IN1_MC10XS3412
VSUP_PWR
C9022nF
HS11
IN3_MC10XS3412
IN2_MC10XS3412
/RST_MC10XS3412
HS10
R104 6.8K 1%
CSNS_MC10XS3412
+
C8210uF6V3
C84100n
+ C851.0uF35V
1 2
/CS_MC10XS3412R153 10k
WAKE_MC10XS3412
R156 10k
Direct output control
SPI communication
HS0 – Dim control using PWM generated by MC9S12XEP100 XGATE co-processor HS1 – ON/OFF control using driven by SG0 (MSDI & MC9S12XEP100) HS2 – Automatic toggle (MC9S12XEP100)
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 43
LAB3 – Direct Output Control
Open:
LAB3_Lighting_direct_control.mcp
eXtreme Switches configuration for direct control
PWM requires PWM /timer from MCU
eXtreme Switches watchdog clear needed
ON/OFF control = GPIO toggling
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 44
AgendaBody Electronics IntroductionBCU Demonstration Board features Introduction to Analog Freescale Solutions for BodyTraining Platform IntroductionLow Power Modes
• LAB1 – Sleep Mode (VDD OFF)• LAB2 – Stop Mode (VDD ON)
Lighting • LAB3 – Direct Output Control • LAB4 – Dimming with Self PWM• LAB5 – Protections and Diagnostics• LAB6 – Current Sensing
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 45
LAB 4 – Dimming Using Self PWM
TP20/CS_MC10XS3412
C8822n
C8622n
C8922n
C8722n
MISO
MOSI
SCLK
R146 100k
TP21/FS_MC10XS3412
R147 100k
R148 100k
R149 100k
R150 100k
+
C83100uF35V
R100 0
R98 0
R102 0
/FS_MC10XS3412
HS12
R10610k
+5V_B
U15
MC10XS3412
IN02
IN13
IN25
IN36
CSNS1
FS7
WAKE8
RST9
CS10
SCLK11
SI12
VD
D13
P_G
ND
14
GN
D17
GN
D23
VP
WR
15
SO16
HS318
HS119
HS021
HS222
NC4
NC20
FSI24
+5V_B
HS9
IN0_MC10XS3412
R109
100k
R1112.5k, 1%
IN1_MC10XS3412
VSUP_PWR
C9022nF
HS11
IN3_MC10XS3412
IN2_MC10XS3412
/RST_MC10XS3412
HS10
R104 6.8K 1%
CSNS_MC10XS3412
+
C8210uF6V3
C84100n
+ C851.0uF35V
1 2
/CS_MC10XS3412R153 10k
WAKE_MC10XS3412
R156 10k
SPI communication
No direct inputs
The eXtreme Switch can do PWM without a PWM timer module in the MCU.
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 46
eXtreme Switches configuration for self PWM control
With a single SPI message we can control ON/OFF and
setup PWM duty Cycle
Watchdog is automatically refreshed with any SPI message
We change PWM duty Cycle up and down smoothly.
LAB4: Dimming Using Self PWMOpen:
LAB4_Lighting_SelfPWM.mcp
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 47
AgendaBody Electronics IntroductionBCU Demonstration Board features Introduction to Analog Freescale Solutions for BodyTraining Platform IntroductionLow Power Modes
• LAB1 – Sleep Mode (VDD OFF)• LAB2 – Stop Mode (VDD ON)
Lighting • LAB3 – Direct Output Control • LAB4 – Dimming with Self PWM• LAB5 – Protections and Diagnostics• LAB6 – Current Sensing
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 48
LAB 5 – Diagnostics and Protection
TP20/CS_MC10XS3412
C8822n
C8622n
C8922n
C8722n
MISO
MOSI
SCLK
R146 100k
TP21/FS_MC10XS3412
R147 100k
R148 100k
R149 100k
R150 100k
+
C83100uF35V
R100 0
R98 0
R102 0
/FS_MC10XS3412
HS12
R10610k
+5V_B
U15
MC10XS3412
IN02
IN13
IN25
IN36
CSNS1
FS7
WAKE8
RST9
CS10
SCLK11
SI12
VD
D13
P_G
ND
14
GN
D17
GN
D23
VP
WR
15
SO16
HS318
HS1 19
HS021
HS2 22
NC 4
NC20
FSI24
+5V_B
HS9
IN0_MC10XS3412
R109
100k
R1112.5k, 1%
IN1_MC10XS3412
VSUP_PWR
C9022nF
HS11
IN3_MC10XS3412
IN2_MC10XS3412
/RST_MC10XS3412
HS10
R104 6.8K 1%
CSNS_MC10XS3412
+
C8210uF6V3
C84100n
+ C851.0uF35V
1 2
/CS_MC10XS3412R153 10k
WAKE_MC10XS3412
R156 10k
Read back SPI message
Fault Status goes low
What kind of diagnostics and protections are included in the eXtreme Switch family?
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 49
Lighting Behavior Monitoring (fault information)
Terminal short-circuit(20mΩ)
Overload
Openload
One bulb outage
Load short-circuit(100mΩ)
Typical loads
Battery short-circuit
- +
Vout
VPWR
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 50
Protection - External Fault and Transients
HS0 ON Open Load
HS0 ON Short to Ground
HS1 Light Intensity Reports Fault Status:- Short to Ground -> HS1 ON- Open Load -> HS1 10% PWM- No Fault -> HS1 OFF
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 51
LAB5 – Protection and Diagnostics
HS0 ON/OFF control with MSDI’s SG0
Poll HS0 status continuously
Example application monitors:
1) Over Current
2) Open Load
Open:
LAB5_Lighting_protections_and_diagnostics.mcp
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 52
AgendaBody Electronics IntroductionBCU Demonstration Board features Introduction to Analog Freescale Solutions for BodyTraining Platform IntroductionLow Power Modes
• LAB1 – Sleep Mode (VDD OFF)• LAB2 – Stop Mode (VDD ON)
Lighting • LAB3 – Direct Output Control • LAB4 – Dimming with Self PWM• LAB5 – Protections and Diagnostics• LAB6 – Current Sensing
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 53
LAB 6 – Current Sensing
TP20/CS_MC10XS3412
C8822n
C8622n
C8922n
C8722n
MISO
MOSI
SCLK
R146 100k
TP21/FS_MC10XS3412
R147 100k
R148 100k
R149 100k
R150 100k
+
C83100uF35V
R100 0
R98 0
R102 0
/FS_MC10XS3412
HS12
R10610k
+5V_B
U15
MC10XS3412
IN02
IN13
IN25
IN36
CSNS1
FS7
WAKE8
RST9
CS10
SCLK11
SI12
VD
D13
P_G
ND
14
GN
D17
GN
D23
VP
WR
15
SO16
HS318
HS1 19
HS021
HS2 22
NC 4
NC20
FSI24
+5V_B
HS9
IN0_MC10XS3412
R109
100k
R1112.5k, 1%
IN1_MC10XS3412
VSUP_PWR
C9022nF
HS11
IN3_MC10XS3412
IN2_MC10XS3412
/RST_MC10XS3412
HS10
R104 6.8K 1%
CSNS_MC10XS3412
+
C8210uF6V3
C84100n
+ C851.0uF35V
1 2
/CS_MC10XS3412R153 10k
WAKE_MC10XS3412
R156 10k
2 CSNS ratios, high-Z or temp sensor output can be selected trough SPI
Proportional voltage can be measured across CSNS resistor
Can I have current feedback per outputand temperature feedback also?
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 54
LAB6 – Current Sensing
Enable current sense, select the output and its current ratio
via SPI.
Same example from LAB4_SelfPWM
Open: LAB6_Current_sense.mcp
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 55
Questions and Answers
TM
TM
Freescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008.
Back Up Slides
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 58
INIT-1
INIT-2
N Request
NORMAL
LP Vdd OFF LP Vdd ON
Power up
BAT fail setBAT failnot set
Wak
e up
=>
rese
t
Wak
e up
=>
INT
W/D
refre
sh
INIT-1
INIT-2
N Request
NORMAL
LP Vdd OFF LP Vdd ON
Power up
BAT fail setBAT failnot set
Wak
e up
=>
rese
t
Wak
e up
=>
INT
W/D
refre
sh
SBC SPI Sequence Example
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 59
SBC Wake-Up From Low Power Modes
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 60
MSDI Demo schematic
/CS_MC33972_I
Place close to MCU header.
C134 10nFSG13_I
MOSI_MC33972
SCLK_MC33972
C98
100n
MISO_MC33972
+5V_B
C136 10nFSP6_I
TP22 /CS_MC33972_I
C140 10nFSP7_I
C103 10nF
SG2_I
C104 10nF
SG3_I
C108 10nF
SG4_I
SG5_I
C114 10nFSG8_I
C118 10nF
C122 10nF
C126 10nF
U16MC33972
GN
D1
SI2
SCLK3
CS4
SP05
SP16
SP27
SP38
SG09
SG110
SG211
SG312
SG4 13
SG5 14
SG6 15
VP
WR
16
WAKE17
SG7 24
SG8 23
SG9 22
SG10 21
SG11 20
SG12 19
SG13 18SP425
SP526
SP627
SP728
INT29
AMUX30
VDD31
SO32
C130 10nF
SP2_I
SP3_I
SP1_I
+
C9110u35V
C92100n
SP0_IC110 10nF
R120100
C94 10nF
MSDI I current consumption.
SG0_I
SG1_I
C116 10nF
C96 10nF
C100 10nF
SG9_I
SG10_IC120 10nF
SG11_I
SG12_I
C124 10nF
C102 10nF
C112 10nF
JP20HEADER
12
C13810nF
/WAKE
C128 10nFSP4_I
AMUX_MC33972_I
/INT_MC33972_I
SG6_I
SG7_I
C132 10nFSP5_I
V_SUP
R114 0
R11210k
R116 0
TP28TP_AMUX_MC33972_I
R118 0
SW4
SW DIP-3
SP1_I
SW5
SW DIP-12/SM
SG13_I
SG8_I
SG5_ISG4_ISG3_ISG2_I
SG12_I
SG9_ISG10_I
SG0_ISG1_I
SG7_ISG6_I
SG11_I
Interrupt generated when a switch status change occurs
SG2_I
SP3_I
V_SUP
SG9_I
SG3_I
SP4_I
SG10_I
SG4_I
SP5_I
SG11_I
SG5_I
SP6_I
SG12_I
+5V_B
SG6_I
SP7_I
SG13_I
SG7_I
SP0_I
SG0_I
SP1_I
SG8_I
SG1_I
J22MLW 13X2
2468
101214161820222426
135791113151719212325
SP2_I
Dip-Switches
External SwitchesConfiguration and status read done via SPI
Wake pin output connected to I/0 from SBC
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 61
SBC demo schematic
Q4MJD32C
1
4 352678910111213141516171819
CANH
LIN1_TXLIN1_RX
D6MBRS130LT3
C17220p
D8MMBD6050LT1G
R391k
J8
12
34
V_SUP_IN
Place cooling space. Place cooling space.
CAN3_TXCAN3_RX
+5V_AUX
R4710k
/CS
MISO
SCLKMOSI
R380
R400
R370
Power Supply for e-switch, COSS.
MUX-OUT
Select Debug Mode.
V_SUP
U2
MC33905D
MISO46
MOSI45
SCLK44
CS43
INT42
RST41
GN
D31
GN
D24
GND_CAN12
NC 29NC28NC 27
NC22
NC30
NC 32
NC33
NC 34
NC 52
NC2 NC1
RXD49
TXD48
SPLIT13
CANH 10
CANL11
LIN136
LIN2 26
LIN_T16
LIN_T27
RXD_L138
TXD_L137
RXD_L225
TXD_L223
VS
UP
14
VS
UP
25
5V_CAN9
VDD47
VCAUX15 VAUX16 VBAUX14
VEM50
VBASE51
SAFE8
IO-018
IO-140
DBG19
VSENSE39
MUX-OUT17
NC3
NC20
NC21
NC53
NC 54
NC35
EXP_PAD55
LIN bus termination.
J9MOLEX MIN-FIT 1x4
1
2
3
4
CAN bus termination
R4110k
LIN0_TXLIN0_RX
V_SUP_IN
CANL
TP27GND
R43680 IO_0
C15220p
D7MMBD6050LT1G
R351k
J7
12
34
V_SUP_IN
JP11HEADER
1 2
/RST
R3410k
JP9
HEADER
1 2
IO_1
VSUP_PWR
+5V_CAN
J6HEADER 2
12
C17547n
CAN bus termination
Q3MJD32C
1
4 352678910111213141516171819
C19220p
R4460
R4560
C184n7
/INT
C20220p
R4810k
Main Board current consumption.
V_SUP_INJ5HEADER 2
12
VSUP_PWR
TP14V_SUP_IN
D9BZT52H-C8V2
21
+C10100uF35V
MCU + SBC current consumption.
/WDOG
C13
100n
JP10HEADER
12
Main Board input power connectors.
+C1742.2uF
C14
100n
N/P when using MC33742.
+5V_VDD
C16100n
Protected Battery Supply
MCU supply
Analog 5V supply
LIN Physical layer
LIN Physical layer
CAN Physical
layerWake pin output connected to I/0 from SBC
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 62
35mΩ HSD35mΩ HSD35mΩ HSD35mΩ HSD
SPI/Diag/Wdog
LIN TcvrLIN TcvrLIN Tcvr
High End Body Computer – Example Diagram
LIN Tcvr
CAN TcvrCAN TcvrCAN TcvrCAN Tcvr
CAN Tcvr
Vreg1Vreg2
WatchdogWake-up
inputs
High side driver
SBC - MC33742
4x MC33661
4x CAN Transceivers
Flexray Tcvr
Switch detection interface
Flexray Tcvr
Switch detection interface
2x MC3397244 Switch inputs
0.7mΩ HSD/LSD
MC33879 8xLSD/HSD
0.7mΩ HSD/LSD0.7mΩ HSD/LSD0.7mΩ HSD/LSD0.7mΩ HSD/LSD0.7mΩ HSD/LSD0.7mΩ HSD/LSD0.7mΩ HSD/LSD
SPI / Diag.
SPI/Diag/Wdog
15mΩ HSD15mΩ HSD15mΩ HSD15mΩ HSD
10mΩ HSD10mΩ HSD12mΩ HSD12mΩ HSDSPI/Diag/Wdog
3x Quad eSwitch12 High side drivers
e200z1Core
80MHz
e200z0Core
80MHz
Peripheral Bridge
FCU Flash (ECC)512KB-1.5MB
RAMController
RAM (ECC)64KB-80 KB
VREG
eDMA
FlexRay
FMPLLOscillators
eMIOSADC
3xDSPI
I²C
SIU
6xFlexCAN
BAM
PIT
EBI
Crossbar Switch (XBAR)Memory Protection Unit (MPU)
NDIJTAGINTC
6x eSCI
MPC5516
1x SPI5x GPIO3x ATD.
12x PWM (Optional)
1xSPI1xGPIO.2x PWM
RF transceiver
Echo+H-bridge
Shared SPI
1xSPI2xGPIO.2x INT2x ATD 1xSPI
2xGPIO. 4xGPIO.
4xCAN (TX & RX)12x GPIO (EN, STB, ERR)
Wake signals
Wake
Wake
1xSPI (Shared)2xGPIO.1xINTRST
4xSCI (TX & RX)4xGPIO (EN)
1x Flexray
TMFreescale Semiconductor Proprietary Information. Freescale™ and the Freescale logo are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 63
Configurable Serial Switches Family Features (COSS)
16-Bit SPI for control and fault reporting, 3.3 V/5.0 Vcompatible
Outputs are current limited (0.6 A to 1.2 A) to drive incandescent lamps
Output voltage clamp, +45 V (low side) and -20 V (high side) during
Inductive switching On/Off control of open load detect current (LED
application) Internal reverse battery protection on VPWR Loss of ground and VPWR protection Maximum 5.0 µA standby current RDS(ON) of 1.0Ω at 25°C typical Short circuit detect and current limit with automatic retry Overtemperature protection