AN4849
AN4849
AN4849
1 Introduction Contents
1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1
This typical application covers an example of a four cylinder 2 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2
internal combustion engine (ICE) injector drive. The high-voltage 3 Application Schematic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3
is provided by a boost converter managed by the 33816.
4 Application Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4
Freescale analog ICs are manufactured using the SMARTMOS 5 Software Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5
process, a combinational BiCMOS manufacturing flow that 5.1 Current Profile Management for Injection . . . . . . . . . . . 5
integrates precision analog, power functions and dense CMOS 5.2 DC-DC Management . . . . . . . . . . . . . . . . . . . . . . . . . . 12
logic together on a single cost-effective die. 5.3 Fuel Pump Drive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
6 PCB Layout Recommendations . . . . . . . . . . . . . . . . . . . . . .22
6.1 Ground Connections . . . . . . . . . . . . . . . . . . . . . . . . . . 22
6.2 Sense Resistors Connection . . . . . . . . . . . . . . . . . . . . 22
6.3 Drain and Source Signal Connection . . . . . . . . . . . . . . 22
7 Bill of Materials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23
8 Application Source Code . . . . . . . . . . . . . . . . . . . . . . . . . . . .25
8.1 Injection Banks Management Source Code. . . . . . . . . 25
8.2 DC-DC Management Source Code . . . . . . . . . . . . . . . 28
8.3 Fuel Pump Drive Source Code . . . . . . . . . . . . . . . . . . 29
9 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .30
10 Revision History. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .31
2 Overview
This overview presents a typical hardware topology and related software example to drive four injectors managed in two
banks, a single low pressure pump drive, and a variable frequency modulation (VFM) DC/DC converter.
The 33816 is supplied by a battery voltage between 9.0 V and 16 V. A protection circuitry against overvoltage and reverse
battery must be considered on the VBAT supply line.
An external 5.0 V must be supplied to the VCC5 pin and the VCCIO pin, to internally supply the I/O buffers.
In this example, the VCCP voltage is internally generated to enable the drivers.
The boost converter topology is defined to manage a VFM. A Pi filter prevents circuitry disturbance propagation from the
boost regulation area to battery line.
The two banks can manage two injectors each. In this configuration, injection overlaps are not possible inside a bank. The
Diodes D12, D13, D14, and D15 are required to allow current recirculation when the respective low-side MOSFETs are
switched off. The diodes D10_2 and D11_2 provide a current recirculation path to ground when the respective high-side
MOSFET is off.
Freescale Semiconductor
&
&
&
'
%
%
"# "#
" "
" "
" "
" "
%
0
Application Schematic
"
"
"#
"#
"#$
"#
"
"
!
"
"
"#!"
"#!"$%&
'
()*
+ ,()*
3
Application Schematic
Application Instructions
4 Application Instructions
This topology can be used on the evaluation board KIT33816FRDMEVM. Register settings and microcode downloads can
be acheived by using the KL25Z embedded on the KIT33816FRDMEVM.
This topology allows managing two banks of two cylinders. Injector actuations are limited to one injection per bank at the
same time. Each bank is individually managed by one microcore of the digital channel 1 as described next:
• The bank # 1 is managed by the digital microcore Uc0Ch1
• The bank # 2 is managed by the digital microcore Uc1Ch1.
The two microcores of the second channel (Channel 2) drive the VFM and the fuel pump as described next:
• The VFM (Variable Frequency Modulation) is managed by the digital microcore Uc0Ch2
• The fuel pump is managed by the digital microcore Uc1Ch2.
The following is the start-up sequence:
• Apply a battery voltage between 9.0 V and 16 V.
• Download the registers Channel Configuration, then Main Configuration, IO Configuration, and Diagnostic
Configuration.
• Download the dedicated microcode in the Logic Channel 1 and Logic Channel 2 Data RAMs.
• Set to ‘1’ to the pre-flash enable bit and the en_dual_seq bit in the Flash_enable register of channel 1 (0x100) and
channel 2 (0x120).
The registers configuration and the microcodes are detailed into the following chapters.
Once the DC/DC converter output has reached its nominal voltage, the injector drivers can be actuated with the STARTx
pins. Each STARTx pin will individually trigger each injector pin rising edge and will stop actuation on the falling edge.
• START1 drives INJECTOR 1
• START2 drives INJECTOR 2
• START3 drives INJECTOR 3
• START4 drives INJECTOR 4
• START5 drives FUEL PUMP 1
Boost regulation is stopped during the injection boost phase.
5 Software Requirements
5.1 Current Profile Management for Injection
The current profile is managed so to generate an initial high current through the injector. This high current slew rate will
minimize the opening delay. This high current is maintained during a given time to ensure injector opening, then is decreased
to maintain the injector open, up to the End Of Injection (EOI).
The code dedicated to the injection is loaded into the Code RAM 1. This code is executed independently by the microcores
Uc0Ch1 and Uc1Ch1. Each one of the microcore generates a current profile, as described through the injector per the
STARTx pin state by the following.
During the Peak phase, the high-side switch connected to VBAT voltage is turned on. If the peak current target IPEAK is met,
the high-side driver is switched off and the current recirculates through the diode connected ground for the fixed time
(tPEAK_OFF). The high-side driver is then switched on again. This cycle repeats until that the internal counter reaches its
terminal value (tPEAK_TOT), then the Bypass phase begins.
During the Bypass phase, all the low-side and high-side switches are turned off. The current decays through the injector, the
diode connected to ground, and the diode connected to VBOOST for a fixed time (tBYPASS). The Hold phase then starts.
During the Hold phase, the low-side driver is simultaneously switched on with the high-side switch connected to the VBAT
voltage. If the hold current target IHOLD is reached, the high-side driver is switched off and the current recirculates through
the diode connected to ground for a fixed time (tHOLD_OFF). The high-side driver is switched on again, and the cycle repeats
until the STARTx pin goes low or the internal counter reaches its terminal value (tHOLD_TOT (time out)). The End Of Injection
is forced if no falling edge is detected on the STARTx pin.
All the current thresholds and timings are accessed in the Data RAM. The typical values are in Table 1, but must be defined
according to the injector used and the injection profile expected.
In the present case, most of the code branches (jump) are managed according to the counters end of count and the current
threshold, by the mean of the wait table. The wait table rows are affected, as shown in Table 2 and are changed according
to the injection phase.
A rising edge issues an injection start. A falling edge triggers the end of injection. In case of an overlap between two STARTx
pins on the same bank, it is manage by the Smart Start function of the device. In this case, the first STARTx rising edge is
considered. The second STARTx pin high-state is consider when the first actuation is finished. The action of the injection
corresponding to the second STARTx pin is stopped when the second STARTx pin falling edge occurs.
In the same way, the Uc1Ch1 must have access to the pre-drivers HS3, HS4, LS3, and LS4.
The microcore Uc0Ch1 has default access to the current sense block # 1, and to microcore Uc1Ch1 to the current sense
block # 2. The corresponding registers content doesn’t need to be changed.
The Code_width register and the two checksum value registers must be set so as to permanently verify the code integrity.
The checksum is recalculated in the 33816 at run time each time a microcode line is executed and compared to the
checksum register value. In case of a mismatch, an error is reported.
The code entry point of Uc0Ch1 is 0 as the first line executed, is the first Code RAM line of the channel 1.
The code entry point of Uc1Ch1 is the forty fourth Code RAM line of the channel 1.
The microcore Uc0Ch1 must be setup so as to run the two microcores of the channel as each microcore drives an injection
bank.
Both microcores are enabled by setting the pre_flash enable bit and the en_dual_uc bit to ‘1’.
Initialization Phase
Current sense operational amplifier gain setting
Load the eoinj line label Code RAM address into the register jr1
Load the idle line label Code RAM address into the register jr2
Define wait table entry # 1: Jump to End Of Injection Phase if the start signal goes low
Shortcut definition
No
Boost Phase
Load the boost phase current threshold in the current DAC
Define wait table entry # 2: Jump to Peak Phase when current is over threshold
Set flag0 to low (set the VFM in Idle Phase while the Injection Boost Phase is ongoing)
Vboost MOSFET (HS2) and LS MOSFET (LSx) turn on, Vbat MOSFET (HS1) turn off
Wait for wait table entry 1 or 2 to be satisfied
Peak On Phase
Vbat MOSFET (HS1) and LS MOSFET (LSx) turn on, Vboost MOSFET (HS2) turn off
Wait entry # 3 satisfied
Bypass Phase
Load in the counter 3 the length of the bypass phase
Vboost MOSFET, Vbat MOSFET (HS2) and LS MOSFET (LSx) turn off
Define wait table entry # 4: Jump to hold when tc3 reaches end of count
Wait for wait table entry 4 or 5 to be satisfied
Hold Phase
Load the total length of the hold phase in counter 2
Load the hold current threshold in the DAC
Define wait table entry # 2: Jump to End Of Injection Phase when tc2 reaches end of count
Define wait table entry # 3: Jump to Hold On Phase when tc1 reaches end of count
Define wait table entry # 4: Jump to Hold Off Phase when current is over threshold
Hold On Phase
Vbat MOSFET (HS2) and LS MOSFET (LSx) turn on, Vboost MOSFET turn off
Wait entry # 4 satisfied
At boost startup, the current through the inductor oscillates. This current is maintained between a current lower to the
inductor saturation current and a positive current close to annulation by turning the low-side switch on/off. When this switch
is on, the current grows through the sense resistor and the low-side switch. When the switch is open, the current decays
through the diode and loads the output capacitor. It increases the voltage until the VBOOST voltage reaches the VBOOST_HIGH
threshold. This phase uses the asynchronous mode and the current modulation is managed by an independent circuitry
enabled by the microcore.
In the present case, most of the code branches (jump) are managed according to the VBOOST voltage and the flag0 state by
means of the wait table. The wait table rows are affected as shown in Table 17 and are changed according to the actuation
phase.
Table 17. Example of Wait Table Definition for the Fuel Pump Drive
Phase Async Phase (dcdc_on) Sync Phase (dcdc_off) Idle Phase
If flag0 is low, then jump to If flag0 is low, then jump to
Row 1 -
Idle phase Idle phase
If VBOOST < VBOOST_LOW,
Row 2 - -
then jump to Async Phase
Row 4 - - -
Row 5 - - -
To avoid regulation disturbances, the boost voltage regulation is stopped by the mean of the internal flag 0 when an injection
phase starts.
The tBOOST_FILTER time is defined in the Boost_filter register (0x19D). This filter time and type can be adjusted to improve
the VBOOST voltage stability.
The Uc0Ch2 must have access to the current sense feedback # 4L and 4H
Initialization Phase
Current sense operational amplifier gain setting
Load the min current threshold in DAC 4L
Load the max current threshold in DAC 4H
Set the DAC mode to set Vboost voltage
Boost Phase
Define wait table entry # 1: Jump to Idle Phase when flag0 is low (boost injection phase ongoing)
Define wait table entry # 2: Jump to Asynchrous Phase when Vboost voltage is below Vboost_min
Define wait table entry # 3: Jump to Synchrous Phase when Vboost voltage is above Vboost_max
Asynchronous Phase
Load the Vboost_max threshold in vboost_dac register
Enable the Asynchronous mode
Wait for wait table entry 1 or 2 to be satisfied
Synchronous Phase
Load the Vboost_min threshold in vboost_dac register
Enable the Synchronous mode (LS7 driver off)
Wait for wait table entry 1 or 3 to be satisfied
Idle Phase
Enable the Synchronous mode (LS7 driver off)
Jump to previous line while flag0 is low
Unconditional jump to Asynchrous Phase
!!
In this case, most of the code branches (jump) are managed according to the counters end of count and the current threshold
by the means of the wait table. The wait table rows are affected, as shown in Table 23, and are changed according to the
actuation phase.
Table 23. Example of Wait Table Definition for the Fuel Pump Drive
Phase Peak Phase Hold Phase EOA Phase
If startx goes low, then If startx goes low, then
Row 1 -
jump to EOA Phase jump to EOA Phase
If the current reaches If tHOLD_TOT is
Row 2 IPEAK, then jump to reached, then jump to -
Hold phase EOA phase
if tHOLD_OFF is
reached, then jump to
Row3 - -
Hold On phase (sub
phase)
if IHOLD is reached,
Row 4 - then jump to Hold Off -
phase (sub phase)
Row 5 - - -
The Code_width register and the two checksum value registers must be set to permanently verify the code integrity. The
checksum is recalculated in the 33816 at run time, each time a microcode line is executed. The code width and checksum
values are provided for a DC/DC converter regulation code and a pump drive code.
The code entry point of Uc0Ch2 is 0 the first line executed, is the first Code RAM line of the channel 2.
The code entry point of Uc1Ch2 is at the sixteenth Code RAM line of the channel 2
The registers must be setup to run the two microcores of the channel 2 as the first microcode drives the DC/DC converter,
and the second microcore drives the fuel pump.
Both microcores are enabled by setting the pre_flash enable bit and the en_dual_uc bit to ‘1’.
Initialization Phase
Current sense operational amplifier gain setting
Load the eoact line label Code RAM address into the register jr1
Load the idle line label Code RAM address into the register jr2
Define wait table entry # 1: Jump to End Of Actuation Phase if the start signal goes low
Shortcut definition
No
Peak Phase
Load the peak phase current threshold in the current DAC
Define wait table entry # 2: Jump to Hold Phase when current is over threshold
Vbat MOSFET (HS5) and LS MOSFET (LS5) turn on
Wait for wait table entry 1 or 2 to be satisfied
Hold On Phase
Vbat MOSFET (HS5) and LS MOSFET (LSx) turn on
Wait entry # 3 satisfied
7 Bill of Materials
Table 35 lists the typical external components required to enable the application.
POWER SUPPLIES
BOOST CONVERTER
INJECTION BANKS
C35,C36,C37,C38,
19 8 1000 pF / 100 V KEMET C0603C102K1RACTU C0603
C55,C56,C57,C58
20 2 C59,C60 330 pF / 25 V AVX 06033A331FAT2A C0603
21 4 C39,C40,C41,C42 0.33 F / 25 V MULTICOMP MCCA001173 C0603
C43,C44,C45,C46,
22 8 4700 pF / 100 V KEMET C0805C472J1GACTU C0805
C47,C48,C49,C50
D10 (D10_1,
23 2 D10_2),D11 - DIODES INC SBR10200CTL-13 DPAK
(D11_1, D11_2)
24 4 D12,D13,D14,D15 - ST MICROELECTRONICS STPS2H100UY SMB
Q3,Q4,Q5,Q6,Q7,Q
25 8 BUK9230-100B NXP SEMICONDUCTORS BUK9230-100B,118 DPAK
8,Q9,Q10
R13,R14,R15,R16, VISHAY
26 8 10 ohm CRCW060310R0JNEA R0603
R17,R18,R19,R20 INTERTECHNOLOGY
VISHAY
27 2 R21,R22 0.015 ohm WSK2512R0150FEA R2512
INTERTECHNOLOGY
Freescale does not assume liability, endorse, or warrant components from external manufacturers that are referenced in
circuit drawings or tables. While Freescale offers component recommendations in this configuration, it is the customer’s
responsibility to validate their application.
* Note: The data are stored into the dataRAM of the channel 1.
#define Iboost 0; * The boost phase current value is stored in the Data RAM address 0
#define Ipeak 1; * The peak phase current value is stored in the Data RAM address 1
#define Ihold 2; The hold phase current value is stored in the Data RAM address 2
#define Tpeak_off 3; * The peak off phase time is stored in the Data RAM address 3
#define Tpeak_tot 4; * The peak phase duration is stored in the Data RAM address 4
#define Tbypass 5; * The bypass phase time is stored in the Data RAM address 5
#define Thold_off 6; * The peak phase duration is stored in the Data RAM address 6
#define Thold_tot 7; * The peak phase duration is stored in the Data RAM address 7
* Note: The Thold_tot variable defines the current profile time out. The active STARTx pin is expected to toggle in is low state before this time out.
* ### Idle phase- the uPC loops here until start signal is present ###
idle0: joslr inj1_start start1; * Perform an actuation on inj1 if start 1 (only) is active
joslr inj2_start start2; * Perform an actuation on inj2 if start 2 (only) is active
jmpf jr1; * If more than 1 start active at the same time(or none), no actuation
peak_off0:ldcd rst ofs keep keep Tpeak_off c2;* Load in the counter 2 the length of the peak_off phase
stos off off on; * Turn VBAT off, BOOST off, LS on
wait row123; * Wait for one of the previously defined conditions
hold_off0:ldcd rst _ofs keep keep Thold_off c2;* Load the length of the hold_off phase in counter 1
stos off off on; * Turn VBAT off, BOOST off, LS on
wait row123; * Wait for one of the previously defined conditions
*********************************************************************************
* Note: The data that defines the profiles are shared between the two microcores.
* ### Idle phase- the uPC loops here until start signal is present ###
idle1: joslr inj3_start start3; * Perform an actuation on inj3 if start 3 (only) is active
joslr inj4_start start4; * Perform an actuation on inj4 if start 4 (only) is active
jmpf jr1; * If more than 1 start active at the same time(or none), no actuation
peak_off1:ldcd rst ofs keep keep Tpeak_off c2;* Load in the counter 2 the length of the peak_off phase
stos off off on; * Turn VBAT off, BOOST off, LS on
wait row123; * Wait for one of the previously defined conditions
hold_off1:ldcd rst _ofs keep keep Thold_off c2;* Load the length of the hold_off phase in counter 1
stos off off on; * Turn VBAT off, BOOST off, LS on
wait row123; * Wait for one of the previously defined conditions
#define Vboost_high 0; * The Vboost_high voltage value is stored in the Data RAM address 0
#define Vboost_low 1; * The Vboost_low voltage value is stored in the Data RAM address 1
#define Isense4_high 2; * The Isense4_high current value is stored in the Data RAM address 2
#define Isense4_low 3; * The Isense4_low current value is stored in the Data RAM address 3
* Note: The data are stored into the dataRAM of the channel 1.
#define Ipeak 5; * The peak current value is stored in the Data RAM address 5
#define Ihold 6; * The hold current value is stored in the Data RAM address 6
#define Thold_off 7; * The hold off time is stored in the Data RAM address 7
#define Thold_tot 8; * The hold phase duration is stored in the Data RAM address 8
* Note: The Tpeak_tot variable defines the current profile time out. The active STARTx pin is expected to toggle in is low state before this time out.
hold_off1:ldcd rst _ofs off on Thold_off c2;* Load the length of the hold_off phase in counter 1 and turn VBAT off, LS on
wait row123; * Wait for one of the previously defined conditions
9 References
DESCRIPTION URL
10 Revision History
REVISION DATE DESCRIPTION OF CHANGES
Web Support: Freescale reserves the right to make changes without further notice to any products herein. Freescale makes no
freescale.com/support warranty, representation, or guarantee regarding the suitability of its products for any particular purpose, nor does
Freescale assume any liability arising out of the application or use of any product or circuit, and specifically disclaims any
and all liability, including without limitation consequential or incidental damages. “Typical” parameters that may be
provided in Freescale data sheets and/or specifications can and do vary in different applications, and actual performance
may vary over time. All operating parameters, including “typicals,” must be validated for each customer application by
customer’s technical experts. Freescale does not convey any license under its patent rights nor the rights of others.
Freescale sells products pursuant to standard terms and conditions of sale, which can be found at the following address:
freescale.com/SalesTermsandConditions.
Freescale and the Freescale logo are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off.
SMARTMOS is a trademark of Freescale Semiconductor, Inc. All other product or service names are the property of their
respective owners.