follow ft86club on our blog, twitter or facebook.
FT86CLUB
Ft86Club
Delicious Tuning
Register Garage Community Calendar Today's Posts Search

Go Back   Toyota GR86, 86, FR-S and Subaru BRZ Forum & Owners Community - FT86CLUB > Technical Topics > Software Tuning

Software Tuning Discuss all software tuning topics.


User Tag List

Reply
 
Thread Tools Search this Thread
Old 10-17-2013, 07:04 PM   #29
stugray
Banned
 
Join Date: Sep 2013
Drives: 2013 GBS BRZ Limited
Location: Colorado
Posts: 1,925
Thanks: 627
Thanked 1,445 Times in 711 Posts
Mentioned: 41 Post(s)
Tagged: 0 Thread(s)
This is still somewhat related to the OP:
1 - When the ECU boots, I assume that it transfers the software image from Flash Memory to RAM, then begins executing from RAM - Yes?

2 - Once the ECU SW is running, the CAN bus monitor may request data by asking directly for memory addresses from RAM? I have a tactrix cable (waiting on definitions) and an ELM327 OBDII monitor. So when the OBDII monitor is requesting data, is the ECU actually just reporting memory contents?

3 - I read some of the "AccessTUNER_HelpFile_Subaru" manual from COBB tuning. The way it reads, it sounds like the manual is suggesting that you can make modifications to parameters in the MAPs (obviously in RAM, not flash) while the engine is running. Is that the case?
If not it seems like having to reflash for every tiny adjustment would be a huge PITA (not to mention a risk to the ECU having to do it too often).

Am I close?
stugray is offline   Reply With Quote
Old 10-17-2013, 09:31 PM   #30
FirestormFRS
Senior Member
 
Join Date: Jul 2012
Drives: 2013 FR-S
Location: Anytown
Posts: 920
Thanks: 73
Thanked 643 Times in 302 Posts
Mentioned: 3 Post(s)
Tagged: 0 Thread(s)
Quote:
Originally Posted by arghx7 View Post
They don't leave very good documentation and concentrate it in the minds of a core group of team members. Remember that there is limited turnover in Japanese companies so they can count on those individuals sticking around for a while.

That's so far off base. Because they do a better job of controlling documentation than other companies doesn't mean they don't document every single bit of information about every single step of the manufacturing process. The most impressive part of working for them is the level at which you learn to document every single thing.....twice.

Those guys are the kings of crossing your T's and dotting your I's.
FirestormFRS is offline   Reply With Quote
Old 10-17-2013, 10:19 PM   #31
arghx7
Senior Member
 
Join Date: Nov 2011
Drives: car
Location: cold
Posts: 599
Thanks: 72
Thanked 607 Times in 185 Posts
Mentioned: 33 Post(s)
Tagged: 0 Thread(s)
Quote:
Originally Posted by stugray View Post
This is still somewhat related to the OP:
1 - When the ECU boots, I assume that it transfers the software image from Flash Memory to RAM, then begins executing from RAM - Yes?
I'm not an expert on the minutiae of how that kind of low-level handling of data occurs on a production controller (stock ECU that comes on your car). On a $10k prototype ECU, yes that's true for the most part. There are external RAM modules that plug into a modified ECU. And that's why you can make realtime changes to anything that would normally be stored in ROM. On a stock ECU, only small portions run in RAM at a time. It would be WAY too expensive (in the mass production sense) to have the amount of RAM equal or exceed the amount of flash memory on you mom's minivan.

Quote:
2 - Once the ECU SW is running, the CAN bus monitor may request data by asking directly for memory addresses from RAM? I have a tactrix cable (waiting on definitions) and an ELM327 OBDII monitor. So when the OBDII monitor is requesting data, is the ECU actually just reporting memory contents?
Again, I don't know every detail of how all that is handled on the lowest level of the system and how it varies with manufacturers. What I can tell you is the ECU is sending a ton of messages across the bus in its normal operations. When you send a request through a normal OBD II, you are communicating through a standardized system for requesting data. You are intrusively asking for something; you're not reading RAM values with some tool you can get off ebay. You're reading whatever the ECU chose to report, at whatever speed it decides to give you based on its prioritizing of the bus.

IF you have the right commercial tools, you can read the "real" CAN signals that are already going on the network. Probably the most common commerical tool is Vector CANalyzer. This includes things like vehicle yaw rates, steering angle, turn signal commands, and torque requests from various modules. It's all (or some portions) a bunch of hexidecimal nonsense unless you have access to the CAN .dbc file from the OEM.

