Notices
ECU Flash

Timer unit - interrupts for CAS, airflow, injector/coil schedules

Thread Tools
 
Search this Thread
 
Old Dec 9, 2008 | 01:41 AM
  #1  
jcsbanks's Avatar
Thread Starter
Evolved Member
 
Joined: May 2006
Posts: 2,399
Likes: 6
From: UK
Timer unit - interrupts for CAS, airflow, injector/coil schedules

I'm disassembling the ATU-II code in the ECU at present.

Findings so far, will update with more as I find them.

The main loop which is interrupted by everything else processes: MUT/OBD baud, ADC, coolant enrichment, sensor/fault checks, fuel, MAF, coolant trim, knock reaction, calc of AFR*MAF, injector scaling, asynchronous acceleration enrichment, ignition and knock, secondary air system, immobiliser and CEL.

Compare match timer 0 runs at 802Hz and calls the routine longsub_inj which as its name suggests is a very long subroutine that processes loads of stuff including counters, knock, ISC, asynchronous acceleration enrichment.

Compare match timer 1 is basically unused.

Timer 1 and 11 have code but are basically unused.

Timer 0 has an input capture pin that triggers a latch of timer 2A and Timer 0(high 16 of 32 bits), a few flags bits are checked and then output compare timer 2G is set to the present value of timer 2B -1 or +D.

Timer 2 appears to be CAS related and processes knock control, and probably lots of injection/coil stuff.

Timer 8 has 16 downcounters which need disassembly.

Timer 4 need disassembly.

I expect to find airflow pulse interrupt, CAS interrupt, coil and injector scheduling code in the above. A 500 KHz timer (32MHz CPU, divide by 2 to give 16MHz peripheral clock, divide by 32 prescaler).

Last edited by jcsbanks; Dec 9, 2008 at 02:38 PM.
Reply
Old Dec 9, 2008 | 02:06 PM
  #2  
dan l's Avatar
Account Disabled
iTrader: (3)
 
Joined: Apr 2006
Posts: 1,029
Likes: 0
From: USA
If you come across anything that is related to injector timing and/or phasing that could be useful to get large injector cars to idle better on gasoline.
Reply
Old Dec 9, 2008 | 02:12 PM
  #3  
jcsbanks's Avatar
Thread Starter
Evolved Member
 
Joined: May 2006
Posts: 2,399
Likes: 6
From: UK
That is exactly the sort of thing I expect to find Whether it is easily adjustable is another matter.
Reply
Old Dec 9, 2008 | 02:24 PM
  #4  
burgers22's Avatar
Evolved Member
 
Joined: Jan 2006
Posts: 953
Likes: 2
From: Oxfordshire
Usually after 3 or 4 reads I get what jcs is on about, but I have no idea what ATU and CAS are, and Google isn't turning up much on compare match timer other than this looks familiar

MB
Reply
Old Dec 9, 2008 | 03:03 PM
  #5  
logic's Avatar
Evolved Member
iTrader: (2)
 
Joined: Apr 2003
Posts: 1,022
Likes: 7
From: Berkeley, CA
See the SH7052 documentation regarding the ATU; Section 10 is probably what you're looking for.

By CAS, I assume jcs is talking about the cam angle sensor.
Reply
Old Dec 9, 2008 | 03:17 PM
  #6  
jcsbanks's Avatar
Thread Starter
Evolved Member
 
Joined: May 2006
Posts: 2,399
Likes: 6
From: UK
The crank angle sensor (CAS) is high for the 75 to 5 degrees BTDC for each cylinder and is the main sync used for timing things. Exhaust cam sensor is used for identifying which cylinder we're working with. Intake cam sensor is used for MIVEC control. Superficially I cannot see a difference in the timer interrupts used between the MIVEC and non-MIVEC cars which is curious as I would expect a duty cycle output for MIVEC control, plus an interrupt/input capture register to read the intake cam sensor.

The reason for this work is that the flags and timers used to measure CAS and MAF and schedule the fuel and timing are useful to our overall understanding of the ECU so we can track the logic used from sensor all the way through to actuator. This should start to unlock more mysteries soon It is complex code, but I like a challenge
Reply
Old Dec 9, 2008 | 10:09 PM
  #7  
acamus's Avatar
Evolved Member
 
Joined: Mar 2008
Posts: 730
Likes: 3
From: Lattitude 48.38°, Longitude 17.58°, Altitude 146m = Slovakia, for common dude
I am glad you have started with this, it seems to be most undiscovered area of the ROM's.
Count me in, I will try to help if you ever need it
Reply
Old Dec 10, 2008 | 02:29 AM
  #8  
