Unpdate injection time etpu2

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

Unpdate injection time etpu2

897 Views
jawwaj
Contributor II

Hi, i am testing the etpu2 library (direct injection), the etpu_inj.c file says:

Revision 0.2  2013/08/02  r54529

* fs_etpu_inj_update() removed, fs_etpu_inj_config() modified so that it can be used anytime to update the injection parameters. During the injection sequence activity the injection parameters cannot be updated and fs_etpu_inj_config() returns FS_ETPU_ERROR_TIMING.

 

In the "MPC5674F_EngineControlDemo" project in try ude the "injection_time" variable from etpu_fuel.c to unpdate the "USEC2TCR1" times on injection config (injection pattern) (on file etpu_gct.c), but  it give me compiler error because it would be a constant value, not a variable.

 

How can i do it?

 

PD: "etpu_gct.c"-> Was it made with Graphical Configuration Tool?, The actual version of EtpuGTC software do not support api for etpu2 (i think).

 

Thank and regards

Labels (1)
0 Kudos
3 Replies

705 Views
MilanBrejl
NXP Employee
NXP Employee

The eTPU Graphical Configuration Tool does not support the new API style introduced with the Engine Control eTPU Library. Instead, a C-code template of the eTPU configuration is provided in AN2864SW. This template should be followed to create a custom eTPU configuration.

0 Kudos

705 Views
jawwaj
Contributor II

Original:

uint32_t inj_injection_3_phase_config[3] =

{

/*     duration,  BANK 1 output,                      BANK 2 output,                      INJ output */

  USEC2TCR1(20) + FS_ETPU_INJ_PHASE_OUT_HIGH_BANK_1 + FS_ETPU_INJ_PHASE_OUT_LOW         + FS_ETPU_INJ_PHASE_OUT_HIGH_INJ,

  USEC2TCR1(10) + FS_ETPU_INJ_PHASE_OUT_LOW         + FS_ETPU_INJ_PHASE_OUT_LOW         + FS_ETPU_INJ_PHASE_OUT_HIGH_INJ,

  USEC2TCR1(10) + FS_ETPU_INJ_PHASE_OUT_LOW         + FS_ETPU_INJ_PHASE_OUT_HIGH_BANK_2 + FS_ETPU_INJ_PHASE_OUT_HIGH_INJ,

};

Mod:

uint32_t inj_injection_3_phase_config[3] =

{

/*     duration,  BANK 1 output,                      BANK 2 output,                      INJ output */

  USEC2TCR1(20) + FS_ETPU_INJ_PHASE_OUT_HIGH_BANK_1 + FS_ETPU_INJ_PHASE_OUT_LOW         + FS_ETPU_INJ_PHASE_OUT_HIGH_INJ,

  USEC2TCR1(10) + FS_ETPU_INJ_PHASE_OUT_LOW         + FS_ETPU_INJ_PHASE_OUT_LOW         + FS_ETPU_INJ_PHASE_OUT_HIGH_INJ,

  USEC2TCR1(injection_time6) + FS_ETPU_INJ_PHASE_OUT_LOW         + FS_ETPU_INJ_PHASE_OUT_HIGH_BANK_2 + FS_ETPU_INJ_PHASE_OUT_HIGH_INJ,

};

Should I have several patterns for each time? Sorry, I do not understand

0 Kudos

705 Views
MilanBrejl
NXP Employee
NXP Employee

You can have several patterns and select one each time you update INJ, or you can create a code to update the pattern dynamically in run-time.

0 Kudos