Skip to content
Workshop: repairs and experiments

Bosch dishwasher board SWS4118: the board, its memory, and copies of the EEPROM and firmware (part 1)

Published 10.11.2026 · Updated 23.11.2026
Contents 11
  1. Why we are doing this
  2. What useful parts are left
  3. The board at a glance
  4. What this board is in the dishwasher
  5. What is needed to run the pump
  6. A copy of the 24C08WP EEPROM
  7. The STM32 microcontroller: a copy of the firmware
  8. What the firmware consists of
  9. Next
  10. Safety
  11. Article changelog

We take apart the motor control board from a Bosch dishwasher, 702168823.01GA / SWS4118 Rev.4. The goal is to run the dishwasher pump from its own original board and turn it into an instantaneous water heater. This is part one:

  • what useful parts are left from the dishwasher and what is on the board, with a photo of each area;
  • what this board is in the dishwasher and who it talks to;
  • which of it is needed to run the pump, and why we are writing our own firmware;
  • a copy of the 24C08WP EEPROM with a CH341B programmer: where to put the probes, which software to read with, what is in the dump;
  • a copy of the STM32 firmware with an ST-Link V2: the SWD pins on the X20 pads, the software, checking the protection, reading, what you may and may not do;
  • what the original firmware consists of: the bootloader, the main program, the self-test.

What the firmware switches on in the chip and the board map are in part two; our own firmware is in part three.

draft — under discussion and being expanded

⚠ This board runs straight off 230 V mains with no isolation: the large capacitor charges to ~325 V and holds that charge after the plug is pulled, and the board's ground is tied to the mains. Both copies in this part are made off the mains, with the board powered only by 3.3 V from the programmer or a separate supply. Why the board must never be plugged in with a programmer connected is explained in part three.

Why we are doing this

The old dishwasher left us its circulation pump with a built-in heating element, which is in effect a ready-made instantaneous water heater: the pump moves the water and the element wrapped around the pump chamber heats it. The pump motor is three-phase with a permanent-magnet rotor and will not run straight from a socket: it needs an inverter. The dishwasher's own board already has one. So first we find out what is on the board and copy everything it stores, and only then change anything.

What useful parts are left

PartWhat it isWill we use it?
circulation pump with heating elementthree-phase motor with a permanent-magnet rotor (9-coil stator) and an element around the chamberyes: the core of the water heater, pump and heating in one
heating element (in the pump housing)20.5 Ω cold → ≈ 11 A and ≈ 2.6 kW at 230 Vyes; switch it on only while the pump moves water, or it will overheat
temperature sensor on the element (3 wires)two 10 kΩ NTC thermistors with a common middle wireyes: temperature control and independent overheat protection
CoPECi BLP3 drain pumpalso three-phase with a permanent-magnet rotor, 54 V / 55 Hzpossibly, for pumping water elsewhere; runs from the same inverter
motor control board (this article)STM32 microcontroller, FSB50550AB inverter, power supply, 16 A relaysyes: a ready inverter for the pump and relays for the element
control panel board with an MC9S08AC328-bit NXP microcontroller, buttons and displayunlikely

The board at a glance

Bosch dishwasher motor control board with numbered areas
Board 702168823.01GA, SWS4118 Rev.4. The numbers are the areas in the table below. The sticker with the board's code and number is blurred.
No.WhatSection
1STM32 microcontrollerThe brain
2X20 test pads at the edgeThe brain
3FSB50550AB inverterInverter
4~325 V bus capacitorPower supply
5TNY274GN power supply with transformerPower supply
6JW2SN relay (switches between motors)Relays
7two 16 A ALZ51B12T relaysRelays
8mains filterMains input
9fuseMains input
10mains connectorMains input
11connectors to the motors, valves and sensorsConnectors

Markings on the board itself: 702168823.01GA is the printed circuit board number, SWS4118 Rev.4 the board designation and revision, and 888172 looks like a batch number. Most chips carry the date code 1339, which looks like week 39 of 2013.

The brain: STM32, EEPROM and programming pads

STM32 microcontroller, 24C08 EEPROM and X20 pads with letter markers
The microcontroller area. The letters are the parts in the table below.
In the photoWhatMarkingWhat it does on the board
AmicrocontrollerSTM32F301 VCT6, LQFP100drives the inverter (six PWM signals) and the relays, reads the sensors; the firmware lives here
BEEPROM24C08WP (ST)8 kbit (1 KB) I²C memory: settings and "learned" values (below)
CSEN013DGPower IntegrationsSENZero: disconnects the mains-voltage sensing resistors while the board is on standby
DX20 padssix pads at the edgea debug connector: SWD, reset, ground and 3.3 V (pinout)
Erectangular pads (2 × 3)no markinganother group of test pads
  • The marking on the package does not match the chip inside; what is really there was shown by reading over SWD (below).
  • The orange paint stroke on the package looks like a factory mark.
  • The clock comes from an 8 MHz 80.K ceramic resonator next to the microcontroller (pins 12 and 13); the original firmware, like ours, multiplies it up to 72 MHz.

The FSB50550AB inverter

FSB50550AB inverter, R820 resistors, JW2SN relay with letter markers
The inverter area. The letters are the parts in the table below.
In the photoWhatMarkingWhat it does on the board
AinverterFSB50550ABthree phases for the pump motor from the ~300 V DC bus
BresistorsR820 (0.82 Ω)current shunts: two in parallel in each phase (we measured 0.41 Ω); the microcontroller measures current here
CrelayPanasonic JW2SN-B-DC12Vswitches the inverter's outputs between the circulation pump with the heating element (off) and the drain pump (on)
Dcomponents in SOT-223 packages—look like small triacs for the valves and dispenser; the water heater does not need them, so we did not trace them
EconnectorsX2, X3, X4to the valves, sensors and motors

The FSB50550AB (Fairchild, now onsemi) is a three-phase inverter in one package: six MOSFET switches, their gate drivers and the diodes that supply the high-side switches. It turns the DC bus into three phases for the pump motor. The manufacturer's datasheet: FSB50550AB-D.pdf · 1.5 MB

ParameterValue (from the datasheet)
bus voltage, operating300 V typical, up to 400 V
bus voltage, absolute maximum500 V
continuous switch current2 A at 25 °C case, 1.5 A at 80 °C
on-resistance≈ 1 Ω
driver supply15 V
input logic3.3 or 5 V
  • The bus is rectified 230 V mains (√2 × 230 ≈ 325 V); on our board, running from the mains, we measured 296–300 V. So the board powers the motors straight from the mains, with no transformer.
  • The signals from shunts B go to the microcontroller's comparators, which shut the inverter down on overload. How we worked out the trip level in amps is in part three.
  • The driver supply on this board is 13.5 V rather than 15 V, and it is not on all the time: the microcontroller switches it on with pulses on pin 92 (PB6). Without them the module will not turn on a single switch; the details are in part three.
  • One inverter for two motors. The two pumps share one phase, and the JW2SN relay (C) switches the other two between them. With the relay off the circulation pump with the heating element is connected, with it on the drain pump. The continuity check showed that the relay switches the phases; the original firmware confirms that "off" means the circulation pump: it releases the relay when it starts that pump. A dishwasher either washes or drains; the two never run together.
  • Next to the module there is an empty footprint for a second one just like it; the board seems to be made for several models (part two).

