I am using MPC5644A etpu for engine crank signal processing. The AN4907 and AN4908 provided good documentations and demo code for that purpose.
When I used 36-1 crank wheel, the code works fine. But when I switched to 6+1 crank wheel, the code looks not working well ( etpu_crank_isr was not triggered). I did not change anything on the code itself except the following parameters (which was calculated by the excel sheet crank_ratios.xls in the AN4707SW):
#define TEETH_TILL_GAP 6
#define TEETH_IN_GAP 0
#define TEETH_PER_CYCLE 12
#define TCR2_TICKS_PER_TOOTH 600
struct crank_config_t crank_config =
1*(TEETH_TILL_GAP+TEETH_IN_GAP), /* teeth_per_sync */
(uint24_t)MSEC2TCR1(10), /* blank_time */
3, /* blank_teeth */
0xFFFFFF, /* gap_ratio */
0x191687, /* win_ratio_normal */
0x191687, /* win_ratio_across_gap */
0x16A11E, /* win_ratio_after_gap */
0x48CE2D, /* win_ratio_after_timeout */
(uint24_t)MSEC2TCR1(50) /* first_tooth_timeout */
I am using the same chip and code as yourself with a 60-2-2-2 crank.
Using the values calculated by crank_ratios.xls in my code did not work.
I used the values from the example code and I obtain crank synch.
Try these and then experiment with the values under varying engine speeds.
I am not sure if the crank_ratios.xls calculation are correct as there is not enough information to verify their validity.
I have fixed a number of other issues with the code which you may or may not experience.
The latest is that the accuracy of injector angle placement which is very poor.
Let me know if you have any problems.
I am also facing the same issues you have described on a different configuration of crank wheel.
Using the crank_ratios.xls did not give me crank synch and like you mentioned, i have experimented with the values and finally able to generate ignition and injection pulses.
But the desired and obtained ignition and injection pulses are way off in terms of accuracy, the dwell times, end angles and stop angles are way off from what is configured in software.
Could you please let me know what fixes you have implemented on the new ETPU API.
Thank you very much for your sharing experiences on this issue. Milan ( the author of the code) helped me through this and I also found that my signal generator has some issue. Now my 6+1 is working. I should not have I picked GM truck as my test bench. The 6+1 pattern is not that common and the sensor is very hard to access.
The excel sheet only works for missing teeth and does not work for additional teeth, as Milan mentioned.
I am very interested in getting to know what you have experienced for this code. I am also very interested in what your project is and how's everything going.