Slight misfire after throttle is pressed

This is a forum for discussing the development and testing of alpha MS2/Extra code. Documentation
(Runs on MS2 and Microsquirt)

Moderators: jsmcortina, muythaibxr

racingmini_mtl
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

Post by racingmini_mtl »

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
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
gslender
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

Post by gslender »

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

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();
            }
I'll let the developers decide which is relevant etc.

G
Mazda MX5 + MS3 Pro
racingmini_mtl
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

Post by racingmini_mtl »

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
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
racingmini_mtl
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

Post by racingmini_mtl »

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
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
gslender
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

Post by gslender »

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

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

Post by racingmini_mtl »

The code will be in the next release assuming it is completely fixed.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
jagdude
Experienced MS/Extra'er
Posts: 230
Joined: Thu Jan 29, 2009 9:43 am

Re: Slight misfire after throttle is pressed

Post by jagdude »

racingmini_mtl wrote:The code will be in the next release assuming it is completely fixed.

Jean
Jean,
Does the code you corrected affect only the sequential setups that the Miata installations use??

Jim
Zaphod
Master MS/Extra'er
Posts: 390
Joined: Thu Aug 14, 2008 11:38 pm
Location: Germany

Re: Slight misfire after throttle is pressed

Post by Zaphod »

Thank you very much Jean (and James) for this... I am going to try ASAP.

I call back on how it works.
--------------------------------
fun is not a straight line

Image

Sven
http://www.mx-5club-sachsen.de
http://miata.cardomain.com/id/svenmx5
NB-1998-1,6-Garrett T25 HGP Turbo Stage I
Reverant
Super MS/Extra'er
Posts: 1233
Joined: Sat Apr 15, 2006 12:39 am
Location: Athens, Greece

Re: Slight misfire after throttle is pressed

Post by Reverant »

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

Post by richyvrlimited »

Great job Jean.

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.
Zaphod
Master MS/Extra'er
Posts: 390
Joined: Thu Aug 14, 2008 11:38 pm
Location: Germany

Re: Slight misfire after throttle is pressed

Post by Zaphod »

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!
--------------------------------
fun is not a straight line

Image

Sven
http://www.mx-5club-sachsen.de
http://miata.cardomain.com/id/svenmx5
NB-1998-1,6-Garrett T25 HGP Turbo Stage I
richyvrlimited
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

Post by richyvrlimited »

Good news Zaphod

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.
Reverant
Super MS/Extra'er
Posts: 1233
Joined: Sat Apr 15, 2006 12:39 am
Location: Athens, Greece

Re: Slight misfire after throttle is pressed

Post by Reverant »

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
BenGTT
Master MS/Extra'er
Posts: 387
Joined: Sun Nov 23, 2008 4:46 am
Location: France

Re: Slight misfire after throttle is pressed

Post by BenGTT »

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
jsmcortina
Site Admin
Posts: 39615
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: Slight misfire after throttle is pressed

Post by jsmcortina »

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

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".
BenGTT
Master MS/Extra'er
Posts: 387
Joined: Sun Nov 23, 2008 4:46 am
Location: France

Re: Slight misfire after throttle is pressed

Post by BenGTT »

Thank you James, this is a very good explanation and interesting :)

Ben
racingmini_mtl
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

Post by racingmini_mtl »

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
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
Reverant
Super MS/Extra'er
Posts: 1233
Joined: Sat Apr 15, 2006 12:39 am
Location: Athens, Greece

Re: Slight misfire after throttle is pressed

Post by Reverant »

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

Post by gslender »

Just diff the entire msextra folder ..... .!? :?
Mazda MX5 + MS3 Pro
Reverant
Super MS/Extra'er
Posts: 1233
Joined: Sat Apr 15, 2006 12:39 am
Location: Athens, Greece

Re: Slight misfire after throttle is pressed

Post by Reverant »

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
Post Reply