Notices
ECU Flash

MUT/RAM logging

Thread Tools
 
Search this Thread
 
Old Sep 19, 2021, 06:44 AM
  #31  
Newbie
Thread Starter
iTrader: (1)
 
orion4096's Avatar
 
Join Date: Dec 2014
Location: -
Posts: 82
Likes: 0
Received 27 Likes on 11 Posts
Originally Posted by Dow Jhob
word_FFFF7D14 -FFFF7D20 ?
// logging/DMA commands - uses DMAC0 (SND) and DMAC1 (RCV)
0xFFFF7D14/6 are tcnt2a timestamps for delays
0xFFFF7D18/A is the decoded command and command state bit vector

// ICR DMA capture - uses DMAC2
0xFFFF7D1C dmac2 input capture DMA destination

0x0000FDB4 function to check if DMAC0/1 TCRs are at 0
0x0000ADD8 function pointers to perform some operation for command sequencing
0x000092AE call site for TCR check

Last edited by orion4096; Sep 20, 2021 at 06:40 AM.
Old Dec 9, 2021, 06:14 PM
  #32  
Newbie
 
Mappie's Avatar
 
Join Date: Jan 2021
Location: The Netherlands
Posts: 11
Received 0 Likes on 0 Posts
nice to see people are still active here!

any updates on the workx?

if you need any form of testing or if there is something i could help with.. shout
Old Dec 9, 2021, 08:14 PM
  #33  
Newbie
 
Dow Jhob's Avatar
 
Join Date: Jun 2016
Location: siberia
Posts: 93
Likes: 0
Received 7 Likes on 7 Posts
Originally Posted by Mappie
nice to see people are still active here!

any updates on the workx?

if you need any form of testing or if there is something i could help with.. shout
what your car for test?
Old Dec 9, 2021, 10:09 PM
  #34  
Newbie
 
Mappie's Avatar
 
Join Date: Jan 2021
Location: The Netherlands
Posts: 11
Received 0 Likes on 0 Posts
Originally Posted by Dow Jhob
what your car for test?
Ralliart Colt SR4X EvoV engine with JdmVII Ecu, came with romid: 98640014 from factory.
currently running 96530706 T V7 rom.
Old Dec 9, 2021, 10:13 PM
  #35  
Newbie
 
Dow Jhob's Avatar
 
Join Date: Jun 2016
Location: siberia
Posts: 93
Likes: 0
Received 7 Likes on 7 Posts
Originally Posted by Mappie
Ralliart Colt SR4X EvoV engine with JdmVII Ecu, came with romid: 98640014 from factory.
currently running 96530706 T V7 rom.
you can test my livemap with 9055001 rom
Old Dec 9, 2021, 10:41 PM
  #36  
Newbie
 
Mappie's Avatar
 
Join Date: Jan 2021
Location: The Netherlands
Posts: 11
Received 0 Likes on 0 Posts
Originally Posted by Dow Jhob
you can test my livemap with 9055001 rom
would be nice!
could you provide me some details? Git,?
Old Dec 9, 2021, 10:48 PM
  #37  
Newbie
 
Dow Jhob's Avatar
 
Join Date: Jun 2016
Location: siberia
Posts: 93
Likes: 0
Received 7 Likes on 7 Posts
Originally Posted by Mappie
would be nice!
could you provide me some details? Git,?
yes https://github.com/DowJhob/Evo-live-...ases/tag/1.003

also you need tunerpro for patch your rom
Old Aug 4, 2023, 01:25 AM
  #38  
Newbie
 
Dow Jhob's Avatar
 
Join Date: Jun 2016
Location: siberia
Posts: 93
Likes: 0
Received 7 Likes on 7 Posts
Originally Posted by orion4096
The CAS interrrupt gets called every 1.25ms. The main loop has a delay which only allows it to execute at most every 10ms (8x CAS interrupts). The command decoder, handler for 100 hz logging, and reads/writes are in the main loop. And it looks like there is also a minimum required 20ms delay between the end of one command and the start of the next. Normally this protected by the client waiting for the response, but since the response is removed I can see there being 20ms + (2 to 3 mainloop iterations to decodeCmd/performWrite, cleanup) * 10ms = ~50ms of necessary delay. As long as the read and write is handled in the mainloop a single command won't get much faster. It may be possible to add a EOW (End of Write) bit in the write packet so the state machine stays live but data would need to be double buffered and it gets complicated. You would still need to add pauses to slow it down to every 10-20ms. There are other solutions:

(1) Add new read/write commands that setup DMAC so raw data can be transferred to/from an address after the initial command is sent. The write will generate a response and only after receiving the response the client can start sending data.

This should get close to the full 62500 data rate for large data (minus serial overheads). Small reads/writes will still be slow since 1 command can only be done every ~90-100 ms. But when sending lots of data in one command it will be at a high rate.

(2) Custom decoder in the serial data ready interrupt which sets up DMAC for these new read/write commands.

This should have low latency and high data rate. Not sure if it can even be made to work, though. Something has to keep the mainloop DMA state machine from triggering. The way this works for OBD/MUT transfers is the 5baud init causes it to get disabled. When the ECU boots up it sets up the receive buffer DMA for 0x33 bytes which is why commands can be sent @ 62500 baud with no setup work. Would require changes to not setup the DMA right away. This seems too complicated.

(3) DMAC complete interrupt to decode new commands and setup DMAC for data or hand off other commands to existing main loop state machine.

Right now the main loop polls on idle DMA transfer counts. The interrupt is not used. This would also have low latency and high rate like (2). This seems like the best approach since the DMAC completion interrupt can immediately manage the RCV/SND fifos and state before the serial interrupt or mainloop do their work.

I'll have to think about it more as there are problems with all 3 approaches. Not sure if or when something can be coded and tested. It's not a simple thing to change.
I used ghydra for decompilation, are you still interested in the reverse of this algorithm?
Old Aug 4, 2023, 07:51 AM
  #39  
Newbie
Thread Starter
iTrader: (1)
 
orion4096's Avatar
 
Join Date: Dec 2014
Location: -
Posts: 82
Likes: 0
Received 27 Likes on 11 Posts
I'm going to move to a different car platform and sell my evo so haven't been working on this. Good luck with your livemap client.
Old Aug 4, 2023, 08:19 PM
  #40  
Newbie
 
Dow Jhob's Avatar
 
Join Date: Jun 2016
Location: siberia
Posts: 93
Likes: 0
Received 7 Likes on 7 Posts
Originally Posted by orion4096
I'm going to move to a different car platform and sell my evo so haven't been working on this. Good luck with your livemap client.
I sold my evos ten years ago, the code never ceases to be interesting. I probably put it poorly, I ask for help in reversing that function if you have time, hydra decompiles well but I am at a dead end with the calculation of function addresses, if you look and mark where I am wrong or mark stack variables it would be great.
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
ajune
ECU Flash
11
Nov 29, 2012 08:45 PM
jcsbanks
ECU Flash
4
Apr 18, 2009 03:10 PM
sna08
ECU Flash
14
Feb 7, 2009 12:38 AM
markymark1082
ECU Flash
39
Jul 15, 2008 10:33 PM
hotredevo
ECU Flash
4
Aug 30, 2007 11:25 PM



Quick Reply: MUT/RAM logging



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