Z32 256 adress file

Discuss software bugs and related problems here.

Moderator: Matt

Matt
Site Admin
 

Posts: 8993
Joined: Sun Jan 29, 2006 1:45 am
Location: Adelaide, Australia
Contact:

Re: Z32 256 adress file

Post by Matt »

Fix is to remove the 'KNOCK_THRESHOLD' parameters for Z32 as they were previously incorrectly labelled. They are applicable to other RB20 ECUs

Add to Z32_VG30_256_E.ADR to override base file (removing parameters)
KNOCK_THRESHOLD_MIN,&H0000,0,0,0,0
KNOCK_THRESHOLD_MAX,&H0000,0,0,0,0

As you can see, other parameters are corrected now:
CB5D : CE FF E0 ldx #$FFE0 (Filter map - high octane)
CB60 : 7B 80 82 tim #$80KNOCK_FLAG
CB63 : 27 03 beq LCB68
CB65 : CE F9 E3 ldx #$F9E3 (Filter map - low octane)
CB68 : B6 14 6A ldaa RAM_146A_RPM_DIV4_LSB
CB6B : B1 FF DC cmpa ROM_FFDC_Knock_Filter_RPM1
CB6E : 25 0B bcs LCB7B
CB70 : 08 " " inx
CB71 : 08 " " inx
CB72 : 08 " " inx
CB73 : B1 FF DD cmpa ROM_FFDD_Knock_Fitler_RPM2
CB76 : 25 03 bcs LCB7B
CB78 : 08 " " inx
CB79 : 08 " " inx
CB7A : 08 " " inx
CB7B : B6 14 8C " " ldaa RAM_148C_TP_MSB
CB7E : B1 FF DA " " cmpa ROM_FFDA_Knock_Filter_TP1
CB81 : 25 07 "% " bcs LCB8A
CB83 : 08 " " inx
CB84 : B1 FF DB " " cmpa ROM_FFDB_Knock_Filter_TP2
CB87 : 25 01 "% " bcs LCB8A
CB89 : 08 " " inx
RomChip200
 

Posts: 426
Joined: Mon May 11, 2009 7:58 pm
Location: FRANCE

Re: Z32 256 adress file

Post by RomChip200 »

I usually use my own address files as there's lead time b/w Nistune updates, so I realign not so often.
I'm just realigning to 1.2.76 version adr files.

There're still some missing parameters and some misinterpretations:

KNOCK_LEARN_TP,&H7F74,1,1,1,1,Knock learn min TP threshold
#KNOCK_LEARN_RPM,&H7EFF,1,1,1,1,Knock learn min RPM threshold ==> this one is missing (OEM=1200rpm)

KNOCK_LEARN_TP is NOT "Know Learn Load Max" as stated in Nistune GUI but is Knock learn min TP threshold (OEM TP=48 so it makes sense, knock actions are not applied till TP reaches 48, basically it corresponds to the knock region in the timing map)

Code: Select all

DATA:FF74 knock_learn_min_tp: fcb 48      
DATA:FEFF knock_learn_min_rpm:fcb 24


CODE:CDCD loc_1436:                                         ; ...
CODE:CDCD                     ldaa    0,x
CODE:CDCF                     staa    knock_inc
CODE:CDD2                     tim     #%1000, interp_flags  ; Bit 6: 0=rpm, 1=tp_d2_filt
CODE:CDD5                     bne     loc_6705
CODE:CDD5
CODE:CDD7                     ldaa    rpm_d4_lo             ; rpm_div_4_lo=lo(Engine speed/50)
CODE:CDDA                     cmpa    knock_learn_min_rpm
CODE:CDDD                     bcs     loc_1439
CODE:CDDD
CODE:CDDF                     ldab    tp_filt               ; Filtered tp
CODE:CDE2                     cmpb    knock_learn_min_tp
CODE:CDE5                     bcs     loc_1439
CODE:CDE5
CODE:CDE7
CODE:CDE7 loc_6705:                                         ; ...
CODE:CDE7                     ldaa    rpm_d2_lo
CODE:CDEA                     ldx     #HIGH_TIMING_ADVANCE_BETA
CODE:CDED                     tim     #%10000000, flags8    ; Bit 0: 1=inside knock learn region
CODE:CDED                                                   ; Bit 7: 0=switched to knock map
CODE:CDF0                     beq     loc_6706
CODE:CDF0
CODE:CDF2                     ldx     #REG_TIMING_ADVANCE_BETA
CODE:CDF2
CODE:CDF5
CODE:CDF5 loc_6706:                                         ; ...
CODE:CDF5                     jsr     interp_16             ; X=table adress
CODE:CDF5                                                   ; A=value to look up
CODE:CDF5                                                   ;
CODE:CDF5                                                   ; A=output value
CODE:CDF5
CODE:CDF8                     bra     loc_6707
CODE:CDF8
CODE:CDFA
CODE:CDFA loc_1439:                                         ; ...
CODE:CDFA                     clra
CODE:CDFB                     staa    knock_inc
CODE:CDFB
CODE:CDFE
CODE:CDFE loc_6707:                                         ; ...
CODE:CDFE                     staa    var_ut6679
CODE:CE01                     pula                          ; Pull timing
When there's an unknown param in ADR file, Nistune has some side effects, all the params are listed flat and some params that should not be displayed are displayed (as KNOCK_THRESHOLD_MIN,&H0000,0,0,0,0
KNOCK_THRESHOLD_MAX,&H0000,0,0,0,0) :
Nistune_knock_flat_params.jpg
(217.51 KiB) Downloaded 4518 times
RomChip200
 