Quote:
3 - I read some of the "AccessTUNER_HelpFile_Subaru" manual from COBB tuning. The way it reads, it sounds like the manual is suggesting that you can make modifications to parameters in the MAPs (obviously in RAM, not flash) while the engine is running. Is that the case?
If not it seems like having to reflash for every tiny adjustment would be a huge PITA (not to mention a risk to the ECU having to do it too often).
If I run a standalone ECU like an AEM EMS, for the most part I can change any important value in the ECU in real time. If I have a prototype stock ECU (which is very very expensive) and all the right resources I can move all the ROM values into an external RAM module. From there, I can change anything I want in real time and record at a very speed.

With an Accessport (and a few other tools out there for various applications), Cobb has cleverly managed to use built-in RAM on the stock ECU so that some realtime changes are possible. So when you tune a WRX with AccessTuner, you get a small list of "realtime maps" which include primary fuel and spark, boost control, rev limiter, etc. This is a tiny portion of all the normal ROM values, but it's all you need for most tuning activities. These values will stay active as long as the battery isn't unplugged. You have to flash the changes to the stock ECU (just like a dealer tool would) to make the changes permanent. The final result is a much easier tuning process for most things in an affordable and usable package.

Some things can be very very difficult or at least time consuming to tune in a vehicle when reflashing is the only method. MAF and injector scaling is a big one, and boost control. IMO, that alone is worth the money for going with Cobb over Opensource on a DIY tuning project if you have a WRX/STi.

Quote:
Originally Posted by FirestormFRS View Post
That's so far off base. Because they do a better job of controlling documentation than other companies doesn't mean they don't document every single bit of information about every single step of the manufacturing process. The most impressive part of working for them is the level at which you learn to document every single thing.....twice.

Those guys are the kings of crossing your T's and dotting your I's.
I'm not referring to manufacturing. That's something the supplier deals with. I am referring to information on what all the maps in the ECU do and how all the values are calculated. I am referring to information on what tables to modify in what order to actually make useful changes.

Now, are some polished information about controls given to government regulators to satisfy certain questions of OBD and emissions? Of course.
arghx7 is offline   Reply With Quote
The Following User Says Thank You to arghx7 For This Useful Post:
stugray (10-17-2013)
Old 10-17-2013, 11:18 PM   #32
stugray
Banned
 
Join Date: Sep 2013
Drives: 2013 GBS BRZ Limited
Location: Colorado
Posts: 1,925
Thanks: 627
Thanked 1,445 Times in 711 Posts
Mentioned: 41 Post(s)
Tagged: 0 Thread(s)
Quote:
Originally Posted by arghx7 View Post
With an Accessport (and a few other tools out there for various applications), Cobb has cleverly managed to use built-in RAM on the stock ECU so that some realtime changes are possible. So when you tune a WRX with AccessTuner, you get a small list of "realtime maps" which include primary fuel and spark, boost control, rev limiter, etc. This is a tiny portion of all the normal ROM values, but it's all you need for most tuning activities.
Thanks for the detailed response.
The systems I work on give direct access to the running SW via a JTAG or serial "terminal" access.
Either of those give access to the RAM and you can manipulate memory or registers directly. However there is an OS that gives terminal access. JTAG is in hardware so it works even without code support running on the ECU

So I looked at the SH7058 manual and there IS a AUD (Advanced User Debug) port that allows direct read/write access to the system RAM while the code is running.

I thought that might be how Accessport was manipulating system parameters while in operation. You just need the correct header file for the ROM and you would have access directly to MAP data, assuming any MAP data is stored in RAM during operation.

Do the stock ROMs store any MAP data in RAM?
If so the AUD port could be used to manipulate it (Assuming it is brought out to a header or test points)

Last edited by stugray; 01-11-2014 at 01:50 PM.
stugray is offline   Reply With Quote
Old 10-18-2013, 07:00 AM   #33
arghx7
Senior Member
 
Join Date: Nov 2011
Drives: car
Location: cold
Posts: 599
Thanks: 72
Thanked 607 Times in 185 Posts
Mentioned: 33 Post(s)
Tagged: 0 Thread(s)
Quote:
Originally Posted by stugray View Post
Do the stock ROMs store any MAP data in RAM?
If so the AUD port could be used to manipulate it (Assuming it is brought out to a header or test points)
Certain learning tables are populated in real time, for knock control, fuel feedback, etc.
arghx7 is offline   Reply With Quote
Old 10-18-2013, 07:30 AM   #34
Ralph Spoilsport
Senior Member
 
Ralph Spoilsport's Avatar
 
Join Date: Aug 2013
Drives: 2013 BRZ, WRB
Location: Galt's Gulch, NH
Posts: 225
Thanks: 107
Thanked 207 Times in 93 Posts
Mentioned: 1 Post(s)
Tagged: 0 Thread(s)
at the idea that Japanese auto manufacturers and their vendors (e.g. Denso) are not documenting the shit out of their control system software.

