RomRaider Logo

RomRaider

Open Source ECU Tools
 FAQ •  Register •  Login 

RomRaider

Documentation

Community

Developers

It is currently Sat Feb 21, 2026 10:00 pm

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: AF1 Resistance Maximum Closed Loop
PostPosted: Tue Apr 29, 2025 11:40 pm 
Offline
Experienced

Joined: Sun Jun 28, 2020 6:25 am
Posts: 242
Hi there!

It seems there is a logic, at least in 32bit ECUs, that require a maximum AF1 Resistance in order to enable Closed Loop Fueling.

Background: Closed Loop fueling has a few triggers along with delays. One requirement that's a must is, to be elegible for Closed Loop, the AF1 Resistance has to be below a certain threshold, indicating that the O2 sensor is hot enough.

We had a car with a faulty O2 sensor that would show a AF1 Resistance of 52ohms with the engine already hot. Car wouldn't enable Closed Loop.

We then tested another car, within 15 seconds of the cold start, the O2 sensor resistance was already below 40. As soon as it goes below 45~40, it enabled Closed Loop Fueling.

So we figured that Closed Loop has a AF1 resistance threshold. The first car with a faulty o2 sensor wasn't throwing any o2 heater codes, because it probably fell into a loophole where the resistance wasn't too high to trigger a failed o2 heater code, but it wasn't too low that enabled closed loop fueling. So the car was stuck in open loop 'heating' mode forever and never triggered a code.

Now for the question, considering it probably has a Resistance Threshold to enable Closed Loop, is there a table that controls that?

(Interesting threshold that I can add a RAM parameter for it and use that so I can force open loop in certain circunstances)

_________________
2011 Forester S Edition 5EAT~ Flex Fuel
2011 WRX 6MT ~ Flex Fuel


Top
 Profile  
 
 Post subject: Re: AF1 Resistance Maximum Closed Loop
PostPosted: Wed May 21, 2025 2:16 am 
Offline
Experienced

Joined: Fri Aug 21, 2020 10:05 am
Posts: 321
Hard to know for sure if I'm looking at the right part of my ROM (32bit, 2005 OB NA), but there is various logic that sets and/or counts down what I think is a 'transition to CL fueling' counter. Part of the logic sets a flag if the AF sensor reading has dropped from 1.15 to 1.05. If this flag is set, the 'transition to CL fueling' counter is immediately set to nil, presumably triggering CL fueling.

I am guessing high resistance means low current which would give a falsely low lambda reading. Perhaps the first car never reported a lambda of less than 1.05 and so never triggered CL fueling.

You could check this with your second car by logging lambda and CL fueling and see if the transition to CL occurs at a consistent lambda value of approx 1.05

These values are not tables, they are constants stored in the ROM near to the CL Fueling Target Compensation ECT Disable.

If your ROM values happen to be the same as mine, search for 0x3f 93 33 33 (1.15) followed by 0x3f 86 5f d8 (1.0497999)


Top
 Profile  
 
 Post subject: Re: AF1 Resistance Maximum Closed Loop
PostPosted: Sun May 25, 2025 4:59 pm 
Offline
Experienced

Joined: Sun Jun 28, 2020 6:25 am
Posts: 242
rimwall wrote:
Hard to know for sure if I'm looking at the right part of my ROM (32bit, 2005 OB NA), but there is various logic that sets and/or counts down what I think is a 'transition to CL fueling' counter. Part of the logic sets a flag if the AF sensor reading has dropped from 1.15 to 1.05. If this flag is set, the 'transition to CL fueling' counter is immediately set to nil, presumably triggering CL fueling.

I am guessing high resistance means low current which would give a falsely low lambda reading. Perhaps the first car never reported a lambda of less than 1.05 and so never triggered CL fueling.

You could check this with your second car by logging lambda and CL fueling and see if the transition to CL occurs at a consistent lambda value of approx 1.05

These values are not tables, they are constants stored in the ROM near to the CL Fueling Target Compensation ECT Disable.

If your ROM values happen to be the same as mine, search for 0x3f 93 33 33 (1.15) followed by 0x3f 86 5f d8 (1.0497999)


Hi there,