Posts: 426
Joined: Mon May 11, 2009 7:58 pm
Location: FRANCE

Re: Z32 256 adress file

Post by RomChip200 »

Please support the parameters that are commented below:

Code: Select all

AFR_LEARN_TP_SCALE,&H7BA0,8,1,8,1,AFR learn TP scale 
#AFR_LEARN_RPM_SCALE,&H7BA8,8,1,8,1,AFR learn RPM scale
KNOCK_LEARN_TP,&H7F74,1,1,1,1,Knock learn min TP threshold
#KNOCK_LEARN_RPM,&H7EFF,1,1,1,1,Knock learn min RPM threshold
Matt
Site Admin
 

Posts: 8993
Joined: Sun Jan 29, 2006 1:45 am
Location: Adelaide, Australia
Contact:

Re: Z32 256 adress file

Post by Matt »

Thanks for these. I will add them now. I've been moving house/workshop over last three months so all development has been on hold. Finally finished setting everything up this week so good to go again
Matt
Site Admin
 

Posts: 8993
Joined: Sun Jan 29, 2006 1:45 am
Location: Adelaide, Australia
Contact:

Re: Z32 256 adress file

Post by Matt »

z32_updates.png
z32 updates
(173.47 KiB) Downloaded 4480 times
RomChip200
 

Posts: 426
Joined: Mon May 11, 2009 7:58 pm
Location: FRANCE

Re: Z32 256 adress file

Post by RomChip200 »

This is still not good :lol:

Yours inside 1.2.78:

Code: Select all

AFR_LEARN_TP_SCALE,&H7BA0,8,1,8,1,AFR learn TP scale 
AFR_LEARN_RPM_SCALE,&H7BA8,8,1,8,1,AFR learn TP scale 

KNOCK_LEARN_MIN_TP,&H7F74,1,1,1,1,Knock learn min TP threshold 
KNOCK_LEARN_MIN_RPM,&H7EFF,1,1,1,1,Knock learn min RPM threshold 

PRVR_TP_LOW,&H7FC3,1,1,1,1,PRVR TP low threshold

RPM_ENRICH,&H7600,16,1,16,1,RPM enrichment multiplier of coolant temp enrichment
O2_VOLTAGE_RHS_LOW,&H7FA0,1,1,1,10
O2_VOLTAGE_RHS_HIGH,&H7FA1,1,1,1,10


Mine:

Code: Select all

AFR_LEARN_TP_SCALE,&H7BA0,8,1,8,1,AFR learn TP scale 
AFR_LEARN_RPM_SCALE,&H7BA8,8,1,8,1,AFR learn RPM scale
KNOCK_LEARN_MIN_TP,&H7F74,1,1,1,1,Knock learn min TP threshold
KNOCK_LEARN_MIN_RPM,&H7EFF,1,1,1,1,Knock learn min RPM threshold
PRVR_TP_LOW,&H7FC3,1,1,1,1,PRVR TP low threshold

RPM_ENRICH,&H7600,16,1,16,1,RPM enrichment multiplier of coolant temp enrichment
O2_VOLTAGE_LOW,&H7FA0,1,1,1,10,O2 sensor minimum rich voltage
O2_VOLTAGE_HIGH,&H7FA1,1,1,1,10,O2 sensor maximum rich voltage
Voltages are not RHS bank dedicated. Both lambda_left and lambda right are compared against these.

You can add these too:

Code: Select all

DATA:FF92 afr_const20:        fcb 58                        ; ...
DATA:FF92                                                   ; O2 sensor "ready" voltage - O2 sensor won't be
DATA:FF92                                                   ; considered unless above this V at least once
DATA:FF93 afr_const25:        fcb 21                        ; ...
DATA:FF93                                                   ; O2 sensor lean voltage

