eTPU2 spark Problem

cancel
Showing results for 
Search instead for 
Did you mean: 

eTPU2 spark Problem

417 Views
alessandrosirto
Contributor II

HI All, 

I'have started to use eTPU2 function on MPC5644A and i referred to the documentation AN4907 ,and  AN4908 . I have implemented all that is reported in the apllication  AN4908SW but reduced for only 2 cylinder control , but for what i have understand the spark function works with this configuration structure : 

int24_t angle_offset_recalc;

uint24_t dwell_time_max;

uint24_t multi_on_time;

uint24_t dwell_time_min;

uint24_t multi_off_time;

uint8_t  spark_count; 

struct single_spark_config_t *p_single_spark_config;

uint8_t  generation_disable;

where :

struct single_spark_config_t
{
int24_t end_angle; 
uint24_t dwell_time; /
uint8_t multi_pulse_count; 

};

So , end_angle is the angle where the Dwell must end .

In my c code I have done this configuration :

struct spark_config_t spark_config =
{
DEG2TCR2(10), /* angle_offset_recalc */
USEC2TCR1(1800), /* dwell_time_min */
USEC2TCR1(2200), /* dwell_time_max */
USEC2TCR1(100), /* multi_on_time *///100
USEC2TCR1(100), /* multi_off_time *///100
1, /* spark_count */
&single_spark_config[0], /* p_single_spark_config */
FS_ETPU_SPARK_GENERATION_ALLOWED /* generation_disable */
};

struct single_spark_config_t single_spark_config[1] =
{
{
DEG2TCR2(30), /* end_angle */
USEC2TCR1(2000), /* dwell_time */
3/* multi_pulse_count */
}
};

And I work on a flywheel 12-1 at fixed 1000 rpm .

the polarity of crank instance is : FS_ETPU_CRANK_FM0_USE_TRANS_RISING

and all other gereral settings are :

 #define SYS_FREQ_HZ 120E6
#define TCR1_FREQ_HZ (SYS_FREQ_HZ/1)
#define TEETH_TILL_GAP 11
#define TEETH_IN_GAP 1
#define TEETH_PER_CYCLE 24
#define TCR2_TICKS_PER_TOOTH 1000 

#define TDC1_DEG 0
#define TDC3_DEG 180
#define TDC4_DEG 360
#define TDC2_DEG 540

But what happend is shown in attached image . 

The green signal is my spark output , the yellow one is my crank signal.  As you can see the output seems start at 30 ° not end . But why I have set this DEG2TCR2(30)? 

Anyone can help me ?

thanks in advance  ... 

4 Replies

216 Views
turgay_kale
Contributor III

Dear Alessandro hi,

I think this effect is because of the latency of scheduling between etpu's crank and spark channels. As you know etpu microengine scheduler handles just one task at the time and when you increase the RPM of your engine continously, the etpu channels (crank and spark) will loose synchronization. 

I have recently faced this problem, and reported as below. And now it's solved, you may check it.

ETPU Spark Function Accuracy Problem  

I want to ask and learn your opinion, how did you get and arrange the exact TCR1 for dwell_time and TCR2 for spark_end_angle in EMIOS200? Your suggestions will help me, thank you.

Regards,

Turgay Kale

0 Kudos

216 Views
arjunraveendran
Contributor III

Hello Alessandro,

I am also facing issues in accuracy of injection and spark pulses.

The dwell times, end angles are all way off from what is configured in the software.

Were you able to resolve the above mentioned problems?

Thanks,

Arjun.

0 Kudos

216 Views
alessandrosirto
Contributor II

Hi Arjun , 

Unfortunately not....

I build by my self all the API and status machine , to control the engine (capture of flywheel  , injector and ignition ;  using the eMIOS200). This job have required to me a lot of work , but after this I arrived at desired resolution of the output, without any strange effects.

regards, 

Ale, 

0 Kudos

216 Views
arjunraveendran
Contributor III

Hello Alessandro,

Thanks for the reply .

0 Kudos