MPC5634 eTPU

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MPC5634 eTPU

Jump to solution
2,600 Views
208677262
Contributor II

Hi, I had a problem debugging eTPU. 

 

I checked the FUEL in AN4907 document, which said that the extra pulse width could be set through the fs_etpu_fuel_update_injection_time() function. But I checked that the function had only set the pulse width time. I wanted to know how to set the pulse width multiple times with FUEL.

Labels (1)
0 Kudos
1 Solution
2,451 Views
johndiener
Contributor IV

This is an old post but I happened to be working with the AN4907 eTPU code and was interested in experimenting with FUEL. I simulated a case similar to that described in the AN3770 complex injection section and got the expected results. The screen capture below shows 3 FUEL pulses resulting from 4 updates to the injection time.

FUEL_multi_injection.png

Prior to start of fueling, the injection time is at 1000us. At (1) the injection time is updated to 400us via the fs_etpu_fuel_update_injection_time() API. Since ~600us of injection has already been applied to that point, the injection ends immediately. At (2) the injection time is updated again to 620us, but this is ignored because the additional injection (~20us) does not meet the minimum pulse time, which is configured to 50us. The injection time is updated to 800us at (3), which generates a pulse of approximately 200us (plus the 200us compensation time). Shortly after that pulse the injection time is updated one last time (4) to 1000us. At (5), after the off_time_minimum has been satisfied, the final 200us of injection is applied, at the end of which it can be seen that the injection_time_applied (measured) to equal to the injection_time (requested) - 1000us (100000 TCR1 ticks). Note that all of this occurs before the stop angle, which occurs at 680 degrees in this configuration.

Of course multi-pulse generation is going to be an atypical case with the FUEL function, but the code will generate such if so requested and within timing and angle limits - the timing window in which injection updates can trigger multiple pulses is rather small. More likely operation might be to update fuel timing at the stop angle interrupt, which would eliminate the possibility of a multi-pulse. I have attached the simulation test case I put together to examine this capability.

 

John Diener

View solution in original post

4 Replies
2,528 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

Hi, using of FUEL function you have explained in the details in the following appnote:

https://www.nxp.com/docs/en/application-note/AN3770.pdf 

Figure 2 shows complex injection pulse.

2,452 Views
johndiener
Contributor IV

This is an old post but I happened to be working with the AN4907 eTPU code and was interested in experimenting with FUEL. I simulated a case similar to that described in the AN3770 complex injection section and got the expected results. The screen capture below shows 3 FUEL pulses resulting from 4 updates to the injection time.

FUEL_multi_injection.png

Prior to start of fueling, the injection time is at 1000us. At (1) the injection time is updated to 400us via the fs_etpu_fuel_update_injection_time() API. Since ~600us of injection has already been applied to that point, the injection ends immediately. At (2) the injection time is updated again to 620us, but this is ignored because the additional injection (~20us) does not meet the minimum pulse time, which is configured to 50us. The injection time is updated to 800us at (3), which generates a pulse of approximately 200us (plus the 200us compensation time). Shortly after that pulse the injection time is updated one last time (4) to 1000us. At (5), after the off_time_minimum has been satisfied, the final 200us of injection is applied, at the end of which it can be seen that the injection_time_applied (measured) to equal to the injection_time (requested) - 1000us (100000 TCR1 ticks). Note that all of this occurs before the stop angle, which occurs at 680 degrees in this configuration.

Of course multi-pulse generation is going to be an atypical case with the FUEL function, but the code will generate such if so requested and within timing and angle limits - the timing window in which injection updates can trigger multiple pulses is rather small. More likely operation might be to update fuel timing at the stop angle interrupt, which would eliminate the possibility of a multi-pulse. I have attached the simulation test case I put together to examine this capability.

 

John Diener
2,345 Views
208677262
Contributor II

Hi, johndiener.

Looking at the examples you provided, I have a few questions for you

current_time = read_time();
if (multi_inject_step == 0 && current_time > 94520.0)
{
    fuel_config.injection_time = USEC2TCR1(400);
    fs_etpu_fuel_update_injection_time(&fuel_1_instance, &fuel_config);
    multi_inject_step = 1;
}
else if (multi_inject_step == 1 && current_time > 94720.0)
{
     fuel_config.injection_time = USEC2TCR1(620);
     fs_etpu_fuel_update_injection_time(&fuel_1_instance, &fuel_config);
     multi_inject_step = 2;
}
else if (multi_inject_step == 2 && current_time > 94920.0)
{
    fuel_config.injection_time = USEC2TCR1(800);
    fs_etpu_fuel_update_injection_time(&fuel_1_instance, &fuel_config);
    multi_inject_step = 3;
}
else if (multi_inject_step == 3 && current_time > 95350.0)
{
    fuel_config.injection_time = USEC2TCR1(1000);
    fs_etpu_fuel_update_injection_time(&fuel_1_instance, &fuel_config);
    multi_inject_step = 4;
}

1. The definition of this function is not found in the project. How to read the time?  ( read_time() )

2.   How do these numbers come about? (94520.0  94720.0  94920.0  95350.0)

 

Have a great day.
best regards.

0 Kudos
2,340 Views
johndiener
Contributor IV

The read_time() function and the demo code I provided is simulation-only code, part of the ASH WARE System/eTPU Development Tool products.  I simulated the system startup and found that the first fuel pulse was firing at ~94500 us (microseconds) into the simulation.  I then used the timing numbers you mention (94520.0  94720.0  94920.0  95350.0 us) to mimic the exact scenario portrayed in the AN3770 complex injection description - doing so showed multi-pulse to work as described.  This could no doubt be done on hardware/EVB, but much harder to reliably get the right timing and capture the result.  Simulation allows very quick and thorough examination of this capability.

John Diener
0 Kudos