Notices
ECU Flash

figured out how to associate ODB-II error codes with error checking subroutines

Thread Tools
 
Search this Thread
 
Old Apr 18, 2008, 10:40 AM
  #1  
EvoM Guru
Thread Starter
iTrader: (50)
 
mrfred's Avatar
 
Join Date: Mar 2006
Location: Tri-Cities, WA // Portland, OR
Posts: 9,675
Received 128 Likes on 96 Posts
figured out how to associate OBD-II error codes with error checking subroutines

I just figured out how to associate OBD-II error codes with the OBD-II test subroutines in the ROM. This should be very helpful in tracking down some of the more challenging sensor inputs. I'll write more after I get my notes straightened out.

NEW INFO
First a disclaimer: Most of this stuff will only be useful for people who are working on the ROM code.

Next, I want to mention that a post by Bez on Aktivematrix was very helpful in figuring this stuff out.

Below is a picture of the OBD-II code table for my Evo 9 88590015. The ECUFlash definition for the 88590015 ROM is shown below. For other ROMs it will be necessary to change "a70c" to someting else. Search on "04310173" in HEX view to find the correct address. The table size is smaller too in older ROMs. There are only 9 elements for the "r5" rows.

Code:
<table name="OBD-II codes" category="OBD-II" address="a70c" type="3D" level="1" scaling="Hex16">
      <table name="r4 (hex)" type="Static X Axis" elements="16" scaling="Hex16">
       <data>8000</data>
       <data>4000</data>
       <data>2000</data>
       <data>1000</data>
       <data>800</data>
       <data>400</data>
       <data>200</data>
       <data>100</data>
       <data>80</data>
       <data>40</data>
       <data>20</data>
       <data>10</data>
       <data>8</data>
       <data>4</data>
       <data>2</data>
       <data>1</data>
      </table>
      <table name="r5 (hex)" type="Static Y Axis" elements="16">
        <data>00</data>
        <data>01</data>
        <data>02</data>
        <data>03</data>
        <data>04</data>
        <data>05</data>
        <data>06</data>
        <data>07</data>
        <data>08</data>
        <data>09</data>
        <data>0A</data>
        <data>0B</data>
        <data>0C</data>
        <data>0D</data>
        <data>0E</data>
        <data>0F</data>
      </table>
    </table>
The table axes are values for registers r4 and r5. Each error code has a unique r4 and r5 value that is used to call it at the end of an OBD-II test subroutine. These r4 and r5 values can usually be found towards the end of the OBD-II test subroutine where they are used to send data to two other subroutines. I think that one of these subroutines is to set an error code, and the other is to clear an error code. Still working this out.

Anyhow, just above these subroutine calls, registers r4 and r5 will have some (hex) numbers moved into them. Use these r4 and r5 values to determine the OBD-II error code for the particular subroutine. Below is an example of what to look for. In this example, r4 = 1, and r5=9. The OBD-II code table tells me that the associated error code is P0365, and so this ODB-II test subroutine checks for intake cam sensor issues.

I think this is just the tip of the iceberg on what can be done here. Next step is probably to figure out how to control the pass/fail/not ready flag.

