Slight misfire after throttle is pressed
Moderators: jsmcortina, muythaibxr
-
- Super MS/Extra'er
- Posts: 9130
- Joined: Sun May 02, 2004 6:51 am
- Location: Quebec, Canada
- Contact:
Re: Slight misfire after throttle is pressed
This is just to let everyone know that I have been able to reproduce this on the bench (thanks to James) and that I'm tracking the problem.
Jean
Jean
-
- Super MS/Extra'er
- Posts: 1072
- Joined: Fri Sep 16, 2011 5:29 am
- Location: Brisbane, Australia
- Contact:
Re: Slight misfire after throttle is pressed
While you are looking at the code, I found this odd section that could be a bug (not sure if related, but does involve seq inj).
Code snippet from 3.1.2 beta at lines 2413 in ms2_extra_main.c (and the same section exists in the 3.1.1 release)
Issue is that when tmp_pw3 and tmp_pw4 are individually set for EAE calcs, that the section below this ( ** Set pulse widths 3 and 4 and Add VE trim) essentially puts them back to just whatever tmp_pw1/2 are and makes the code section above irrelevant for inj 3/4.
So either the section for EAE calcs is inefficient and could reduce code size (and a code jump) or the section below is changing the values of 3/4 inj when it shouldn't....
I'll let the developers decide which is relevant etc.
G
Code snippet from 3.1.2 beta at lines 2413 in ms2_extra_main.c (and the same section exists in the 3.1.1 release)
Issue is that when tmp_pw3 and tmp_pw4 are individually set for EAE calcs, that the section below this ( ** Set pulse widths 3 and 4 and Add VE trim) essentially puts them back to just whatever tmp_pw1/2 are and makes the code section above irrelevant for inj 3/4.
So either the section for EAE calcs is inefficient and could reduce code size (and a code jump) or the section below is changing the values of 3/4 inj when it shouldn't....
Code: Select all
run_EAE_calcs();
if ((flash10.staged & 0x7) && !(seq_inj_ctrl & SEQ_STD_INJ)) {
unsigned long ttmppw1, ttmppw2;
ttmppw1 = tmp_pw1;
ttmppw2 = tmp_pw2;
tmp_pw1 = tmp_pw3;
tmp_pw2 = tmp_pw4;
run_EAE_calcs();
tmp_pw3 = tmp_pw1;
tmp_pw4 = tmp_pw2;
tmp_pw1 = ttmppw1;
tmp_pw2 = ttmppw2;
}
/**************************************************************************
** Set pulse widths 3 and 4 and Add VE trim
**************************************************************************/
if (flash8.seq_inj & 0x03) {
if (no_inj > 2) {
tmp_pw3 = tmp_pw1;
tmp_pw4 = tmp_pw2;
}
if (pg8_ptr->seq_inj & 0x10)
add_vetrim();
}
G
Mazda MX5 + MS3 Pro
-
- Super MS/Extra'er
- Posts: 9130
- Joined: Sun May 02, 2004 6:51 am
- Location: Quebec, Canada
- Contact:
Re: Slight misfire after throttle is pressed
I don't want to go in details at this time but it is correct. When staging is enabled the number of injectors is not computed the same way so the code won't undo what it just did.
Jean
Jean
-
- Super MS/Extra'er
- Posts: 9130
- Joined: Sun May 02, 2004 6:51 am
- Location: Quebec, Canada
- Contact:
Re: Slight misfire after throttle is pressed
I think I have resolved the issue. I have attached both the MS2 and Microsquirt s19 files so if you had the issue, give it a try. Hopefully, you won't see it anymore. By the way, this is based in the 3.1.2 version so you'll need that ini (attached)
Jean
Jean
-
- Super MS/Extra'er
- Posts: 1072
- Joined: Fri Sep 16, 2011 5:29 am
- Location: Brisbane, Australia
- Contact:
Re: Slight misfire after throttle is pressed
Cool - a fact I didn't know is if flash8.seq_inj & 0x03 would be true when staging is enabled (but I guess it isn't), otherwise it would undo it.racingmini_mtl wrote:I don't want to go in details at this time but it is correct. When staging is enabled the number of injectors is not computed the same way so the code won't undo what it just did.
Jean
Great to hear you've found the problem - are you able to share the code or segment with the bug/fix?
G
Mazda MX5 + MS3 Pro
-
- Super MS/Extra'er
- Posts: 9130
- Joined: Sun May 02, 2004 6:51 am
- Location: Quebec, Canada
- Contact:
Re: Slight misfire after throttle is pressed
The code will be in the next release assuming it is completely fixed.
Jean
Jean
Re: Slight misfire after throttle is pressed
Jean,racingmini_mtl wrote:The code will be in the next release assuming it is completely fixed.
Jean
Does the code you corrected affect only the sequential setups that the Miata installations use??
Jim
Re: Slight misfire after throttle is pressed
Thank you very much Jean (and James) for this... I am going to try ASAP.
I call back on how it works.
I call back on how it works.
--------------------------------
fun is not a straight line
Sven
http://www.mx-5club-sachsen.de
http://miata.cardomain.com/id/svenmx5
NB-1998-1,6-Garrett T25 HGP Turbo Stage I
fun is not a straight line
Sven
http://www.mx-5club-sachsen.de
http://miata.cardomain.com/id/svenmx5
NB-1998-1,6-Garrett T25 HGP Turbo Stage I
Re: Slight misfire after throttle is pressed
Any possibility of a diff -u patch being posted? I want to try this ASAP but I'm running modified code (and don't want to lose the extra features even if temporarily).
Dimitris
Dimitris
The man behind MS Labs
2005 Audi A3 2.0L TFSI DSG AWD - Extreme MS3
2002 Mazda Miata 1.8 6sp - Enhanced MS3 1.4.0, sequential injection, sequential ignition, big turbo, lots of boost
2005 Audi A3 2.0L TFSI DSG AWD - Extreme MS3
2002 Mazda Miata 1.8 6sp - Enhanced MS3 1.4.0, sequential injection, sequential ignition, big turbo, lots of boost
-
- Master MS/Extra'er
- Posts: 568
- Joined: Mon Jun 26, 2006 1:03 pm
- Location: Warrington, NorthWest England
Re: Slight misfire after throttle is pressed
Great job Jean.
My car is off the road so I cant test to verify, but great job nonetheless
My car is off the road so I cant test to verify, but great job nonetheless
2003 MX5. Coldside MP62
-
MS3, RTC, & Knock board, Release 1.2. LC-1 Wideband.
-
MS3, RTC, & Knock board, Release 1.2. LC-1 Wideband.
Re: Slight misfire after throttle is pressed
Hi Jean and James,
I think I am not able to express how much we have to thank you...
I just come back from the first drive with the bugfixed code and I am stumped - you gave me back the joy of riding my Miata!
There are no more misfires, the car generally seems to run even smoother... Great, great, great!
Again, THANK YOU!
I think I am not able to express how much we have to thank you...
I just come back from the first drive with the bugfixed code and I am stumped - you gave me back the joy of riding my Miata!
There are no more misfires, the car generally seems to run even smoother... Great, great, great!
Again, THANK YOU!
--------------------------------
fun is not a straight line
Sven
http://www.mx-5club-sachsen.de
http://miata.cardomain.com/id/svenmx5
NB-1998-1,6-Garrett T25 HGP Turbo Stage I
fun is not a straight line
Sven
http://www.mx-5club-sachsen.de
http://miata.cardomain.com/id/svenmx5
NB-1998-1,6-Garrett T25 HGP Turbo Stage I
-
- Master MS/Extra'er
- Posts: 568
- Joined: Mon Jun 26, 2006 1:03 pm
- Location: Warrington, NorthWest England
Re: Slight misfire after throttle is pressed
Good news Zaphod
Great work Jean & James. Thanks from all of us in the MX5/miata community!
Great work Jean & James. Thanks from all of us in the MX5/miata community!
2003 MX5. Coldside MP62
-
MS3, RTC, & Knock board, Release 1.2. LC-1 Wideband.
-
MS3, RTC, & Knock board, Release 1.2. LC-1 Wideband.
Re: Slight misfire after throttle is pressed
Excellent news! Waiting for the source!!!
The man behind MS Labs
2005 Audi A3 2.0L TFSI DSG AWD - Extreme MS3
2002 Mazda Miata 1.8 6sp - Enhanced MS3 1.4.0, sequential injection, sequential ignition, big turbo, lots of boost
2005 Audi A3 2.0L TFSI DSG AWD - Extreme MS3
2002 Mazda Miata 1.8 6sp - Enhanced MS3 1.4.0, sequential injection, sequential ignition, big turbo, lots of boost
Re: Slight misfire after throttle is pressed
Hello Jean,
What was exactly the issue? Is it only affecting Mx5/miata users or is it a "general" bug and it is worth to upgrade ?
Ben
What was exactly the issue? Is it only affecting Mx5/miata users or is it a "general" bug and it is worth to upgrade ?
Ben
-
- Site Admin
- Posts: 39615
- Joined: Mon May 03, 2004 1:34 am
- Location: Birmingham, UK
- Contact:
Re: Slight misfire after throttle is pressed
The situation that I observed and conveyed to Jean was that the injection start event was right at the change point between two teeth. Under certain circumstances a recalculation at just the wrong time could cause a missed or duplicated injection event. As the Miata wheel is so inaccurate with very few teeth this is quite feasible. On higher tooth count wheels it is still possible, but the incidence would be very low if at all.BenGTT wrote:What was exactly the issue? Is it only affecting Mx5/miata users or is it a "general" bug and it is worth to upgrade ?
Jean can no doubt explain in more detail, but I ran into these same kind of problems about a year ago on MS3 and fought the code for a while to resolve them.
James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk
My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
Re: Slight misfire after throttle is pressed
Thank you James, this is a very good explanation and interesting
Ben
Ben
-
- Super MS/Extra'er
- Posts: 9130
- Joined: Sun May 02, 2004 6:51 am
- Location: Quebec, Canada
- Contact:
Re: Slight misfire after throttle is pressed
Good to see that my bench test results are confirmed.
In addition to what James mentioned, there was also a problem with scheduling events just after the current tooth. In some cases, that allowed the timer to roll around which either pushed the injection pulse much later or increased the pulse width. The solution was to force injection for those cases and schedule the events only for those slightly further in time. This could also have affected spark events so this was also updated. However, since the sequential injection events are scheduled later in the interrupt, they were more likely to be affected.
There will be a beta release soon so the code will be available. And those using sequential injection with any wheel type might want to upgrade due to what I mention above.
Jean
In addition to what James mentioned, there was also a problem with scheduling events just after the current tooth. In some cases, that allowed the timer to roll around which either pushed the injection pulse much later or increased the pulse width. The solution was to force injection for those cases and schedule the events only for those slightly further in time. This could also have affected spark events so this was also updated. However, since the sequential injection events are scheduled later in the interrupt, they were more likely to be affected.
There will be a beta release soon so the code will be available. And those using sequential injection with any wheel type might want to upgrade due to what I mention above.
Jean
Re: Slight misfire after throttle is pressed
Is the bug fix in ms2_extra_inj.c only?
The man behind MS Labs
2005 Audi A3 2.0L TFSI DSG AWD - Extreme MS3
2002 Mazda Miata 1.8 6sp - Enhanced MS3 1.4.0, sequential injection, sequential ignition, big turbo, lots of boost
2005 Audi A3 2.0L TFSI DSG AWD - Extreme MS3
2002 Mazda Miata 1.8 6sp - Enhanced MS3 1.4.0, sequential injection, sequential ignition, big turbo, lots of boost
-
- Super MS/Extra'er
- Posts: 1072
- Joined: Fri Sep 16, 2011 5:29 am
- Location: Brisbane, Australia
- Contact:
Re: Slight misfire after throttle is pressed
Just diff the entire msextra folder ..... .!?
Mazda MX5 + MS3 Pro
Re: Slight misfire after throttle is pressed
Exactly what I am trying to avoid.
The man behind MS Labs
2005 Audi A3 2.0L TFSI DSG AWD - Extreme MS3
2002 Mazda Miata 1.8 6sp - Enhanced MS3 1.4.0, sequential injection, sequential ignition, big turbo, lots of boost
2005 Audi A3 2.0L TFSI DSG AWD - Extreme MS3
2002 Mazda Miata 1.8 6sp - Enhanced MS3 1.4.0, sequential injection, sequential ignition, big turbo, lots of boost