Board power supply: TNY274GN

Power supply: TNY274GN, TDK transformer, capacitors with letter markers
The switch-mode power supply. The letters are the parts in the table below.
In the photoWhatMarkingWhat it does on the board
Apower supply chipTNY274GNPower Integrations TinySwitch-III, the heart of a small switch-mode supply
BtransformerTDK 8220 X 363steps the voltage down for the board itself
Clarge capacitor HB 105°C—the ~325 V bus capacitor for the inverter; holds a charge after switch-off
Dsmall capacitor—looks like the filter for one of the low voltages

What we measured with the board running from the mains:

RailValueWhat it feeds
power bus296–300 Vthe inverter
low-voltage rail13.46 Vthe inverter driver supply is switched on from here (13.48 V at the module)
3.3 V3.35 Vthe microcontroller, the EEPROM; X20 pad 6

All three relay coils are rated for 12 V.

⚠ The power supply keeps running from the mains only while the microcontroller holds pin 7 (PC13) at "1". Through a diode, a 47 kΩ resistor and a transistor next to the supply, this pin keeps it switched on; without it the board shuts down about a second after it is plugged in. The original firmware keeps PC13 at "1" the whole time, and replacement firmware must set it as its very first action after start-up; how we found this is in part three.

Mains input: filter, fuse, capacitor discharge

Mains input: choke, X2 and Y2 capacitors, CAP005DG, fuse with letter markers
The mains filter. The letters are the parts in the table below.
In the photoWhatMarkingWhat it is for
Acommon-mode chokecopper winding on a corekeeps the inverter's interference out of the mains
BX2 capacitor0.22 µF M 305 V~ (blue)between live and neutral: suppresses interference from the inverter
CY2 capacitors22 nF M 300 V~ (blue)between the mains and earth: the same for common-mode interference
DCAP005DGPower Integrations, CAPZerodischarges the X2 capacitors when the plug is pulled, so no voltage is left on the plug pins
EfuseBUSS SR-5H T4A 250Vtime-delay, 4 A: protects the board itself
Fmains connector—live and neutral come in here

A 4 A fuse would not survive an 11 A heating element, so the element most likely bypasses it; we have not traced the path from the element relays to the fuse.

NTC thermistor next to the mains filter with letter markers
The thermistor next to the choke. The letters are the parts in the table below.
In the photoWhatMarkingWhat it is for
AthermistorNTC 22 1340appears to limit the inrush current as the bus capacitor charges at switch-on
Bcommon-mode choke—the same as A in the previous photo
CrelayPanasonic ALZ51B12Tone of the two 16 A relays (section below)

Relays

Two Panasonic ALZ51B12T relays, mains connector and fuse with letter markers
The relay corner of the board. The letters are the parts in the table below. The sticker with the code and number is blurred.
In the photoWhatMarking / ratingWhat it switches or does
A, Btwo relaysPanasonic ALZ51B12T, 16 A 250 V, 12 Vthe heating element (≈ 11 A); driven by pins 91 (PB5) and 68 (PA9), as we traced
Cmains connector—the same as F in the mains input photo
DconnectorMTOP, PIN 1most likely to the heating element and pump; not traced yet
EfuseBUSS SR-5H T4A 250Vprotects the board
FCAP005DGPower Integrationsdischarges the X2 capacitors

The third relay, a Panasonic JW2SN-B-DC12V (5 A 250 V, 12 V coil), sits next to the inverter (C in the inverter photo) and switches the phases between the pumps; it is driven by pin 60 (PD13).

For the water heater the element relays are already in place and rated with headroom: 16 A versus 11 A. The original firmware switches them on one after the other, pulls them in at full current and then holds them at 70 % PWM duty; how and why is in part three.

Connectors

The board marks its connectors X2, X3, X4, X5, X5_1, X7_1, X12, X13, X17, X20 and MTOP (with PIN 1). The water heater needs only a few of them, and those we have traced:

ConnectorWhat goes to it
X5_1the pump phases from the inverter, through the JW2SN relay
X13the element temperature sensor: pins 3, 4, 5 (all three wires grey); 4, the middle one, is ground
X20debug pads: SWD, reset, ground, 3.3 V (pinout)
mains connectorlive and neutral (C in the relay photo)

What we do not know yet:

  • which connector and pins the heating element uses (most likely MTOP next to the relays);
  • which pin of the mains connector is live and which is neutral;
  • where the link to the control panel (the D-Bus) goes;
  • what is on X2, X3, X4, X7_1, X12 and X17: probably the valves, level sensors and dispenser; the water heater does not need them, so they stay disconnected.

What this board is in the dishwasher

The hn/bsh-home-appliances project describes Bosch dishwasher power modules of the EPG700xx series: the same microcontroller in a 100-pin package, on some boards the same FSB50550AB inverter, an X20 debug connector. Our board looks like one of that family.

According to that description, this is the washing control unit (address 1 on the bus): it runs the wash program and drives the heating element, pumps and valves. The button panel is a separate node (address 2) that only sends it commands: which program is selected, which options. They talk over the internal D-Bus, described in part two.

What is needed to run the pump

Board areaWhat it doesNeeded for the pump?
mains input and filterprotection and less interferenceyes
bus capacitor~300 V for the inverteryes
TNY274GN power supply13.5 V and 3.3 V for the relays, drivers and STM32yes; held on by pin PC13
FSB50550AB inverterthree phases for the motoryes
microcontroller and firmwaredrives the inverter, works out the rotor position from the currentsyes: the inverter does nothing without it
ALZ51B12T relaysthe heating elementyes, for the water heater
JW2SN relayselects the pumpstays off: then our pump is the one that runs

Why our own firmware. The original firmware is the whole washing control unit: the "run the pump" command is generated inside it while it runs a wash program, and the program waits for level sensors, valves and the door lock; without the rest of the dishwasher it stops with an error. Patching a few bytes of it will not work either, because the firmware checks its own flash (below). So we write our own firmware for the same STM32: the hardware is now known down to the pin, and we take the motor parameters, sensor tables and heating rules from the original. The factory copy sits alongside, so the board can be returned to its factory state at any time. How it is done is in part three. But first, copies of everything the board stores.

A copy of the 24C08WP EEPROM