AndyF_RSX's Avatar
Newbie
 
Joined: Aug 2001
Posts: 56
Likes: 1
From: Geekmapped
John,
If you want, I can send you my paritally commented disassembly of my early Evo ECU that I've done to hopefully give you some pointers / ideas on how they *may* work (depending upon how much Mitsi have changed them between models)

Drop me a PM with your email address and I'll send some stuff over tonight for you to have a look at.

Andy
Reply
Old Dec 11, 2008 | 10:46 PM
  #9  
merlin.oz's Avatar
Evolved Member
15 Year Member
 
Joined: Jun 2008
Posts: 824
Likes: 24
From: Sydney
jcs, I have been tinkering with the decel fuel cut values, which I understand to be units of time.
I thought you had posted somewhere that the time units were something like 8mS.
Is this correct?
Noting the 802Hz - 1.24mS timer mentioned above, was wondering if the decel time could be translated into seconds or milli-seconds.
Reply
Old Dec 12, 2008 | 12:11 AM
  #10  
jcsbanks's Avatar
Thread Starter
Evolved Member
 
Joined: May 2006
Posts: 2,399
Likes: 6
From: UK
There are many different timers, the 802Hz is one of the master ones.

These routines are massive! Still working on them just breaking down the logic, need to go back through and start to label variables to start to piece it all together. I have endless pages of diagrams from these routines.
Reply
Old Dec 12, 2008 | 04:02 AM
  #11  
Mattjin's Avatar
Evolved Member
 
Joined: Apr 2008
Posts: 604
Likes: 0
From: Sydney, Australia
Merlin.oz, the decel fuel cut maps are definitely time related. Changing the map values changes the delay before fuel is cut, so the number have to correspond to something. If you want to get a closer idea of what the calulation is, try using very large numbers for the delay and log it.

The maps for startup delay for closed loop fuel control is also on a timer, and I found a calculation that is very close. It ended up being the value of 128 was 60 seconds, so I used:

<scaling name="DelayTime" units="sec" toexpr="x/128*60" frexpr="x/60*128" format="%.1f" min="0" max="120" inc="1" storagetype="uint8" endian="big"/>

This is different from the delay timer used for decel though.
Reply
Old Dec 12, 2008 | 07:00 PM
  #12  
COL Knock's Avatar
Newbie
 
Joined: Oct 2008
Posts: 73
Likes: 0
From: usa
You're the man, Banks
Reply
Old Feb 8, 2009 | 07:44 PM
  #13  
merlin.oz's Avatar
Evolved Member
15 Year Member
 
Joined: Jun 2008
Posts: 824
Likes: 24
From: Sydney
Mattjin, must have missed your response to this back in Dec, sorry.
Your scaling formula is suspiciously seductive, and looks typicaly Mitsi.
But what paramater are you appling this to? Starting Enrichment Delay?

I am still trying to work the Decel FuelCut Delay time into real time units.
Reply
Old Feb 9, 2009 | 02:30 AM
  #14  
Mattjin's Avatar
Evolved Member
 
Joined: Apr 2008
Posts: 604
Likes: 0
From: Sydney, Australia
It is for a map that controls the startup delay of closed loop fuel control vs engine temp. The delay is to allow for the heater element to bring the sensor up to temperature. This timer was pretty easy to find and yes it was typical of them to use this scale base.

As far as I can remember reading about it, Mitsubishi tends to run fixed EOI (end of injection) timing.
Reply
Old Feb 9, 2009 | 02:40 AM
  #15  
Slo_crx1's Avatar
Evolved Member
iTrader: (9)
 
Joined: Sep 2007
Posts: 821
Likes: 1
From: Simpson, PA
I'm going to subscribe...certain findings regarding the CAS timing setup may come in handy down the road with figuring out why the USDM Evo 8 roms don't like to play well with 2g DSM's, but the EDM roms seem to be just fine.
Reply
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
3VOLUTIONIST
ECU Flash
7
Dec 20, 2024 03:55 PM
mrb00st
E85 / Ethanol
189
Oct 11, 2024 04:59 PM
Raceghost
ECU Flash
24
Aug 10, 2018 10:39 PM
Nniikkooss
General Engine Management / Tuning Forum
0
Mar 23, 2017 01:34 AM
mrfred
ECU Flash
242
Oct 2, 2015 12:41 AM




All times are GMT -7. The time now is 02:59 PM.