Tuesday, April 12, 2011

NB Miata - OBD Mode 8

Today I'm going to talk about Mode 8.  It's been a while since I posted, partly because I have been busy with other things, and partly because I was hoping to have a more complete picture of what Mode 8 does.  Unfortunately, it's still mostly a mystery to me.  But at least I can tell you what I know.

In general Mode 8 is used to control some on-board system, sometimes to create conditions necessary to test a component or subsystem.  In my ECU, here's the quick summary:
  1. In the NB Miata, it only applies to OBD-II vehicles.  Any other flavor will simply respond to a Mode 8 request with an error reply.
  2. Only two PIDs are supported:  00 and 01.
  3. The request message must be 11 bytes long, so must be zero-padded.  And the extra bytes cannot be anything other than zero.
  4. PID 0 is just a PIDs supported request.  Since I'm telling you now that only 0 and 1 are supported, this is no longer of any use to you.
  5. If a PID 1 request is sent and bit 0 of 10055 is set at the time, then the ECU will set bit 0 of 108ED and respond with an affirmative OBD reply.
I think that the request is only honored if the engine is not running at the time, but I'm not 100% sure if that's the case.  Anyway, while it may seem like a lot of trouble just to set one bit in memory, setting that bit has a pretty significant ripple effect.  I'm not sure I've discovered all of the secondary effects, and I'm pretty much in the dark about what the ultimate purpose is, but it appears to temporarily put the ECU in an altered state, and there are literally dozens of places in the the code that are ultimately affected.  Some of the affected subroutines are related to the short term fuel trim, but there are many others that I still have no idea what they are used for.

I hope to eventually unravel the complete story.  In the meantime, if you are willing to try, you can see if you can get your car to accept a Mode 8 PID 1 command and see if you can tell how your car's behavior changes.  I doubt very much that Mazda would build in a test that could potentially damage your car, but of course I can't guarantee it, so proceed at your own risk.

Next time, Mode 9?  Sorry, but the NB Miata doesn't support Mode 9.  In fact, the next higher supported mode is Mode 13.

4 comments:

  1. Great blog, please keep it up. Not much info about Mazda ecus out there.

    ReplyDelete
  2. Are these the KOEO and KOER tests? Key on engine off/running.

    I've seen them listed in a list of Mazda extended PIDs.

    Also, there is an NC Miata ROM publicly available: LFH9-F. If you want to compare.

    Please post more!

    ReplyDelete
  3. Hi !
    Great posts ! I stumbled on them while looking for info on my 1992 MX-3 ecu.
    This is a pre-OBDII ecu and i am looking if there is any way to get real time engine data out of it.
    Based on the info i have gathered it looks like that pre-OBDII Mazda ecu's supported a "K-line" "compatible" bus running at @100 bytes/sec when triggered by a 20Hz square pulse on the L-line
    I am still in the research stage (and a total newbie regarding ecu's) so i was wondering if you have seen anything similar in the Miata's ecu or any other Mazda MECS ecu

    ReplyDelete
  4. The NB's still have the old pre-OBDII diagnostic port under the hood - at least mine does(in the engine compartment, just above the left wheel). Is that what you're referring to? As far as I can tell, it's still supported, but I've been concentrating on the OBDII port, so I can't tell you much about it at this point.

    ReplyDelete