Code: Select all

CODE:8C4C                     ldaa    lambda_left           ; O2 sensor voltage
CODE:8C4F                     cmpa    afr_const20           ; O2 sensor "ready" voltage - O2 sensor won't be
CODE:8C4F                                                   ; considered unless above this V at least once
CODE:8C52                     bcc     loc_5993
CODE:8C52
CODE:8C54                     cmpa    afr_const25           ; O2 sensor lean voltage
CODE:8C57                     bcs     loc_5994

CODE:91B3                     ldaa    lambda_right          ; O2 sensor voltage
CODE:91B6                     cmpa    afr_const20           ; O2 sensor "ready" voltage - O2 sensor won't be
CODE:91B6                                                   ; considered unless above this V at least once
CODE:91B9                     bcc     loc_6069
CODE:91B9
CODE:91BB                     cmpa    afr_const25           ; O2 sensor lean voltage
CODE:91BE                     bcs     loc_6070
CODE:91BE
CODE:91C0                     clr     afr_var38
CODE:91C3                     bra     loc_638
Matt
Site Admin
 

Posts: 8993
Joined: Sun Jan 29, 2006 1:45 am
Location: Adelaide, Australia
Contact:

Re: Z32 256 adress file

Post by Matt »

Ignore the naming of 'RHS' in the address file. Just text has been renamed inside the software
O2_VOLTAGE_RHS_LOW,&H7FA0,1,1,1,10
O2_VOLTAGE_RHS_HIGH,&H7FA1,1,1,1,10
See translation file:
ADDRESS_O2_VOLTAGE_LOW,O2 Voltage Lean
ADDRESS_O2_VOLTAGE_HIGH,O2 Voltage Rich
ADDRESS_O2_VOLTAGE_RHS_LOW,O2 Voltage Mid1
ADDRESS_O2_VOLTAGE_RHS_HIGH,O2 Voltage Mid2
RomChip200
 

Posts: 426
Joined: Mon May 11, 2009 7:58 pm
Location: FRANCE

Re: Z32 256 adress file

Post by RomChip200 »

Matt wrote:
ADDRESS_O2_VOLTAGE_LOW,O2 Voltage Lean
ADDRESS_O2_VOLTAGE_HIGH,O2 Voltage Rich
Yeah, fine, but tell me where these appear in Nistune GUI ?
There are 5 params related to 02 in adr files but only 3 appear in Nistune.
Matt
Site Admin
 

Posts: 8993
Joined: Sun Jan 29, 2006 1:45 am
Location: Adelaide, Australia
Contact:

Re: Z32 256 adress file

Post by Matt »

Here are the O2 sensor ones.

Your FF92 (580mV) 'ready voltage' I have as 'rich trigger voltage'
Your FF93 (210mV) lean voltage I have as 'lean trigger voltage'

FFA0 (530mV) I have as 'Mid1 trigger voltage'
FFA1 (580mV) I have as 'Mid2 trigger voltage' which I assume is your 'rich voltage'?
Capture_Z32_O2.PNG
(38.46 KiB) Downloaded 4393 times
I did not change the labelling from 'RHS' yet (only text fields) since I could not work out the exact function of these parameters.

This ECU has different O2 related parameters compared to than other ones I've worked with, and I know you have a more in depth working knowledge of this ECU of course :wink:

Other scales I've already shown in the previous post screenshot. Make sure File > Configuration > User Mode = Expert so you see all parameters

What was the fifth one I've missed?
RomChip200
 

Posts: 426
Joined: Mon May 11, 2009 7:58 pm
Location: FRANCE

Re: Z32 256 adress file

Post by RomChip200 »

Ok, got it, I added RHS in my custom adr files.

The functions of these params are these ones:

Code: Select all

DATA:FFA0 afr_const21:        fcb 53                        ; ...
DATA:FFA0                                                   ; O2 sensor minimum rich voltage (voltage threshold
DATA:FFA0                                                   ; below which the bank is considered lean if it is already rich)
DATA:FFA1 afr_const22:        fcb 58                        ; ...
DATA:FFA1                                                   ;  O2 sensor maximum rich voltage (voltage threshold
DATA:FFA1                                                   ; above which the bank is considered rich if it is lean)

DATA:FF92 afr_const20:        fcb 58                        ; ...
DATA:FF92                                                   ; O2 sensor "ready" voltage - O2 sensor won't be
DATA:FF92                                                   ; considered unless above this V at least once
DATA:FF93 afr_const25:        fcb 21                        ; ...
DATA:FF93                                                   ; O2 sensor lean voltage