The easiest and safest first step: read the small settings memory without desoldering or writing anything. The 24C08WP holds 8 kbit, i.e. 1024 bytes, and talks over the I²C bus. Inside are four 256-byte blocks; on the bus they respond at addresses 0x50…0x53, but the reading software takes care of that.

This is where the board keeps its settings. Among them is the "no water" threshold, which the machine learns by itself: it remembers how much current the pump draws when it is moving water and then compares the current against it during a wash. So the EEPROM of a particular machine differs from the factory one, and erasing it means losing these values.

How many probes and where

The 24C08WP EEPROM on the board with labelled pins
With "24C08WP" reading the right way up, pin 1 is at the bottom left. Four pins are needed (highlighted): 8 VCC, 4 GND, 5 SDA, 6 SCL.
PinNameConnect to the programmerWhy
8VCCyes, 3.3 Vchip supply
4GNDyes, GNDcommon ground
5SDAyes, SDAdata
6SCLyes, SCLclock
7WPnowrite protect; does not affect reading
1, 2, 3A0, A1, A2noaddress select; on a 24C08 only A2 is used, and the board already ties it as needed

Four probes. The most convenient is a SOIC-8 clip: it clamps onto the chip and touches all eight pins at once, and its adapter plugs into the programmer's "24xx" socket, red wire (pin 1) to the "1" mark on the socket. Without a clip, use four thin wires soldered to pins 8, 4, 5 and 6 (or to nearby pads connected to them).

A fifth wire only if needed. The programmer powers pin 8, which is also the whole board's 3.3 V rail, so the STM32 microcontroller wakes up too and may access the EEPROM itself while you read. If two reads in a row give different files, hold the microcontroller in reset by tying its NRST to GND. NRST is brought out to pad 3 of the X20 connector (through 220 Ω, pinout).

Check the orientation with a multimeter before connecting anything:

  • pins 8 and 4 must not be shorted;
  • pin 5 to pin 8 and pin 6 to pin 8 should each read ≈ 4.7 kΩ: these are the "472" resistors next to the chip that pull SDA and SCL up to the supply. If that matches, pin 1 is identified correctly.

Wiring diagram

Connecting a CH341B programmer to the 24C08WP EEPROM: four wires — VCC, GND, SDA, SCLCH341B programmer3.3 V switchUSB to the computer24C08WP24C08WP on the boardSOIC-8 clip or 4 wiresPin 8, VCC · 3.3 V supply; this is the whole board's 3.3 V rail · jump to the pin table8Pin 7, WP · write protect; does not affect reading · leave unconnected · jump to the pin table7Pin 6, SCL · I²C clock · jump to the pin table6Pin 5, SDA · I²C data · jump to the pin table5Pin 1, A0 · address select; on the 24C08 only A2 matters and the board already sets it · leave unconnected · jump to the pin table1Pin 2, A1 · address select; on the 24C08 only A2 matters and the board already sets it · leave unconnected · jump to the pin table2Pin 3, A2 · address select; the board already sets it · leave unconnected · jump to the pin table3Pin 4, GND · common return · jump to the pin table4Pin 5, SDA · I²C data · jump to the pin tableSDAPin 6, SCL · I²C clock · jump to the pin tableSCLPin 8, VCC · 3.3 V supply; this is the whole board's 3.3 V rail · jump to the pin tableVCC 3.3 VPin 4, GND · common return · jump to the pin tableGND1 A0, 2 A1, 3 A2, 7 WP — not needed for readingoptional: microcontroller NRST → GND (if two reads in a row differ)board off the mains; 3.3 V from the programmer or a separate supply
Connecting a CH341B programmer to the 24C08WP EEPROM: four wires — VCC, GND, SDA, SCLConnecting a CH341B programmerto the 24C08WP EEPROM: fourwires — VCC, GND, SDA, SCLCH341B programmer3.3 V switchUSB to the computerPin 5, SDA · I²C data · jump to the pin tableSDA→ pin 5 · 24C08WP on the boardPin 6, SCL · I²C clock · jump to the pin tableSCL→ pin 6 · 24C08WP on the boardPin 8, VCC · 3.3 V supply; this is the whole board's 3.3 V rail · jump to the pin tableVCC 3.3 V→ pin 8 · 24C08WP on the boardPin 4, GND · common return · jump to the pin tableGND→ pin 4 · 24C08WP on the boardoptional: microcontroller NRST →GND(if two reads in a row differ)24C08WP on the boardSOIC-8 clip or 4 wires24C08WPPin 8, VCC · 3.3 V supply; this is the whole board's 3.3 V rail · jump to the pin table8Pin 7, WP · write protect; does not affect reading · leave unconnected · jump to the pin table7Pin 6, SCL · I²C clock · jump to the pin table6Pin 5, SDA · I²C data · jump to the pin table5Pin 1, A0 · address select; on the 24C08 only A2 matters and the board already sets it · leave unconnected · jump to the pin table1Pin 2, A1 · address select; on the 24C08 only A2 matters and the board already sets it · leave unconnected · jump to the pin table2Pin 3, A2 · address select; the board already sets it · leave unconnected · jump to the pin table3Pin 4, GND · common return · jump to the pin table41 A0, 2 A1, 3 A2, 7 WP — not neededfor readingboard off the mains; 3.3 V from theprogrammer or a separate supply
The CH341B programmer and the EEPROM on the board: four wires, VCC (red), GND (black), SDA (green), SCL (yellow). Below the diagram: the optional fifth wire, the microcontroller's NRST to GND.

⚠ Keep the board off the mains the whole time. It has no mains isolation, and the USB programmer ties its ground to the computer. Plugging such a board into a socket with the programmer connected puts mains voltage on the computer.

⚠ Set the programmer to 3.3 V. Most CH341B boards have a 3.3 / 5 V switch: set 3.3 V and measure the voltage on the socket's VCC pin before connecting. Old black CH341A boards without a switch put 5 V on the data lines, which is a risk for a board with a 3.3 V microcontroller.

Can the programmer power the board? The 3.3 V regulator on a programmer is usually small, and it feeds the board's whole 3.3 V rail including the STM32. If the voltage on pin 8 drops below ≈ 3 V once connected, power the 3.3 V rail from a separate supply (sharing GND with the programmer) and leave the programmer's VCC unconnected.

Which software to read with

SystemSoftwareWhat to choose
WindowsCH341A Programmer (the software sellers ship with the programmer)type "24 EEPROM", chip 24C08, "Read", then "Save"
WindowsAsProgrammer (open source)I²C, 24C08, "Read", save the file
LinuxIMSProg (graphical) or ch341eeprom (command line)24C08

On Windows, first install the CH341PAR driver from WCH, the chip's maker (download page); how we did it is described below. On Linux, from the command line:

