Author Topic: Reverse Engineering MIU G3 (based on V7 III and V9)  (Read 7488 times)

Offline danketchpel

  • New Egg
  • *
  • Posts: 16
  • Location: Ventura County, CA
Re: Reverse Engineering MIU G3 (based on V7 III and V9)
« Reply #60 on: July 19, 2021, 07:03:34 PM »
I wonder if the 2021’s are using a redesigned unit.


The MIU G4.

That's the same question I was going to ask as I'm looking at a 2021 V7 850 Special purchase very soon.

Offline pauldaytona

  • Gaggle Hero
  • *****
  • Posts: 2562
    • Paul's fast Guzzi Page
Re: Reverse Engineering MIU G3 (based on V7 III and V9)
« Reply #61 on: July 21, 2021, 03:48:08 PM »
The G4 is talking CAN bus to the outside world for diagnostics and programming. Bye bye K-line
Paul

Daytona 1225, Stelvio 1151





Download Guzzidiag here: http://www.von-der-salierburg.de/download/GuzziDiag/

Online Zenermaniac

  • Gosling
  • ***
  • Posts: 234
  • Location: Armpit of Ohio, USA
Re: Reverse Engineering MIU G3 (based on V7 III and V9)
« Reply #62 on: July 23, 2021, 09:14:43 AM »
Here is an inside view of the MIU G3 and a block diagram of the MCU chip.
Full documentation of the chip is at: https://www.infineon.com/cms/en/product/microcontroller/legacy-microcontroller/legacy-8-bit-16-bit-microcontroller/xc2700-family-powertrain/xc27x5x-series/#!documents

I believe that an MIU G3 that gets bricked during programming is a failure of the base program to account for data errors and request a retransmission of the data byte or at least reset to a stable state. If someone wants to jump down the rabbit hole and figure out a way to recover a bricked unit.






Offline Meinolf

  • Gosling
  • ***
  • Posts: 243
  • Location: Germany
Re: Reverse Engineering MIU G3 (based on V7 III and V9)
« Reply #63 on: July 24, 2021, 05:40:57 AM »
Hi,

thanks for the picture. Can you trace the ECU I/O pins to the CPU, the ignition coil driver, the baro sensor and other chips?

Similar to what John did on the 5AM?

https://drive.google.com/file/d/1LOuP-p3JJdLPeWa-CckuKrN60AExXM6U/view?usp=sharing

Cheers
Meinolf

Wildguzzi.com

Re: Reverse Engineering MIU G3 (based on V7 III and V9)
« Reply #63 on: July 24, 2021, 05:40:57 AM »

Online Zenermaniac

  • Gosling
  • ***
  • Posts: 234
  • Location: Armpit of Ohio, USA
Re: Reverse Engineering MIU G3 (based on V7 III and V9)
« Reply #64 on: July 24, 2021, 10:06:07 AM »
I plan to take a stab at it soon.  :cool:

Offline chrisfer

  • Hatchling
  • **
  • Posts: 115
  • Location: France
Re: Reverse Engineering MIU G3 (based on V7 III and V9)
« Reply #65 on: December 30, 2021, 11:24:43 AM »
Hello Meinolf,
would it be possible for you to find the correct speedo correction factor on the XDF of the MIUI G3 ECU (V7 III), the current one (0x7C996) is not working...  :bow:
2022 V7 850 Stone - 2019 V7 III Carbon - 2004 V11 RossoCorsa - 2002 V11 Le Mans - 1995 750 Nevada

Offline Meinolf

  • Gosling
  • ***
  • Posts: 243
  • Location: Germany
Re: Reverse Engineering MIU G3 (based on V7 III and V9)
« Reply #66 on: December 30, 2021, 12:33:10 PM »
Hi Chris,

the address is definitely correct.





However, and here I need to check with somebody more knowledgeable, the code uses a shifting of memory space and I'm not sure if the Tunerpro address representation 7C996h leads to a different address than the real C7C996.

On 2nd thought, which BIN are you using? Is it the CM275405/464AVFAL for which I created the BIN? When you open den speedo correction factor, do you see the value 1535?

Cheers
Meinolf
« Last Edit: December 30, 2021, 12:37:18 PM by Meinolf »

Offline chrisfer

  • Hatchling
  • **
  • Posts: 115
  • Location: France
Re: Reverse Engineering MIU G3 (based on V7 III and V9)
« Reply #67 on: December 30, 2021, 01:21:29 PM »
On 2nd thought, which BIN are you using? Is it the CM275405/464AVFAL for which I created the BIN? When you open den speedo correction factor, do you see the value 1535?
I tried the XDF 1.07 (and your) with the original bin of my V7 III (and my last modified),  and yes the initial value is 1535.
My V7 III bin : https://1drv.ms/u/s!AuqxioVGI9b-hvg3tVpX8dBwkfS47A?e=CKiabk
2022 V7 850 Stone - 2019 V7 III Carbon - 2004 V11 RossoCorsa - 2002 V11 Le Mans - 1995 750 Nevada

