EDC16U31
Content
Images
The ECU images below are intended to get an idea and to show of which ECU it is. Furthermore, they could help if the question of the arrangement of the components is in the room after too fast disassembly or desoldering. The most frequently asked question in this context is:
"Where is Pin 1?". The photos shown can not cover all of the ECU revisions, so they should be seen as examples.
Pin assignment
Slot | Pin | Description | Comment |
---|---|---|---|
T94 | 1 | Ground/GND | KL31 (Vehicle ground) |
T94 | 5 | Ignition | KL15 (Switched power) |
T94 | 18 | Power | KL30 (Permanent power) |
T94 | 66 | CAN-Low | High-Speed-CAN (500 kbit/s) |
T94 | 72 | K-Line | |
T94 | 89 | CAN-High | High-Speed-CAN (500 kbit/s) |
Memory
Hardware:
Hardware | Name |
---|---|
µController | MPC563 |
EEPROM | ST95320WP |
Layout:
Type | method R/W | Memory starting from | Memory size (Byte) | Comment |
---|---|---|---|---|
RAM 1 | diag | 0x-- | 0x-- | |
RAM 2 | diag | 0x-- | 0x-- | |
Prozessor | ext.Prog | 0x0 | 0x80000 | 512KB |
Flash | ext.Prog | 0x0 | 0x200000 | 2MB |
EEPROM | ext.Prog | 0x0 | 0x1000 | 4KB |
EEPROM dump setup
In order to catch data losses, the data is stored redundantly.
CRC function:
unsigned char dump[0x1000];
...
unsigned short getCheckSum(unsigned short dumpStartIndex,
unsigned short dumpEndIndex,
unsigned short blockNumber)
{
unsigned short checksum = 0;
for (unsigned int i = dumpStartIndex; i <= dumpEndIndex; i++)
{
checksum = checksum + dump[i];
}
checksum = 0xFFFF ^ checksum;
checksum = checksum - blockNumber;
return checksum;
}
OMI function:
unsigned int getOmi_1(void)
{
return dump[0x156];
}
unsigned char getOmi_2(void)
{
return dump[0x176];
}
...
//omi On -> omiByte = 0x73;
//omi Off -> omiByte = 0x60;
void setOmi_1(unsigned char omiByte)
{
dump[0x156] = omiByte;
unsigned short checksum = getCheckSum(0x140, 0x15D, 4);
dump[0x15E] = checksum & 0xFF;
dump[0x15F] = checksum >> 8;
}
void setOmi_2(unsigned char omiByte)
{
dump[0x176] = omiByte;
unsigned short checksum = getCheckSum(0x160, 0x17D, 4);
dump[0x17E] = checksum & 0xFF;
dump[0x17F] = checksum >> 8;
}
WFS-Code:
unsigned short getWFSLogin_1(void)
{
return dump[0xE7] * 0x100 + dump[0xE8];
}
unsigned short getWFSLogin_2(void)
{
return dump[0x107] * 0x100 + dump[0x108];
}
unsigned short getWFSLogin_3(void)
{
return dump[0x127] * 0x100 + dump[0x128];
}
Mileage of engine control unit:
unsigned long getKM_1(void)
{
return dump[0x502] * 0x1000000 + dump[0x503] * 0x10000 + dump[0x504] * 0x100 + dump[0x505]; //unit meter
}
unsigned long getKM_2(void)
{
return dump[0x542] * 0x1000000 + dump[0x543] * 0x10000 + dump[0x544] * 0x100 + dump[0x545]; //unit meter
}
Example dump download