ch341eeprom -v -s 24c08 -r eeprom_1.bin
ch341eeprom -v -s 24c08 -r eeprom_2.bin
cmp eeprom_1.bin eeprom_2.bin && echo "copies match"

Command-line options may differ between builds of ch341eeprom; check them with ch341eeprom -h.

On Windows, fc /b eeprom_1.bin eeprom_2.bin compares the two copies and should report no differences. The file must be exactly 1024 bytes.

  • Read only. Do not press "Erase", "Write" or "Auto": an erased EEPROM means erased board settings.
  • Two identical copies mean the read is reliable. If they differ, check the clip contact and add the fifth wire (NRST to GND).
  • flashrom will not help here: with a CH341 it works only over SPI, and the 24C08 is I²C.

How we read it

We read it on Windows with our own short Python script through the WCH driver library (CH341DLLA64.DLL, installed with the driver). The script only reads (it contains no write functions at all): it reads the chip twice at a slow 20 kHz bus speed and compares the copies.

  1. The driver: CH341PAR on the WCH website, the file CH341PAR.EXE. Check its digital signature before running it (file properties → "Digital Signatures": Nanjing Qinheng Microelectronics). Silent install, as administrator: CH341PAR.EXE /S.
  2. After installation, Device Manager should list the programmer as "USB-EPP/I2C… CH341A" with no warning icon. If it shows as "USB-SERIAL", the jumper on the programmer is in UART mode; move it.
  3. The script: read_eeprom_ch341.py · 4.2 KB, which needs 64-bit Python 3. Run it with:
python -I read_eeprom_ch341.py

It saves two copies into a dumps folder next to the script (you can pass another folder as an argument: python -I read_eeprom_ch341.py D:\my_dumps) and reports whether they match.

What is in the dump

We read 1024 bytes, and the two copies read back to back match. The file: eeprom_24c08_sws4118.bin · 1.0 KB. It holds no board numbers: none from the sticker, no batch number, no PCB number; we searched for them in decimal, BCD and binary form.

Block (addresses)FF / 00 bytesWhat is inside
0 (0x000–0x0FF)15 / 210a table of 15 records with the same layout (below)
1 (0x100–0x1FF)15 / 113the most data: settings and calibration
2 (0x200–0x2FF)133 / 91probably more settings, a smaller area
3 (0x300–0x3FF)256 / 0empty, all 0xFF

Block 0: a table of 16-byte records. Each record is FF, a code byte, 13 zeros, and a final byte equal to the sum of bytes 1–14, which looks like a checksum (while the other bytes are zero it equals the code). The codes rise from record to record: 1B, 1F, 2E, 30, 53, 54, 55, 56, 57, 58, 5A, 61, 62, 63, 64. Address 0x0F0 holds a single number, 08. What the table is (an error log, a list of enabled features or something else) we have not yet looked up in the firmware.

Block 1: settings. What stands out:

  • the value 1A 23 appears three times (0x126, 0x140, 0x181), possibly a data version ID;
  • at 0x1B8–0x1DF there are 40 bytes, almost all 64 (= 100), including two 58 (= 88) and one 00: looks like a table of percentages or coefficients;
  • at 0x1EE–0x1EF, 41 8F right after a run of FF: looks like a checksum for the block. It is not a plain sum of the block's bytes; the algorithm is not known yet.

Block 2. At 0x214–0x215, again right after a run of FF, there is BF 41 (which also looks like a checksum), then repeating pairs 0E 74 0E 74 and 2B 0E 2B 0E, and a few dozen more bytes of values; the last one is at 0x268. From 0x269 to 0x290 there are zeros, and from 0x291 to the end of the block only FF.

There is no text, no model name or version: the contents are entirely binary.

A factory image in the firmware. The microcontroller's flash holds a factory image of this EEPROM, and the firmware copies it into the EEPROM if the EEPROM is blank. Block 1 of our EEPROM matches it in 198 of 256 bytes; the other 58 are changed settings and learned values, the "no water" threshold among them.

What this means for us:

  • the memory holds the settings of this particular machine; we have a copy, and it is worth keeping even if the board goes back to the original firmware;
  • we have not looked for run-time counters (hours or cycles): they can only be found by comparing copies taken before and after the board runs on the original firmware.

The STM32 microcontroller: a copy of the firmware

The aim of this step is to find out exactly which chip this is, whether the firmware is protected against reading, and if not, to save a copy. Nothing is written or erased. The CH341B programmer will not help here: an STM32 is read over SWD, which the CH341 does not have. We read it with an ST-Link V2 (a cheap clone); how to do the same with a Raspberry Pi 3B+ is in the collapsible block below.

Where to find the pins