"Unintended Acceleration", anyone?

No, I'm not an industry insider and so of course, I'm speculating.

But if *you* were running Toyota, would you be content with a "brain trust" and scanty docs? If you were a part of any .gov DOT, would *you* be content with this?
Ralph Spoilsport is offline   Reply With Quote
Old 10-18-2013, 09:44 AM   #35
arghx7
Senior Member
 
Join Date: Nov 2011
Drives: car
Location: cold
Posts: 599
Thanks: 72
Thanked 607 Times in 185 Posts
Mentioned: 33 Post(s)
Tagged: 0 Thread(s)
Quote:
Originally Posted by Ralph Spoilsport View Post
at the idea that Japanese auto manufacturers and their vendors (e.g. Denso) are not documenting the shit out of their control system software.

"Unintended Acceleration", anyone?

No, I'm not an industry insider and so of course, I'm speculating.

But if *you* were running Toyota, would you be content with a "brain trust" and scanty docs? If you were a part of any .gov DOT, would *you* be content with this?
There's a difference between documentation that Matlab spits out, basically boilerplate block diagrams, and documentation of how it actually works. In a usable "how to" form. You can reverse engineer anything, and in a global company sometimes you have to reverse engineer your own products. I realize that sounds absurd, but in global companies there are lots of divisions that don't talk to each other or trust each other for that matter.

As for the brain trust, it's part of Japanese business culture. Many Japanese companies are paranoid about corporate espionage, especially from companies in developing countries.
arghx7 is offline   Reply With Quote
Old 10-18-2013, 10:22 AM   #36
qoncept
Senior Member
 
qoncept's Avatar
 
Join Date: May 2013
Drives: 2013 BRZ
Location: Iowa
Posts: 928
Thanks: 135
Thanked 298 Times in 202 Posts
Mentioned: 1 Post(s)
Tagged: 0 Thread(s)
Garage
Quote:
Originally Posted by arghx7 View Post
You can reverse engineer anything, and in a global company sometimes you have to reverse engineer your own products.
There's a huge difference between understanding high level source code picking through assembly code in an embedded application.

Documentation for each of the ECUs processes most certainly exists. I've never heard of or even considered such a thing to be publicly available.
__________________
qoncept is offline   Reply With Quote
Old 10-21-2013, 07:30 AM   #37
mad_sb
Senior Member
 
Join Date: Jan 2013
Drives: 2013 Asphalt FR-S
Location: Orange County
Posts: 1,639
Thanks: 632
Thanked 981 Times in 537 Posts
Mentioned: 100 Post(s)
Tagged: 0 Thread(s)
Quote:
Originally Posted by stugray View Post
This is still somewhat related to the OP:
1 - When the ECU boots, I assume that it transfers the software image from Flash Memory to RAM, then begins executing from RAM - Yes?

2 - Once the ECU SW is running, the CAN bus monitor may request data by asking directly for memory addresses from RAM? I have a tactrix cable (waiting on definitions) and an ELM327 OBDII monitor. So when the OBDII monitor is requesting data, is the ECU actually just reporting memory contents?

3 - I read some of the "AccessTUNER_HelpFile_Subaru" manual from COBB tuning. The way it reads, it sounds like the manual is suggesting that you can make modifications to parameters in the MAPs (obviously in RAM, not flash) while the engine is running. Is that the case?
If not it seems like having to reflash for every tiny adjustment would be a huge PITA (not to mention a risk to the ECU having to do it too often).

Am I close?
Your talking about real time tuning and that is a ways off to say the least.
__________________
mad_sb is offline   Reply With Quote
Old 10-21-2013, 12:32 PM   #38
stugray
Banned
 
Join Date: Sep 2013
Drives: 2013 GBS BRZ Limited
Location: Colorado
Posts: 1,925
Thanks: 627
Thanked 1,445 Times in 711 Posts
Mentioned: 41 Post(s)
Tagged: 0 Thread(s)
Quote:
Originally Posted by mad_sb View Post
Your talking about real time tuning and that is a ways off to say the least.
This thinking is what led me to believe that a Unichip just might be a tuners friend.
You could install the unichip, then tune (in realtime) the timing & MAF scaling.
Then remove the unichip & incorporate those #s into the maps.
Then continue the standard tuning with flashing.

Seems it might save some time and a few flashes to the ECU.

Would that be much of a benefit?
stugray is offline   Reply With Quote
Old 10-22-2013, 02:32 AM   #39
FrX
Senior Member
 