Code:
...
ROM:00047C00                 mov     #1, r4
ROM:00047C02                 mov     #9, r5
ROM:00047C04                 mov     #0, r6
ROM:00047C06                 mov     #2, r7
ROM:00047C08                 mov.l   @(h'A8,pc), r10 ; [00047CB4] = sub_328CA ; P0365 - intake cam sensor circuit
ROM:00047C0A                 jsr     @r10 ; sub_328CA ; must be OBD-II error set subroutine
....
OBD-II error code table
Attached Thumbnails figured out how to associate ODB-II error codes with error checking subroutines-obd-ii-code-table.gif  

Last edited by mrfred; Apr 18, 2008 at 05:15 PM.
Old Apr 18, 2008, 10:43 AM
  #2  
Evolved Member
iTrader: (6)
 
tkklemann's Avatar
 
Join Date: Jul 2005
Location: Charleston, SC
Posts: 1,228
Likes: 0
Received 0 Likes on 0 Posts
OHHH MY!!!! OHH MYYYYYY!!!!!!!!

Shall we say to go after the P0300's first?!?!?
Old Apr 18, 2008, 12:25 PM
  #3  
Evolved Member
iTrader: (4)
 
bnice01's Avatar
 
Join Date: May 2007
Location: Hurlburt Field, FL
Posts: 688
Likes: 0
Received 0 Likes on 0 Posts
Originally Posted by tkklemann
OHHH MY!!!! OHH MYYYYYY!!!!!!!!

Shall we say to go after the P0300's first?!?!?


WOW mrfred good work
Old Apr 18, 2008, 12:27 PM
  #4  
Evolved Member
iTrader: (2)
 
l2r99gst's Avatar
 
Join Date: Mar 2004
Location: CA
Posts: 3,499
Likes: 0
Received 4 Likes on 4 Posts
Very, very cool.

Depending on what you found, this should eventually enable us to set the readiness bits for the tests that have them. I remember Bez stating that you can reference a void test and the tests will be marked as passed, but I got lost there and no more replies to that thread on AktiveMatrix.

I found the table with the OBD-II codes in my ROM though. Although, it's nice to looks at it doesn't do me much good.

Eager to hear what you found.


Eric
Old Apr 18, 2008, 02:26 PM
  #5  
G20
Evolved Member
iTrader: (13)
 
G20's Avatar
 
Join Date: May 2003
Location: Orange County, CA
Posts: 1,059
Likes: 0
Received 11 Likes on 9 Posts
is it similar to how the software ScanTech doing it? It stored information right when the error occured, i.e. LOAD, RPM, TIMING, TEMPERATURE...

I was able to use those information from ScanTech to get risk of my p0300 code by adjusting the flash based on the given info.
Old Apr 18, 2008, 03:00 PM
  #6  
Evolved Member
iTrader: (5)
 
Mr. Evo IX's Avatar
 
Join Date: Nov 2005
Location: Plano, TX
Posts: 1,910
Received 1 Like on 1 Post
Originally Posted by G20
is it similar to how the software ScanTech doing it? It stored information right when the error occured, i.e. LOAD, RPM, TIMING, TEMPERATURE...

I was able to use those information from ScanTech to get risk of my p0300 code by adjusting the flash based on the given info.
What specifically in your flash was causing the problem? excessive timing / fueling? something else?

Last edited by Mr. Evo IX; Apr 19, 2008 at 05:17 PM.
Old Apr 18, 2008, 03:10 PM
  #7  
G20
Evolved Member
iTrader: (13)
 
G20's Avatar
 
Join Date: May 2003
Location: Orange County, CA
Posts: 1,059
Likes: 0
Received 11 Likes on 9 Posts
^usually sudden timing changed between LOADs and RPMs when daily driving. I believed it can help a lot of members here to resolve their random codes problem but I'm not sure so I don't want to post it up yet. But ScanTech does help me a lot.
Old Apr 18, 2008, 04:49 PM
  #8  
EvoM Guru
Thread Starter
iTrader: (50)
 
mrfred's Avatar
 
Join Date: Mar 2006
Location: Tri-Cities, WA // Portland, OR
Posts: 9,675
Received 128 Likes on 96 Posts
First post updated.
Old Apr 18, 2008, 05:00 PM
  #9  
Evolved Member
iTrader: (2)
 
l2r99gst's Avatar
 
Join Date: Mar 2004
Location: CA
Posts: 3,499
Likes: 0
Received 4 Likes on 4 Posts
Good stuff, mrfred.

The address for 96940011 is 8b18. 16x13 elements.


Eric
Old Apr 18, 2008, 08:50 PM
  #10  
Evolved Member
iTrader: (2)
 
logic's Avatar
 
Join Date: Apr 2003
Location: Berkeley, CA
Posts: 1,022
Likes: 0
Received 5 Likes on 4 Posts
96530006 is at 0x95B0, also with 16x13 elements, to save someone else the trouble.
Old May 12, 2008, 03:32 PM
  #11  
Evolved Member
iTrader: (18)
 
alan678's Avatar
 
Join Date: Mar 2005
Location: La Jolla, CA
Posts: 1,235
Likes: 0
Received 1 Like on 1 Post
Nice find!!!!!!!!!!

Originally Posted by l2r99gst
Good stuff, mrfred.

The address for 96940011 is 8b18. 16x13 elements.


Eric
So along with writing a 13 where the 16 is below:

<table name="r5 (hex)" type="Static Y Axis" elements="16">

Do we also remove this data?

<data>0D</data>
<data>0E</data>
<data>0F</data>

Deleting/revising as shown above:



Using the code in the first post with the correct address for 96940011:


Last edited by alan678; May 12, 2008 at 03:43 PM.
Old May 12, 2008, 03:54 PM
  #12  
Evolved Member
iTrader: (2)
 
l2r99gst's Avatar
 
Join Date: Mar 2004
Location: CA
Posts: 3,499
Likes: 0
Received 4 Likes on 4 Posts
You have it correct in the first picture.


Eric
Old May 14, 2008, 12:10 PM
  #13  
Evolved Member
iTrader: (18)
 
alan678's Avatar
 
Join Date: Mar 2005
Location: La Jolla, CA
Posts: 1,235
Likes: 0
Received 1 Like on 1 Post
Originally Posted by l2r99gst
You have it correct in the first picture.


Eric
Thanks!

I cant wait to see some results!

I am willing to test with my car...let me know if I can be of any assistance...
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
itzwolf
ECU Flash
16
Mar 15, 2022 06:18 AM
Eugeny dontknow
ECU Flash
25
Dec 30, 2021 09:21 AM
l2r99gst
ECU Flash
80
Sep 19, 2012 08:03 AM
acamus
ECU Flash
4
Oct 10, 2009 08:10 AM
mchuang
ECU Flash
20
Apr 10, 2007 05:00 AM



Quick Reply: figured out how to associate ODB-II error codes with error checking subroutines



All times are GMT -7. The time now is 02:53 AM.