X20 pads 1–6: SWCLK, SWDIO, NRST via 221, PB4, GND, 3.3 V
The X20 pads on the board, close up: the number and signal of each pad, as we traced them.
STM32 in an LQFP100 package: where to find the SWD, reset and power pins — oriented as in the photoSTM32F301VCT6NRST, reset · helps if the link will not come up; goes to X20 pad 3 via 220 Ω · jump to the ST-Link wiringPA9 (TX), USART1 of the ST built-in bootloader · not needed for reading · jump to the pin tablePA10 (RX), USART1 of the ST built-in bootloader · not needed for reading · jump to the pin tableSWDIO (PA13), debugger data · needed for reading; X20 pad 2 · jump to the wiringVSS, ground · orientation check: should beep to GND · jump to the checkVDD, 3.3 V · orientation check: should beep to the 3.3 V rail · jump to the checkSWCLK (PA14), debugger clock · needed for reading; X20 pad 1 · jump to the wiringBOOT0, boot selection · do not touch · jump to the pin tableVSS, ground · orientation check: should beep to GND · jump to the checkVDD, 3.3 V · orientation check: should beep to the 3.3 V rail · jump to the check1–25 →26–50 →← 51–75← 76–100pin-1 dotVDD, 3.3 V · orientation check: should beep to the 3.3 V rail · jump to the check75 VDD·3.3 VVSS, ground · orientation check: should beep to GND · jump to the check74 VSS·GNDSWDIO (PA13), debugger data · needed for reading; X20 pad 2 · jump to the wiring72 SWDIO (PA13)PA10 (RX), USART1 of the ST built-in bootloader · not needed for reading · jump to the pin table69 RX (PA10)PA9 (TX), USART1 of the ST built-in bootloader · not needed for reading · jump to the pin table68 TX (PA9)SWCLK (PA14), debugger clock · needed for reading; X20 pad 1 · jump to the wiring76 SWCLK (PA14)BOOT0, boot selection · do not touch · jump to the pin table94 BOOT0VSS, ground · orientation check: should beep to GND · jump to the check99 VSS·GNDVDD, 3.3 V · orientation check: should beep to the 3.3 V rail · jump to the check100 VDD·3.3 VNRST, reset · helps if the link will not come up; goes to X20 pad 3 via 220 Ω · jump to the ST-Link wiring14 NRST — resetpins numbered anticlockwise from pin 1
STM32 in an LQFP100 package: where to find the SWD, reset and power pins — oriented as in the photoSTM32 in an LQFP100 package:where to find the SWD, resetand power pins — oriented as inthe photoSTM32F301VCT6NRST, reset · helps if the link will not come up; goes to X20 pad 3 via 220 Ω · jump to the ST-Link wiringPA9 (TX), USART1 of the ST built-in bootloader · not needed for reading · jump to the pin tablePA10 (RX), USART1 of the ST built-in bootloader · not needed for reading · jump to the pin tableSWDIO (PA13), debugger data · needed for reading; X20 pad 2 · jump to the wiringVSS, ground · orientation check: should beep to GND · jump to the checkVDD, 3.3 V · orientation check: should beep to the 3.3 V rail · jump to the checkSWCLK (PA14), debugger clock · needed for reading; X20 pad 1 · jump to the wiringBOOT0, boot selection · do not touch · jump to the pin tableVSS, ground · orientation check: should beep to GND · jump to the checkVDD, 3.3 V · orientation check: should beep to the 3.3 V rail · jump to the check1–25 →← 51–7526–50 →← 76–100● pin-1 dot · pins numberedanticlockwise from pin 1NRST, reset · helps if the link will not come up; goes to X20 pad 3 via 220 Ω · jump to the ST-Link wiring14 · NRST — resetPA9 (TX), USART1 of the ST built-in bootloader · not needed for reading · jump to the pin table68 · TX (PA9)PA10 (RX), USART1 of the ST built-in bootloader · not needed for reading · jump to the pin table69 · RX (PA10)SWDIO (PA13), debugger data · needed for reading; X20 pad 2 · jump to the wiring72 · SWDIO (PA13)VSS, ground · orientation check: should beep to GND · jump to the check74 · VSS·GNDVDD, 3.3 V · orientation check: should beep to the 3.3 V rail · jump to the check75 · VDD·3.3 VSWCLK (PA14), debugger clock · needed for reading; X20 pad 1 · jump to the wiring76 · SWCLK (PA14)BOOT0, boot selection · do not touch · jump to the pin table94 · BOOT0VSS, ground · orientation check: should beep to GND · jump to the check99 · VSS·GNDVDD, 3.3 V · orientation check: should beep to the 3.3 V rail · jump to the check100 · VDD·3.3 V
The LQFP100 package in the same orientation as the microcontroller photo: the marking reads the right way up, with the pin-1 dot at the bottom left. Pin 1 is the leftmost pin on the bottom side, and the numbering runs anticlockwise from there.
PinSignalWhat forNeeded for reading
72PA13, SWDIOdebugger datayes
76PA14, SWCLKdebugger clockyes
14NRSTresetadvisable: helps if the link will not come up
99, 74VSSGNDyes (any GND point on the board)
100, 75VDD3.3 Vboard power
94BOOT0boot mode selectno, leave it alone
68, 69PA9, PA10USART1: ST's built-in bootloaderno (a fallback route: needs BOOT0 = 1, and read protection applies here too); on this board PA9 drives a heating element relay
  • The pin numbers are ST's standard 100-pin layout (as on the STM32F303VC). Before connecting anything, check the orientation with a multimeter: pins 99 and 74 should ring through to GND (for example, to EEPROM pin 4), and 100 and 75 to the 3.3 V rail (EEPROM pin 8). If they match, the numbers are right.
  • Do not solder to the pins: at 0.5 mm pitch it is easy to bridge neighbours.

What the X20 pads carry (D in the microcontroller photo; counted left to right as in the photo, along the bottom edge of the board), traced with a continuity tester:

X20 padGoes toWhat it is
1pin 76SWCLK (PA14)
2pin 72SWDIO (PA13)
3pin 14NRST (reset), not direct but through a 220 Ω resistor (marked 221)
4pin 90PB4 (NJTRST in JTAG); the firmware keeps it as an input, and on the live board it reads logic 1
5GNDcommon ground
63.3 Vthe 3.3 V supply rail

So X20 is a debug connector: SWD and reset are already on it, and the X20 pads are a convenient place for probes or soldered wires.

The X20 pads labelled: where to connect the ST-Link
The X20 pads from left to right: 1 SWCLK, 2 SWDIO, 3 NRST (optional), 4 PB4 (leave unconnected), 5 GND, 6 3.3 V. The frame colours match the wires on the ST-Link wiring diagram.
X20 pads and the traces from pads 3 and 4: pad 3 through resistor 221 to NRST, pad 4 to pin 90
Tracing pads 3 and 4. Red line: pad 3 → resistor 221 (220 Ω) → pin 14, NRST, on the bottom side of the package. Green: pad 4 → pin 90 on the left side of the package.
  • The 220 Ω resistor in the reset line does no harm: the ST-Link pulls NRST to ground, and 220 Ω only limits the current, most likely in case the pad is shorted to the supply by accident.
  • Pad 4 (PB4) is not needed for reading. The firmware sets it up as an input without an internal pull resistor, and on the live board it reads 1, so there is probably an external pull-up. It may be a factory service-mode input; what it does has not yet been found in the firmware. Do not short it to ground on a working board until we know what it is.

Compared with a public write-up. The hn/bsh-home-appliances project describes Bosch dishwasher power modules with the same STM32F301VCT6 marking and gives this X20 order: SWCLK, SWDIO, BOOT0, RESET, GND, 3.3 V. The first two and the last two pads match what we traced. Pads 3 and 4 are different on our board: 3 is NRST (pin 14), 4 is PB4 (pin 90), and BOOT0 is not brought out to X20. So either hn's boards are a different revision or that description has the order mixed up: trust the continuity check on your own board.

Connecting an ST-Link V2