Join Date: May 2012
Drives: 2013 Scion FR-S, 1993 Lexus SC300
Location: Houston, TX
Posts: 411
Thanks: 284
Thanked 175 Times in 102 Posts
Mentioned: 5 Post(s)
Tagged: 0 Thread(s)
Garage
With Unichip, you will constantly be fighting against the ECU itself. It will notice that things aren't happening the way it was wanting and start to apply learning compensations.
FrX is offline   Reply With Quote
Old 10-26-2013, 10:53 PM   #40
bdanisi
You Made Bro?
 
bdanisi's Avatar
 
Join Date: Dec 2012
Drives: Raven 86
Location: Laguna Niguel
Posts: 520
Thanks: 134
Thanked 241 Times in 112 Posts
Mentioned: 1 Post(s)
Tagged: 0 Thread(s)
wow this thread was not inteded for fucking casuals like me haha ill just leave tuning to the pros
__________________
"Careful though, I've seen many of my friends turn from ironic bros to full on bros by accident." - cfusionpm
bdanisi is offline   Reply With Quote
Old 10-30-2013, 07:30 PM   #41
stugray
Banned
 
Join Date: Sep 2013
Drives: 2013 GBS BRZ Limited
Location: Colorado
Posts: 1,925
Thanks: 627
Thanked 1,445 Times in 711 Posts
Mentioned: 41 Post(s)
Tagged: 0 Thread(s)
Next question(s):

1 - Does this ECU use a RTOS?
I saw this thread (http://www.ft86club.com/forums/showthread.php?t=50251) about the toyota acceleration issue and it mentions: OSEK
http://www.edn.com/design/automotive...s-consequences

OSEK Open Systems and their Interfaces for the Electronics in Motor Vehicles

So does the BRZ use a RTOS? (real time {embedded} Operating System)

That would completely change the way that the ECU code is reverse engineered.

2 - In this thread: http://www.ft86club.com/forums/showthread.php?t=47113 (Advance Mutiplier resetting on restart?) it seems that the ones that reverse engineer the code that makes this stuff go would be able to answer that question by just looking at the code.
Why cant the code monkeys answer that question for them (I am not an IDA expert, so I am not volunteering).
I just seems that if you have rev. engineered the code to determine what all the maps mean that you should be able to tell what the ECU does at boot.

I am still wondering about the state diagram that just takes this engine from: ECU Off -> ECU On -> Engine start requested...

Still learning
stugray is offline   Reply With Quote
Old 10-30-2013, 10:27 PM   #42
arghx7
Senior Member
 
Join Date: Nov 2011
Drives: car
Location: cold
Posts: 599
Thanks: 72
Thanked 607 Times in 185 Posts
Mentioned: 33 Post(s)
Tagged: 0 Thread(s)
Quote:
Originally Posted by stugray View Post
I just seems that if you have rev. engineered the code to determine what all the maps mean that you should be able to tell what the ECU does at boot.
What the maps mean and how values are calculated for engine operation are pretty different from some low-level hardware stuff. The controls are handled by the guys tuning the car, and the ECU supplier handles the low level stuff. When it's reverse engineered, often you have a guy who is good at IDA and digging through assembly code who might not be as strong in automotive controls or actual tuning methods.

Reverse engineering for tuning purposes is all about finding which "knobs to turn" to get close enough to a desired final results. Here's a perfect example: Cobb really doesn't know how ignition timing is calculated on the R35 GT-R. They found some maps though that if adjusted, will change the final ignition timing value in the intended direction.

Knowledge of those three things: how the low-level hardware and software work so you can break into the ECU, what the maps generally affect, and what to change to get the desired final result are really all separate. You can know a little bit of each, or be an expert on one or two out of three. On the OEM level, there are entire teams often within separate companies for each of those functions.
arghx7 is offline   Reply With Quote
The Following 2 Users Say Thank You to arghx7 For This Useful Post:
mobybrz (11-08-2013), stugray (10-30-2013)
 
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
WORK Emotion Wheels ** Winter Promotion || Free WORK Lugs or WORK Caps ** RavSpec Wheels and Tires 18 12-10-2013 05:19 PM
18x9.5 +38 Work Emotion CR kai Work Metal Buff Jive Turkey Wheels and Tires 22 05-20-2013 01:54 AM
Work Emotion CR Kiwami Bronze 18x8.5 +47 18x9.5 +38 (5x100) w/tires + Work lug nuts serial gixxer Wheels and Tires 41 03-29-2013 03:14 AM


All times are GMT -4. The time now is 02:52 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
User Alert System provided by Advanced User Tagging v3.3.0 (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.

Garage vBulletin Plugins by Drive Thru Online, Inc.