The right descriptions in Nistune should be these ones:

Code: Select all

O2_VOLTAGE_RHS_LOW,&H7FA0,1,1,1,10,O2 sensor rich to lean voltage (rich to lean hysteresis)
O2_VOLTAGE_RHS_HIGH,&H7FA1,1,1,1,10,O2 sensor lean to rich voltage (lean to rich hysteresis)

O2_VOLTAGE_LOW,&H7F93,1,1,1,10,O2 Sensor leanest voltage
O2_VOLTAGE_HIGH,&H7F92,1,1,1,10,O2 Sensor ready for measure voltage
The fifth param was the feedback temp
Matt
Site Admin
 

Posts: 8993
Joined: Sun Jan 29, 2006 1:45 am
Location: Adelaide, Australia
Contact:

Re: Z32 256 adress file

Post by Matt »

Okay thanks. I've changed the address file entries accordingly yesterday, so will be next version. Got an older laptop to look at improving the scheduler to reduce slow down on older machines
RomChip200
 

Posts: 426
Joined: Mon May 11, 2009 7:58 pm
Location: FRANCE

Re: Z32 256 adress file

Post by RomChip200 »

I don't know if a "Intel Cherry Trail Z8300 64bit Quad Core 1.44GHz 2GB RAM 32GB ROM" Windows10 tablet can be considered as an old machine :roll:

My device is this one : https://www.gearbest.com/tablet-pcs/pp_ ... EVEALw_wcB

For sure, I'm experiencing sometimes some lagging issues
Matt
Site Admin
 

Posts: 8993
Joined: Sun Jan 29, 2006 1:45 am
Location: Adelaide, Australia
Contact:

Re: Z32 256 adress file

Post by Matt »

Had a look at the specs. Shared memory can slow things down when doing processing and updating graphics simultaneously. I see it here more frequently on my Acer particularly when running dual screen

With the freeze ups, what are the factors which make it more noticable? Is it only when all inputs (dual wideband and consult) are connected? Log playback too?

Normally I don't see any issues with stream mode and a single wideband input, or reported feedback from other customers

I've mainly noticed issues here on my older netbook with stream mode (Aspire One with AMD Atom), but not on my even older 2010 Dell Inspiron.

Fast playback on the log player will also hold things up until finished due to the number of updates but the number of updates (refresh events to each maptrace and gauge item per log line) are high in a short period of time (thousands of log lines). Skipping lines does not work well since it causes holes in playback data (as reported by Torque in another thread)
RomChip200
 

Posts: 426
Joined: Mon May 11, 2009 7:58 pm
Location: FRANCE

Re: Z32 256 adress file

Post by RomChip200 »

I only use this Atom tablet to record logs, so:

Consult on COM1 / stream mode / the maximum 13 data
Innovate 2 LC1 widebands + the former TC4 (SSI4 inputs) box on COM2 in daisy chain

Symptoms:
When connecting COM1/COM2 or the reverse, sometimes the UI hangs up for a while, typically about 10 seconds. Afterwards, the connection scrolling bars start to scroll and values are refreshed across the various panels already opened (i.e. Log recorder / Consult raw values / AFRs panel).
In rare situations, Nistune completely hangs up and closes.

I know :lol: I should have saved the crash report to send it to you. I promise I will do it next time it hangs up completely.
Matt
Site Admin
 

Posts: 8993
Joined: Sun Jan 29, 2006 1:45 am
Location: Adelaide, Australia
Contact:

Re: Z32 256 adress file

Post by Matt »

COM2 or the reverse, sometimes the UI hangs up for a while, typically about 10 seconds.
This part is Innovate MTS. Nistune calls the MTS DLL open function. At this point, the caller software (Nistune) will hang until MTS responds after the open event. This can also be seen when connecting sometimes in Logworks but I will try again to check

Sometimes when connecting, the freeze causes overrun from pending consult data (since the application is frozen by MTS, but ECU consult is still feeding consult stream data to the application).

Suddenly the application catches up and has a lot of buffered data to work through. That might be resulting in a data overrun and then crash as a result. It's a pain.... but need a crash dump to confirm

Best to connect MTS and then consult. However if you get a MTS disconnect and then reconnect that same issue... reconnect and it does the freeze up, and then the consult buffering problem happens again :twisted:

What I am saying is that the freeze is due to the MTS libraries called - which I have no control over since DLL open calls are blocking. I've seen it here on LC-1 connecting where it will halt everything about 5 secs or so here but I will run through the scenario to repeat.

From memory the MTS DLL calls cannot be made from a thread (non blocking, hence non freezing) and the pending windows event blocks all updates including the GUI itself
Post Reply