Connecting an ST-Link V2 to the board's X20 test pads: SWCLK, SWDIO, GND and 3.3 VST-Link V2header on the caseX20 pad 1 → pin 76 (PA14), SWCLK · SWD clock · jump to the pad tableSWCLKX20 pad 2 → pin 72 (PA13), SWDIO · SWD data · jump to the pad tableSWDIOX20 pad 3 → pin 14, NRST, via a 220 Ω resistor · optional · jump to the pad tableRSTX20 pad 5, GND · common return · jump to the pad tableGNDX20 pad 6, 3.3 V rail · power the board from the ST-Link or a separate supply, never both · jump to the wiring3.3 VX20 pads on the boardleft to right, as in the photoX20 pad 1 → pin 76 (PA14), SWCLK · SWD clock · jump to the pad table1 · SWCLK (76, PA14)X20 pad 2 → pin 72 (PA13), SWDIO · SWD data · jump to the pad table2 · SWDIO (72, PA13)X20 pad 3 → pin 14, NRST, via a 220 Ω resistor · optional · jump to the pad table3 · NRST (14, via 220 Ω)X20 pad 4 → pin 90 (PB4, NJTRST in JTAG) · not needed for reading; do not short to ground · jump to the pad table4 · pin 90 (PB4)X20 pad 5, GND · common return · jump to the pad table5 · GNDX20 pad 6, 3.3 V rail · power the board from the ST-Link or a separate supply, never both · jump to the wiring6 · 3.3 VRST to pad 3 is optional: only if the link will not come up without a resetboard off the mains; 3.3 V from the ST-Link or a separate supply, never both
The ST-Link V2 and the X20 pads: SWCLK (yellow) to pad 1, SWDIO (green) to pad 2, GND to pad 5, 3.3 V to pad 6. RST (dashed) goes to pad 3 and is optional: you need it if the link will not come up without a reset.
ST-Link V2X20 padOn the board
SWCLK1pin 76 (PA14)
SWDIO2pin 72 (PA13)
GND5GND
3.3 V63.3 V rail
RST3NRST, pin 14 (through 220 Ω), if needed
  • Power. On cheap ST-Link clones the 3.3 V pin is an output: it powers the board, so no separate supply is needed, and none should be connected: two sources on one rail fight each other. On a genuine ST-Link this pin only senses the voltage: then a separate 3.3 V supply powers the board, and pad 6 is wired to the ST-Link's 3.3 V pin for sensing. Once connected, measure the voltage on pad 6: it should be ≈ 3.3 V. If a clone gives less than about 3 V, its regulator cannot carry the board: disconnect its 3.3 V pin and power the board from a separate supply (shared GND).
  • Keep the board off the mains the whole time (see Safety).
  • Keep the wires short (15–20 cm at most).
  • If the clone only connects now and then, wire up RST as well: make the first connection after plugging into USB with a reset (mode=UR instead of mode=HOTPLUG in the commands below), and carry on as usual after that. This helped us later, when we were flashing our own firmware; the first read needed no reset.
  • Software: ST's STM32CubeProgrammer (Windows, Linux, macOS) or OpenOCD. On Windows, the ST-Link driver is installed together with STM32CubeProgrammer.
How to connect a Raspberry Pi 3B+ instead of an ST-Link
Connecting a Raspberry Pi 3B+ to the STM32 SWD on the board: SWCLK, SWDIO, GND and NRSTRaspberry Pi 3B+GPIO header (pins)Dishwasher boardon the X20 pads: 1 SWCLK, 2 SWDIO, 3 NRST, 5 GND, 6 3.3 VRaspberry Pi pin 22 · GPIO25 → SWCLK (X20 pad 1, pin 76) · jump to the wiringpin 22 · GPIO25SWCLK — PA14 (76)Raspberry Pi pin 18 · GPIO24 → SWDIO (X20 pad 2, pin 72) · jump to the wiringpin 18 · GPIO24SWDIO — PA13 (72)Raspberry Pi pin 20 · GND → GND (X20 pad 5), shared with the board supply · jump to the wiringpin 20 · GNDGNDRaspberry Pi pin 12 · GPIO18 → NRST (X20 pad 3, pin 14) · optional · jump to the wiringpin 12 · GPIO18NRST (14) — optional3.3 V to the board from a separate supply (GND shared with the Pi)board off the mains; read only
Connecting a Raspberry Pi 3B+ to the STM32 SWD on the board: SWCLK, SWDIO, GND and NRSTConnecting a Raspberry Pi 3B+to the STM32 SWD on the board:SWCLK, SWDIO, GND and NRSTRaspberry Pi 3B+GPIO header (pins)Raspberry Pi pin 22 · GPIO25 → SWCLK (X20 pad 1, pin 76) · jump to the wiringpin 22 · GPIO25→ SWCLK — PA14 (76)Raspberry Pi pin 18 · GPIO24 → SWDIO (X20 pad 2, pin 72) · jump to the wiringpin 18 · GPIO24→ SWDIO — PA13 (72)Raspberry Pi pin 20 · GND → GND (X20 pad 5), shared with the board supply · jump to the wiringpin 20 · GND→ GNDRaspberry Pi pin 12 · GPIO18 → NRST (X20 pad 3, pin 14) · optional · jump to the wiringpin 12 · GPIO18→ NRST (14) — optionalDishwasher boardon the X20 pads: 1 SWCLK, 2 SWDIO,3 NRST, 5 GND, 6 3.3 V3.3 V to the board from a separatesupply (GND shared with the Pi)board off the mains; read only
A Raspberry Pi 3B+ and the board's SWD pins: SWCLK, SWDIO, GND, and the optional NRST dashed. The numbers are the physical pins of the Pi's 40-pin header.
Raspberry Pi 3B+ pinPi signalOn the board
22GPIO25SWCLK, X20 pad 1, pin 76
18GPIO24SWDIO, X20 pad 2, pin 72
20GNDGND, X20 pad 5
12GPIO18NRST, X20 pad 3, pin 14

Power the board with 3.3 V from a separate supply (X20 pad 6), with GND shared with the Pi: better not to load the Pi's own 3.3 V pin with the board. The software is OpenOCD:

sudo apt install openocd telnet
sudo openocd -f interface/raspberrypi2-native.cfg -c "transport select swd" -f target/stm32f3x.cfg -c "adapter speed 100"

If OpenOCD reports that raspberrypi2-native.cfg does not exist, your version has merged it into interface/raspberrypi-native.cfg. After that, use the same commands in telnet localhost 4444 as for the ST-Link below.

Software and drivers

WhatWhere to get itWhat for
STM32CubeProgrammerst.com: STM32CubeProg, free; downloading needs an ST accountreading the flash and option bytes; it has both a window and a command-line STM32_Programmer_CLI
ST-Link driver for Windowsinstalled together with STM32CubeProgrammer; separately as STSW-LINK009so that Windows can see the ST-Link
OpenOCDLinux: sudo apt install openocd; Windows: xPack OpenOCD buildsa free alternative; works with both an ST-Link and a Raspberry Pi
Ghidraghidra-sre.organalysing the firmware copy on a computer

On Windows the command-line program ends up here after installation:

C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin\STM32_Programmer_CLI.exe

Below we simply write STM32_Programmer_CLI: either add the bin folder to PATH or run the commands from it.

The steps in short:

  1. The board stays off the mains. Wire the ST-Link to X20 as in the diagram above, then plug it into USB.
  2. Check that the computer sees the ST-Link: STM32_Programmer_CLI -l st. It lists the ST-Link, its firmware version and its serial number (if you publish the output, it is best to remove the number).
  3. Check the protection: STM32_Programmer_CLI -c port=SWD mode=HOTPLUG freq=100 -ob displ. An RDP line reading 0xAA (Level 0, no protection) means there is no protection and the firmware can be read. The other values are explained in the next section.
  4. Read the firmware twice and compare the copies: see If there is no protection: a copy.

