Megasquirt for those with 029v problems
for those with 029v problems
For those with 029v problems, I found and fixed the bug.
I never saw it before because I was running a fixed trailing timing of 0 degrees in order to do some testing, which will avoid the piece of code that was causing the problem.
The fix was a single line of code in the SPARKTIME routine.
Previously, to get rid of the random spikes and dips, James added a pshh to the top of every ISR, and a pulh before all the places each ISR could exit. Basically what these did was save a copy of the "h" register to the stack at the beginning of each ISR, and then put it back into the "h" register at the end (freeing that stack entry in the process). This worked to get rid of the spikes, but there was a single rti (return from interrupt) in the SPARKTIME routine that didn't have a pulh before it, and guess where that was.... In the part of the code that sets the timer for trailing ignition. So basically the stack was overflowing, but only when trailing required the timer to be set.
Anyway, those who were having problems, please grab 029w from the firmware thread, and post results here. I have tested on the bench with settings that previously caused the problem, and the problem does not occur anymore.
Ken
I never saw it before because I was running a fixed trailing timing of 0 degrees in order to do some testing, which will avoid the piece of code that was causing the problem.
The fix was a single line of code in the SPARKTIME routine.
Previously, to get rid of the random spikes and dips, James added a pshh to the top of every ISR, and a pulh before all the places each ISR could exit. Basically what these did was save a copy of the "h" register to the stack at the beginning of each ISR, and then put it back into the "h" register at the end (freeing that stack entry in the process). This worked to get rid of the spikes, but there was a single rti (return from interrupt) in the SPARKTIME routine that didn't have a pulh before it, and guess where that was.... In the part of the code that sets the timer for trailing ignition. So basically the stack was overflowing, but only when trailing required the timer to be set.
Anyway, those who were having problems, please grab 029w from the firmware thread, and post results here. I have tested on the bench with settings that previously caused the problem, and the problem does not occur anymore.
Ken
I'll hopefully be firing up a S4 TurboII tomorrow night, or Wednesday at the latest. I've already grabbed the 029W code and will be running that.
God I hope everything works right, we've got a practice event this coming weekend. This was supposed to be a simple Ignition Control on a Carbed Bidgeported 12A, but due to damaged end plates became a Fuel Injected S4 TurboII.
God I hope everything works right, we've got a practice event this coming weekend. This was supposed to be a simple Ignition Control on a Carbed Bidgeported 12A, but due to damaged end plates became a Fuel Injected S4 TurboII.
Trending Topics
Hello,
you may wonder why me as an VW-Driver from Germany registers on a US Mazda-Site? Well, the reason is tha I wanted to say "Thank you" to muythaibxr for his modified Megasquirt Code!
I drive a "VW Derby", a small and ugly VW, that was never ever available in the USA. Meanwhile the Car is 25 Years old and 4 years ago I installed a 1300ccm Injector engine from a newer modell. In December I installed a Megasquirt on it with 029T Code and it ran fine so far. I just wondered about the "Spikes", when I looked at the TDC-Mark with my Ignition timing light. It took a few weeks, the the old little Car ran fine and with less Gas consumption than ever before. A few weeks ago I had read that they recognized a "spiking"-Problem in the Msnsextra-Code and fixed it in Version 029V. You can think what happened? I downloaded the Code, modified the Sensor Values with Easytherm and flashet it into my Mini-MS.
After this the Problems began: The starting behaviour was absolutely miserable. The cold Enginge stalled 3-4 times immediately, then it kept running. The EGO values showed, that the engine 3-4 Seconds after Starting ran extreme lean. I could not imagine, that the "new" Code was buggy and so I tried modifying the Cranking fuel, the ASE and so on. Additionally I had to rise the Idle RPM, it was lower than with Code 029T (??)
Yesterday I was really Annoyed about this and Google lead me up to this Page. I took the "W" Code, flashed it into my MS ans -guess- yeah! No problems at all! The car runs better than ever before. Als far as I can see on MLV and Timing Light, the "Spiking" has gone. Yeah. I could re-use the old Values from my 029T Setup.
Thank you
I think that my setup in the Car is "problematic" for the 029V Code? The Engine has a Distributor with Hall effect Sensor and it triggers 5°btdc, so i can use the "trigger retunrn" Option for Cranking.
Thanks and keep on rockin (and excuse my bad english ;-) )
Pigga
P.S.: I wonder that noone seems to have Problems with the 029V Code so far?
you may wonder why me as an VW-Driver from Germany registers on a US Mazda-Site? Well, the reason is tha I wanted to say "Thank you" to muythaibxr for his modified Megasquirt Code!
I drive a "VW Derby", a small and ugly VW, that was never ever available in the USA. Meanwhile the Car is 25 Years old and 4 years ago I installed a 1300ccm Injector engine from a newer modell. In December I installed a Megasquirt on it with 029T Code and it ran fine so far. I just wondered about the "Spikes", when I looked at the TDC-Mark with my Ignition timing light. It took a few weeks, the the old little Car ran fine and with less Gas consumption than ever before. A few weeks ago I had read that they recognized a "spiking"-Problem in the Msnsextra-Code and fixed it in Version 029V. You can think what happened? I downloaded the Code, modified the Sensor Values with Easytherm and flashet it into my Mini-MS.
After this the Problems began: The starting behaviour was absolutely miserable. The cold Enginge stalled 3-4 times immediately, then it kept running. The EGO values showed, that the engine 3-4 Seconds after Starting ran extreme lean. I could not imagine, that the "new" Code was buggy and so I tried modifying the Cranking fuel, the ASE and so on. Additionally I had to rise the Idle RPM, it was lower than with Code 029T (??)
Yesterday I was really Annoyed about this and Google lead me up to this Page. I took the "W" Code, flashed it into my MS ans -guess- yeah! No problems at all! The car runs better than ever before. Als far as I can see on MLV and Timing Light, the "Spiking" has gone. Yeah. I could re-use the old Values from my 029T Setup.
Thank you
I think that my setup in the Car is "problematic" for the 029V Code? The Engine has a Distributor with Hall effect Sensor and it triggers 5°btdc, so i can use the "trigger retunrn" Option for Cranking.
Thanks and keep on rockin (and excuse my bad english ;-) )
Pigga
P.S.: I wonder that noone seems to have Problems with the 029V Code so far?
Last edited by Pigga; Feb 20, 2007 at 02:44 PM.
I believe 029V had taken care of the spike issue, however it introduced a bug that, I thought was rotary-ignition specific, since we seemed to be the only ones having "strange behaviour" issues. But yes muythai found it and corrected it, gogo Ken!
Yeah, James and I talked about the fix for the spikes and agreed that it *could* be the problem, but James is the one that did the work and testing to fix it. He just missed a spot for the rotary case, which I found and fixed.
Pigga, if your car was running poorly on 029v, it probably wasn't a problem with the code unless you somehow had rotary enabled.
Ken
Pigga, if your car was running poorly on 029v, it probably wasn't a problem with the code unless you somehow had rotary enabled.
Ken
Hm...mysterious...
A friend of mine is driving a Toyota MR2. When he updated the MS, he had this problem, too (?). I wondered about this anyhow, because the feedback concerning the 029V Code in other boards was nerby 100% positive. Maybe it is possible that the downloaded Code of the 029V Firmware was corrupted? I just wondered why my car was starting miserable after updating. Are you sure that your Code changes cannot influence the code as it works on simple Machines like my car? Hmm...
Anyhow: You saved my day. Tomorrow morning IŽll gonna have to start when its 30°F outside, and then it will be a sake if it runs smootly at once ;-)
The next time I see a NSU Ro 80 IŽll gonna think of you ;-)
Pigga (<-who doesnt understand why heŽs the only one where the 029V Code doesnŽt work??)
A friend of mine is driving a Toyota MR2. When he updated the MS, he had this problem, too (?). I wondered about this anyhow, because the feedback concerning the 029V Code in other boards was nerby 100% positive. Maybe it is possible that the downloaded Code of the 029V Firmware was corrupted? I just wondered why my car was starting miserable after updating. Are you sure that your Code changes cannot influence the code as it works on simple Machines like my car? Hmm...
Anyhow: You saved my day. Tomorrow morning IŽll gonna have to start when its 30°F outside, and then it will be a sake if it runs smootly at once ;-)
The next time I see a NSU Ro 80 IŽll gonna think of you ;-)
Pigga (<-who doesnt understand why heŽs the only one where the 029V Code doesnŽt work??)
Last edited by Pigga; Feb 20, 2007 at 05:48 PM.
Yeah, I only added a single line of code to 029w, and it only changed behavior on the rotary. The rest of the source code stayed the same between 029v and 029w, so there has to have been something else wrong.
Ken
Ken
Thread
Thread Starter
Forum
Replies
Last Post
The1Sun
1st Generation Specific (1979-1985)
7
Sep 18, 2015 07:13 PM
The1Sun
New Member RX-7 Technical
5
Sep 15, 2015 04:45 PM



)
.