The car was reporting 0.98 to 1.00 lambda and 90C Coolant temps during our tests, however it was stuck in Open Loop due to insufficient temperature (supposedly the O2 sensor temperature, measured through the AF#1 Resistance)

As soon as we replaced the O2 sensor (with one that still measured the same lambda, due went lower on the resistance), it went into Closed Loop. So there must be a table which controls the Resistance threshold to allow Closed Loop operation, not only the lambda value.

The lambda values were confirmed with a Wideband also hooked up, so the sensor was reading correctly dispite the resistance and possibly temperature difference.

Regards

_________________
2011 Forester S Edition 5EAT~ Flex Fuel
2011 WRX 6MT ~ Flex Fuel


Top
 Profile  
 
 Post subject: Re: AF1 Resistance Maximum Closed Loop
PostPosted: Sun Jun 01, 2025 1:00 am 
Offline
Experienced

Joined: Fri Aug 21, 2020 10:05 am
Posts: 321
Ok, pretty sure I’m looking at the correct part of the ROM now.

Note: I’m not sure where you are getting O2 sensor temp - that doesn’t seem to exist as a parameter. But there is definitely O2 sensor resistance (aka AF 1 resistance, denote as AF1R).

There are checks on AF1R before CL is allowed:

If AF1R < 35 then CL is allowed
If AF1R > 35 and < 40 then state remains unchanged so CL is allowed or not based on prior state
If AF1R > 40 and < 50 and CL Fueling Target > 0.99 and lambda < 1.02 and lambda is within 0.0146 of CL Fueling Target then CL is allowed
If AF1R > 50 then CL is not allowed

All the above parameters aren’t tables, they are constants (still able to be edited via flash)

If your ROM values are the same, you could search for 0x420c00004220000042480000 (which is 35.0 40.0 50.0)


Top
 Profile  
 
 Post subject: Re: AF1 Resistance Maximum Closed Loop
PostPosted: Sun Jun 01, 2025 1:21 am 
Offline
Experienced

Joined: Sun Jun 28, 2020 6:25 am
Posts: 242
rimwall wrote:
Ok, pretty sure I’m looking at the correct part of the ROM now.

Note: I’m not sure where you are getting O2 sensor temp - that doesn’t seem to exist as a parameter. But there is definitely O2 sensor resistance (aka AF 1 resistance, denote as AF1R).

There are checks on AF1R before CL is allowed:

If AF1R < 35 then CL is allowed
If AF1R > 35 and < 40 then state remains unchanged so CL is allowed or not based on prior state
If AF1R > 40 and < 50 and CL Fueling Target > 0.99 and lambda < 1.02 and lambda is within 0.0146 of CL Fueling Target then CL is allowed
If AF1R > 50 then CL is not allowed

All the above parameters aren’t tables, they are constants (still able to be edited via flash)

If your ROM values are the same, you could search for 0x420c00004220000042480000 (which is 35.0 40.0 50.0)


Hi there,

Alright now it all checks out!

Code:
ROM:000C2D2C Minimum_AF1R_Closed_Loop_Normal_Op:.data.l 35.0
ROM:000C2D2C                                         ; DATA XREF: sub_21942:loc_219A6↑o
ROM:000C2D2C                                         ; sub_21A46:off_21B04↑o
ROM:000C2D30 Minimum_AF1R_Closed_Loop_Lambda_Check:.data.l 40.0
ROM:000C2D30                                         ; DATA XREF: sub_21942:loc_219B6↑o
ROM:000C2D30                                         ; sub_21A46:off_21B08↑o
ROM:000C2D34 Maximum_AF1R_Closed_Loop:.data.l 50.0   ; DATA XREF: sub_21942:loc_21A08↑o


sub_21942 references the RAM memory of the AF1Res:

Code:
mov.l   #pAf1Res, r2


Compares it to the values:

Code:
loc_219A6:
mov.l   #Minimum_AF1R_Closed_Loop_Normal_Op, r2
fmov.s  @r2, fr8
fcmp/gt fr8, fr4
bt      loc_219B6



Regarding the temperature reference;

The AFR1 temperature is measured through the resistance parameter. Resistance drops accordingly to the temperature of the AF Sensor. Seems like the operating temperature for the sensor gives it a resistance of 30~32ohms, which makes sense for allowing CL operation below 35omhs.

By the way, some patches even implement a "EGT warning" when AF1R is lower than 25omhs.

_________________
2011 Forester S Edition 5EAT~ Flex Fuel
2011 WRX 6MT ~ Flex Fuel


Top
 Profile  
 
 Post subject: Re: AF1 Resistance Maximum Closed Loop
PostPosted: Sun Jun 01, 2025 3:17 am 
Offline
Experienced

Joined: Fri Aug 21, 2020 10:05 am
Posts: 321
Cool, glad it worked. That’s one more needle found in the haystack!

On temperature, I was just wondering whether degC values are actually calculated/used/reported. My ROM never seems to convert the resistance to a temperature in degC. It just does everything using the resistance value in ohms.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subsilver by phpBBservice.nl