Can the firmware be saved?

An STM32 has read protection, the RDP level (0, 1 or 2), and whether the firmware can be read depends on it.

STM32CubeProgrammer (the easiest way). Choose ST-LINK, connection mode "Normal" (or "Hot plug", to connect without resetting the microcontroller), and press Connect. The software shows the chip name and flash size, and the OB (Option bytes) tab shows RDP: AA is level 0, CC is level 2, BB or anything else is level 1. Do not change anything on the OB tab and do not press Apply. If the software offers to update the ST-Link's own firmware, decline: clones sometimes stop working after such an update.

OpenOCD (Windows, Linux):

openocd -f interface/stlink.cfg -f target/stm32f3x.cfg -c "adapter speed 100"

Once OpenOCD has found the microcontroller, in a second window:

telnet localhost 4444

and there, one at a time (each command only reads):

mdw 0xE0042000
mdh 0x1FFFF7CC
mdw 0x4002201C
mdb 0x1FFFF800 16
CommandWhat it showsHow to read it
mdw 0xE0042000the device IDthe last three hex digits: 422 is the F302/F303 family with 128–256 KB; 439 is F301/F302 with 32–64 KB; 446 is F302/F303 with 384–512 KB
mdh 0x1FFFF7CCflash size in KB0x0100 = 256 KB, 0x0040 = 64 KB
mdw 0x4002201Cthe FLASH_OBR registerbits 2–1: 00 is level 0, 01 is level 1 (a last hex digit of 0 or 1 means level 0; 2 or 3 means level 1)
mdb 0x1FFFF800 16option bytes, the chip settingsa first byte of aa means level 0
ResultLevelWhat it meansWhat we do
bits 2–1 = 00, first option byte aa0no protectionsave the whole flash (below)
bits 2–1 = 01, first byte something else (not aa)1the flash cannot be read over SWDthe firmware cannot be copied. Protection can only be removed together with erasing all the firmware, and we do not do that
the software cannot see the microcontroller although the wiring has been checkedpossibly 2debugging is disabled for goodthe firmware can be neither read nor replaced; first check the wires, power and NRST again

If there is no protection: a copy

In STM32CubeProgrammer: the "Memory & File editing" tab (the pencil icon), address 0x08000000, size 0x40000 (256 KB; if the software showed a different flash size after Connect, use that), Read, then Save As… to a file. Do it twice and compare the files.

From the STM32CubeProgrammer command line (this is how we read it; every command only reads):

STM32_Programmer_CLI -c port=SWD mode=HOTPLUG freq=100 -ob displ
STM32_Programmer_CLI -c port=SWD mode=HOTPLUG freq=100 -u 0x08000000 0x40000 flash_1.bin
STM32_Programmer_CLI -c port=SWD mode=HOTPLUG freq=100 -u 0x08000000 0x40000 flash_2.bin
STM32_Programmer_CLI -c port=SWD mode=HOTPLUG freq=100 -u 0x1FFFF800 0x10 optbytes.bin
  • mode=HOTPLUG connects without resetting the microcontroller: its program keeps running.
  • freq=100 means 100 kHz: slow (one 256 KB copy takes ≈ 33 s), but reliable even with probe wires.
  • -u (upload) means reading from the microcontroller into a file, confusing as the name is. Writing to the microcontroller is done by -d and -w, erasing by -e; we do not use those here.
  • To compare the copies: on Windows fc /b flash_1.bin flash_2.bin ("FC: no differences encountered" means identical), on Linux cmp flash_1.bin flash_2.bin (no output means identical). Or compare checksums: certutil -hashfile flash_1.bin SHA256 on Windows, sha256sum flash_*.bin on Linux.

In OpenOCD, in the same telnet window:

halt
dump_image flash_1.bin 0x08000000 0x40000
dump_image flash_2.bin 0x08000000 0x40000
dump_image optbytes.bin 0x1FFFF800 16
resume
  • 0x40000 is 256 KB. If mdh 0x1FFFF7CC showed a different size, use that instead: the size in KB × 1024, in hex.
  • halt only stops the program running and resume continues it; nothing is written.
  • The files appear in the folder OpenOCD was started from. The two copies must be identical (cmp flash_1.bin flash_2.bin) and must not be all FF or all 00.

What else to save

WhatWhereWhyIn the article
the firmware (flash)0x08000000, 256 KBthe master copy, so we can always go backno: it is the manufacturer's program
option bytes0x1FFFF800, 16 bytesthe protection level and chip settingsyes, the values and what they mean
device ID, flash size0xE0042000, 0x1FFFF7CCthe exact modelyes
the chip's unique ID0x1FFFF7AC, 12 bytesidentifies this particular chipno, it is private
the 24C08WP EEPROMabovesettings and learned valuesyes: it holds no board numbers
ST's built-in bootloadersystem memorythe same on every such chip, no need to save it—

What you can do without breaking anything

Allowed (read only)Why
read the device ID, flash size and option bytesto know what the chip is and how it is configured
read the flash and RAMa copy of the firmware; the state of variables while running
read peripheral registers (GPIO, timers, UART settings; not the UART and SPI data registers, as reading them clears their flags)to learn which pins drive the inverter PWM and which UART goes to the panel
halt / resumestop the program to look at its state, then carry on
analyse the firmware copy on a computer (Ghidra: ARM Cortex-M, base 0x08000000)to find how the firmware drives the motor, relays and sensors
Not allowed: it breaks something, or breaks it for goodWhat happens
removing level 1 protection (stm32f1x unlock, setting RDP to 0)all the firmware is erased
setting level 2debugging is disabled for good; there is no way back
flash erase…, flash write…, program, "Erase", "Program", "Download"the firmware is erased or replaced
changing the option bytes (stm32f1x options_write)can turn on protection or change how the chip behaves
connecting the board to the mains while a Pi or programmer is connectedmains voltage on the Pi and the computer

The rule for this step: every command here only reads. If any software offers to erase, write or "unlock" anything, the answer is no.

What we read

We read it with an ST-Link V2 clone connected to the X20 pads: pad 1 SWCLK, pad 2 SWDIO, pad 5 GND, pad 6 3.3 V. The ST-Link itself powered the board. Pads 3 (NRST) and 4 were left unconnected: no reset was needed. The commands are the ones in the copy section, run from the STM32CubeProgrammer v2.23 command line.

