figured out how to associate ODB-II error codes with error checking subroutines
#1
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.
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.
OBD-II error code table
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>
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 ....
Last edited by mrfred; Apr 18, 2008 at 05:15 PM.
#4
Evolved Member
iTrader: (2)
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
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
#5
Evolved Member
iTrader: (13)
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.
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.
Trending Topics
#11
Evolved Member
iTrader: (18)
Nice find!!!!!!!!!!
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:
<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.
Thread
Thread Starter
Forum
Replies
Last Post