AnsweredAssumed Answered

eTPU2 spark Problem

Question asked by Alessandro Sirtori on Dec 13, 2017

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  ... 

Attachments

Outcomes