WhatResult
board voltage (from the ST-Link)3.26 V
device ID0x422, revision Y: the STM32F302xB/xC and F303xB/xC family, Cortex-M4 core
flash256 KB (0x1FFFF7CC = 0x0100)
read protection (RDP)0xAA: level 0, no protection
write protectionoff on all areas
option bytesaa 55 ff 00 ff 00 ff 00 ff 00 ff 00 ff 00 ff 00: factory values
firmware copysaved: two 256 KB copies, byte-for-byte identical; ≈ 33 s each
option bytes copysaved, 16 bytes

The marking does not match the chip. The package says STM32F301 VCT6, but the chip identifies as an STM32F302/F303 with 256 KB (the F301 line has ID 0x439 and at most 64 KB). The chip looks like it was marked to order for the board maker. Judging by the blocks the firmware uses (the TIM8 timer, six comparators, four op-amps; the F302 has no TIM8), it is most likely an STM32F303xC, so we work from the STM32F303VC documentation. The pinout agrees: SWD really is on pins 72 and 76, as on the F303VC.

What we saved besides the firmware: the option bytes (16 bytes), the device ID and flash size, and the chip's unique ID (0x1FFFF7AC, 12 bytes). The unique number stays in private notes only: it identifies this one chip. It can be read like this:

STM32_Programmer_CLI -c port=SWD mode=HOTPLUG freq=100 -r32 0x1FFFF7AC 12

The EEPROM copy is published above: it does not contain the board number. We do not publish the firmware itself: it is the manufacturer's program.

What the firmware consists of

Everything here was worked out from the copy on a computer, without writing anything to the board. The 256 KB of flash is laid out like this:

Flash areaSizeWhat is there
the first page (2 KB)≈ 1 KBthe bootloader
next≈ 118 KBthe main program: interrupt table, code, tables
a separate area in the upper half32 KBdata: settings, including a factory EEPROM image
one more small area≈ 200 bytesa little more data
the rest≈ 100 KBempty (FF)

The bootloader

Right at the start sits the string EDS_ST_STM32F3_02_210313, which looks like a build name and date (13 March 2021). What the bootloader does at power-on:

  1. It starts the external oscillator (on our board the 8 MHz 80.K ceramic resonator) and a ×3 frequency multiplier: 24 MHz.
  2. It sets up the USART1 serial port on PE0/PE1 (pins 97 and 98): 9600 baud, 8 bits with parity (at 24 MHz a divider of 2500 gives exactly 9600).
  3. It sends the byte 0x54 and waits ≈ 30 ms for a reply (up to 1 s if the previous start asked for longer).
  4. If there is no reply, it leaves a 55 AA marker in RAM and restarts the chip with the watchdog. The next start sees the marker and hands over straight to the main program.
  5. If there is a reply, it accepts commands:
Command byteWhat it does (from our analysis)
0x0Alink check, answers 0x8A
0x5Breturns the version string (EDS_ST_…, 32 bytes)
0x77sets an address (most likely where to receive data)
0x04changes the port speed
0x1Aruns code from the given address

The bootloader itself does not write to flash: updating apparently works by receiving a flashing program into RAM, which then rewrites the main program. In other words, the firmware can be updated over the same serial port the board uses to talk to the panel (only the format differs: the bootloader uses parity, 8E1, the main program does not, 8N1). We are not doing that, but it explains why the bootloader is there.

The main program

The main program starts with its interrupt table right after the bootloader. Apart from the standard ones, only seven handlers are in use, and they show straight away what the program is about:

InterruptWhat it is
ADC1_2the vector-control tick: as soon as ADC1 has measured the bus voltage, the firmware computes the motor control; the U and V phase currents are measured by ADC3 and ADC4 through the built-in op-amps
TIM1_UPevery PWM period of the inverter
TIM1_BRK, TIM8_BRKemergency shutdown of the inverters (the firmware is built for two inverters; our board has one)
USART1receiving and sending on the D-Bus
UART5another serial port: transmit only, not brought out to any pin; purpose unknown
EXTI9_5an event on pin 93 (PB7), most likely from something that pulses

The program can write to its own flash (it contains the flash unlock sequence), most likely to keep some of its settings in the data area. What the firmware switches on in the chip and which pins it reads is in part two.

Flash self-test

While running, the program uses the hardware CRC unit to checksum areas of its own flash, following a table of ranges. Household appliances commonly do this so that corrupted memory never ends up driving the heating element and the motor.

The consequence for us: you cannot patch even one byte of the original firmware, because the self-test will notice (hence our own firmware).

Next

  1. The board map: what the original firmware switches on in the chip, which pins go where, the temperature sensors and the D-Bus are in part two.
  2. Our own firmware: relays, sensors, the pump and the heating element are in part three.

Safety

  • Do not plug the board into the mains while a programmer, ST-Link or Raspberry Pi is connected. The board's ground is tied to the mains, so mains voltage would end up on the computer. How to check this with a meter and how to work on the mains is in part three.
  • The bus capacitor holds ~325 V for anything from a few seconds to a few minutes after switch-off. Before touching a board that has been on the mains, measure the voltage across it; if needed, discharge it through a 10 kΩ 5 W resistor, not a screwdriver.
  • The motor wires are at mains potential: the inverter has no isolation, and each output pulses up to ~325 V relative to earth. The "54 V" on the drain pump is only the rated winding voltage that the inverter produces by PWM.
  • A permanent-magnet motor generates voltage by itself when its shaft turns (by hand or from water flow), even with the board switched off.
  • Run the heating element only with water flowing, on its own circuit with a 16 A breaker and a 30 mA RCD, with the pump housing earthed.

🔒 Identifiers and original copies: hidden, only the author can see this.

Article changelog

  • 2026-11-18 — the series was restructured from five parts into three. This part now brings together the board, the EEPROM copy, the STM32 firmware copy (formerly part two) and the layout of the original firmware (from the former part three). Updated from measurements and the firmware analysis: the supply voltages, the PC13 pin holding the supply on, the inverter driver supply switched on by pulses, the 0.41 Ω shunts, the element relays and the JW2SN, the 8 MHz resonator, the known connectors, the "no water" threshold in the EEPROM; the pump section now records the decision to write our own firmware.
  • 2026-11-15 — firmware layout: the EXTI9_5 interrupt comes from pin 93 (PB7).
  • 2026-11-12 — photo of the X20 pads labelled with where to connect the ST-Link; the JW2SN relay stated as a fact, not a guess.
  • 2026-11-10 — X20 pads 3 and 4 traced: 3 is NRST through 220 Ω, 4 is pin 90 (PB4); a tracing photo; the ST-Link and Raspberry Pi diagrams updated.
  • 2026-11-10 — firmware analysis: layout, the bootloader, the main program, the self-test.
  • 2026-11-10 — the STM32 firmware copy: software and drivers, the steps in short, command-line commands, the results from our board, a check of X20 against an open description.
  • 2026-11-10 — first draft: useful parts left from the dishwasher, a description of the board from photos, what the pump needs, the EEPROM copy.