Offline Meinolf

  • Gosling
  • ***
  • Posts: 243
  • Location: Germany
Re: Reverse Engineering MIU G3 (based on V7 III and V9)
« Reply #68 on: January 12, 2022, 12:06:41 PM »
Hi,

recently I was asked to take a look at the BIN running in a MIUG4 (Vespa GTS 300 HPE). And leveraged the work already done on the MIUG3-code. Quite similar, which eased the work a lot.

Anyway, as a side result the V7III-XDF was also updated. V1.10 is here: https://drive.google.com/file/d/135EETvqe0UagrX_bsSpV4_tX8jnaGFue/view?usp=sharing

The injector scaling value (ms/g fuel) and the injector trim table were added.

Cheers
Meinolf

Offline chrisfer

  • Hatchling
  • **
  • Posts: 115
  • Location: France
Re: Reverse Engineering MIU G3 (based on V7 III and V9)
« Reply #69 on: January 13, 2022, 12:20:02 AM »
Thank you for the add of injector scaling value and the injector trim table.

I found these threads about the speed correction... : https://www.guzzi-forum.de/Forum/index.php?topic=52213.0
https://www.guzzi-forum.de/Forum/index.php?topic=47810.0
2022 V7 850 Stone - 2019 V7 III Carbon - 2004 V11 RossoCorsa - 2002 V11 Le Mans - 1995 750 Nevada

Offline pauldaytona

  • Gaggle Hero
  • *****
  • Posts: 2562
    • Paul's fast Guzzi Page
Re: Reverse Engineering MIU G3 (based on V7 III and V9)
« Reply #70 on: January 14, 2022, 05:28:44 PM »
Older ecu like 5AM did have a speedo input that was used for a sensor on the wheel, or the speed output of the ABS unit. The V7III has nee sped output from the ABS unit, so they will use CAN bus for it. The value is they as legacy and might be of use in the ecu calculations.
Paul

Daytona 1225, Stelvio 1151





Download Guzzidiag here: http://www.von-der-salierburg.de/download/GuzziDiag/

Offline Meinolf

  • Gosling
  • ***
  • Posts: 243
  • Location: Germany
Re: Reverse Engineering MIU G3 (based on V7 III and V9)
« Reply #71 on: January 15, 2022, 12:28:42 PM »
Hi Chris,

Is the injector scaling value (ms/g of fuel) only used to display fuel consumption or is it taken into account to adjust injection times?

the latter. Fuel consumption is just a collateral effect, it's a purely informational value passed over the CANbus to the dashboard.

The (rough) procedure is as follows. It starts with an interrupt driven event, which calls a subset of ops including ignition calcs and fuel_value-to-injection-time conversion. Along the way the fuel values (idle fuel/main fuel) are derived from the known tables. Then it branches of into the conversion of the fuel values into a time-based injection pulse width. The result of which is fed into the fuel phase routine, in which the fuel phase tables/scalars define the rotational degree (crankshaft) at which the injectors are closed, eg the current to the injectors begins flowing again to build up the magnetic charge of the coils. (Btw, the same procedure is used for the ignition coils).

The injector scaling value is used to convert fuel values to injection pulse width values based on the specs (flow rate at 3bar/coil saturation over voltage/other coil characteristics) of the injectors.

Cheers
Meinolf

Offline Meinolf

  • Gosling
  • ***
  • Posts: 243
  • Location: Germany
Re: Reverse Engineering MIU G3 (based on V7 III and V9)
« Reply #72 on: January 15, 2022, 12:39:10 PM »
Hi Chris,

would it be possible for you to find the correct speedo correction factor on the XDF of the MIUI G3 ECU (V7 III), the current one (0x7C996) is not working...  :bow:

For lack of a V7III I can't check myself. While I'm sure that the address is correct and that the respective code segment is actually called and not bypassed by branching conditions, the evidence seems to indicate that it's not used.

As pointed out by Paul the V7III doesn't get the speed sensor pulses from the ABS ECU via a discrete signal, so it's likely part of a CAN package. I've identified the code in the CAN rx ops which puts a roadspeed variable into a CAN package, but this is send to the dashboard without any correction I can identify.

So unless and until we have the chance to examine either the traffic on the CANBus or look at the dashboard or ABS module BINs the speedo correction factor isn't used.

Cheers
Meinolf

Offline chrisfer

  • Hatchling
  • **
  • Posts: 115
  • Location: France
