The ECU is built on the Infineon TriCore TC1766 processor.

Bosch med 17.5 ECU pinout 1
In the processor chip is a flash memory in volume of 1504 bytes and EEPROM in 32 bytes.

Bosch med 17.5 ECU pinout 2

There are two ways to read-write a block: via the OBD connector and through the BSL bootloader (the so-called boot-mode)
Each of the methods has its advantages and disadvantages.

Read-write via OBD:
pros:
fastly-
no ventilation of the ECU is required
Against:
-It is only read data with calibrations, it is saved
not possible on all computers to read and write because of the installed protection system
TPROT-ECU reprogramming counter is increased

Read-write via Boot-mode
pros:
-access to all flash memory and its industry-the
ECU reprogramming counter does not increase
Against:
-Need to remove from the machine and then disassembled

Bosch-med 17.5-ECU-pinout-3

Bosch-med 17.5-ECU-pinout-4
For programming, the FGTech Galletto v54 or its Chinese clone is most often used

To connect to the ECU on the table for OBD reading, you must use the following wiring:

1 - ground
5, 87, 92 - + 12V
67 - can high
68 - may be weak

And if you are working with the ECU on the table by "boot mode" you have to use the following contacts:
1 - ground
5 - + 12V
87, 92 - ignition
67 - can high
68 - may be weak
And in addition, you have to connect with a gray wire (or solder at 1km from the ground) to the "boot" point on the board itself

med 17.5 _bootpin
Connection pins:

med 17.5 _pinout

For indiscriminate read-write, the standard procedure is used.
But in case of transfer of the device to "boot mode" the program will require at certain stages of work to reset the power of the computer.