Here's a fix release that addresses the coils being dwelled before the PCM has demonstrated control of the EST line.
I tested the issue in question and was unable to reproduce it at initial cranking with this firmware. I have a couple videos if anyone would like to see them. There may be the possibility of instances where a coil sticks at the end of a cranking attempt, but I've no intention of addressing that for what I believe to be very good reason. Also, initial startup will generally be delayed by another 90* of crank rotation from the last release due to waiting for the PCM to "light the fire" so to speak.
I didn't intend for this to be a major code revision, but when I started looking at how the high resolution and EST interrupts were handled it occurred to me they were being abstracted through the arduino namespace into somewhat less efficient constructors. This was eliminated. I'm going to call this an "interim" release because I removed a handful of references to pinMode() in this revision, and references to digitalRead() and digitalWrite() in the upcoming 0.9.41 revision. As near as I can tell, all that remains to make this compile within the Atmel AVR Studio is a suitable replacement for the arduino Serial object. But I'm not at all convinced there's good reason to do that. Anyway, the newer external interrupt handlers should honor the interrupt handling priority intended (EST being highest, then Hi Res input, followed by Lo Res input, then all others) when I originally conceived it.
What this revision does is basically hook the EST interrupt to a rising edge trigger at startup as well as after a stall / no-start condition occurs. As soon as a rising edge signal is caught and confirmed it switches the interrupt to using a falling edge trigger in order to catch the coil firing event. The "protection mechanism" is that whenever the interrupt 0 trigger signal is set to rising edge, no coils will be dwelled.
I've given this brief road testing. Will try to do more complete testing tomorrow - a clutch stall hot restart and a few other odbball cases. If anyone has more ideas for a testing "protocol" please post them!
Bookmarks