Re: Reverse Engineering MIU G3 (based on V7 III and V9)
« Reply #73 on: January 16, 2022, 04:32:42 AM »
Hi Chris,

the latter. Fuel consumption is just a collateral effect, it's a purely informational value passed over the CANbus to the dashboard.

The (rough) procedure is as follows. It starts with an interrupt driven event, which calls a subset of ops including ignition calcs and fuel_value-to-injection-time conversion. Along the way the fuel values (idle fuel/main fuel) are derived from the known tables. Then it branches of into the conversion of the fuel values into a time-based injection pulse width. The result of which is fed into the fuel phase routine, in which the fuel phase tables/scalars define the rotational degree (crankshaft) at which the injectors are closed, eg the current to the injectors begins flowing again to build up the magnetic charge of the coils. (Btw, the same procedure is used for the ignition coils).

The injector scaling value is used to convert fuel values to injection pulse width values based on the specs (flow rate at 3bar/coil saturation over voltage/other coil characteristics) of the injectors.

Cheers
Meinolf
Ok this injector scaling value therefore acts always, globally.
Thank you  :azn:
2022 V7 850 Stone - 2019 V7 III Carbon - 2004 V11 RossoCorsa - 2002 V11 Le Mans - 1995 750 Nevada

Offline tris

  • Gaggle Hero
  • *****
  • *
  • *
  • *
  • Posts: 2794
  • Location: United Kingdom
Re: Reverse Engineering MIU G3 (based on V7 III and V9)
« Reply #74 on: June 09, 2022, 02:24:03 PM »
Hi Meinolf

In reply #63 you were talking about ECU I/O pins to the 5AM CPU and I see from the image that one of the inputs is the clutch switch.

I've just fixed the clutch switch on my V9 so it now shows continuity with the lever pulled as opposed to permanent open circuit.

Does the MIU G3 have an input from the clutch and if so what does it do to the operation of the engine ?

I just wondered whether I'd missed out on anything while the switch was out of action  :laugh:
« Last Edit: June 09, 2022, 02:27:38 PM by tris »
2017 V9 Roamer
2005 Breva 1100 (non ABS) "Bruno" - now sold
1995 Cali 1100 - carby   "Dino" -now sold
1993 TW125 "POS" - Resting

Offline Meinolf

  • Gosling
  • ***
  • Posts: 243
  • Location: Germany
Re: Reverse Engineering MIU G3 (based on V7 III and V9)
« Reply #75 on: June 10, 2022, 12:40:37 PM »
Hi,

sure, lot's of exciting stuff happens when the switch worls and you missed it all.

1. Selection between IgnIdle_Clt_dis_Tab le_C79486 or IgnIdle_Clt_en_Tabl e_C794C6
2.  maxDelta_IdleIgn_Ta ble_C7A330 bypassed
3. Several safety interlock routines
4. Selection between table_C7E9D8 or table_C7E9B0
5. Selection between table_C7EA28 or table_C7EA00

plus many other clutch state dependent subroutines.

Cheers
Meinolf

Offline tris

  • Gaggle Hero
  • *****
  • *
  • *
  • *
  • Posts: 2794
  • Location: United Kingdom
Re: Reverse Engineering MIU G3 (based on V7 III and V9)
« Reply #76 on: June 13, 2022, 12:29:54 PM »
Cheers Meinolf, and apologies for the slow reply. Too busy doing non bike stuff for domestic management  :wink:

The safety interlock effect I expected

But I'm keen to see if a working clutch switch helps with the horrible snatchy throttle my bike has from low positions

I just need to get some miles with the working switch and see where we are

Thanks again

Tris
2017 V9 Roamer
2005 Breva 1100 (non ABS) "Bruno" - now sold
1995 Cali 1100 - carby   "Dino" -now sold
1993 TW125 "POS" - Resting

Offline tris

  • Gaggle Hero
  • *****
  • *
  • *
  • *
  • Posts: 2794
  • Location: United Kingdom
Re: Reverse Engineering MIU G3 (based on V7 III and V9)
« Reply #77 on: August 22, 2022, 12:49:24 PM »
Well, there is no discernable difference in the bike with a working clutch switch compared to a non working clutch switch.

However. the bike went in for servicing today and came back with a new map.

The old map was 4640VC29 and the new one is  464DVCAO

I've not ridden it yet  but is there anything in the new map to address the snatchy throttle?


2017 V9 Roamer
2005 Breva 1100 (non ABS) "Bruno" - now sold
1995 Cali 1100 - carby   "Dino" -now sold
1993 TW125 "POS" - Resting

 

***Wildguzzi Official Logo High Quality 5 Color Window Decals Back In Stock***
Shipping in USA Only. Awesome quality. Back by popular demand. All proceeds go back into the forum.
http://www.wildguzzi.com/Products/products.htm
Advertise Here