Bosch dishwasher board SWS4118: the board map — what we found in the firmware and by testing (part 2)
Contents 10
Part two of three on the Bosch dishwasher board 702168823.01GA / SWS4118 Rev.4. Part one covers what is on the board, the EEPROM and firmware copies, and how the firmware is put together. This part is the board map: which microcontroller pin controls what, and how we found out. Without this map we could not write our own firmware. In this article:
- what we need and what we deliberately leave out;
- what the original firmware switches on in the chip: two inverters, field-oriented control of the pump, temperature sensors, inputs;
- the D-Bus the board uses to talk to the panel;
- the board map: every point found, with measurements; the relays, the power module and shunts, the driver supply, the sensor, the resonator, free pins for a display;
- every microcontroller pin, in a collapsible table;
- what is still unknown and what use all this is to us;
- an appendix for anyone repeating this: preparing for continuity testing and reading registers.
Our own firmware, stage by stage, is in part three.
draft — the map is still being filled in
⚠ All continuity testing is done on an unpowered board: unplugged, ST-Link disconnected, the big capacitor discharged. The registers were read with the board powered only by the ST-Link over USB (3.3 V, no mains), and read-only. The board ground is tied to mains, so while the board is on mains we connect neither the ST-Link, nor a computer, nor an oscilloscope. The reasons are in part three.
What we need and what we leave out
We need little from the board: run the pump with its built-in heater, measure the heater temperature, switch the heater on, and perhaps set the flow rate through the pump speed. Everything else the water heater needs will be handled by another controller with its own sensors and buttons.
So we do not look for the dishwasher's sensors: flood, door, salt and rinse aid, water level and turbidity, the buttons. We would need them if we kept the original firmware: it runs the wash program and stops with an error without them. Our own firmware does without them, and disconnected connectors do not bother it.
How the heater stays safe without the dishwasher's sensors
A 2.6 kW heater with no water overheats within seconds. In the dishwasher the level and flow sensors guarded against that; we are removing them, so we build the protection like this:
- The thermal fuses on the pump-heater itself stay in place. That protection works without any firmware.
- The heater runs only while the pump turns and water really flows. A pump running dry draws noticeably less current, and the firmware sees that. We took the rules from the original firmware: the current threshold, the delay after start-up, the limits for both temperature sensors on the heater. Our own firmware does the same (version 25, not yet written to the board; part three).
- The flood sensor on the other controller is best wired to cut the power physically, with a relay or contactor, rather than just send a command.
How we went about it
We built the map from four sources, and each one covers what the others cannot see:
- Live board registers:
STM32_Programmer_CLIwith-r32while the original firmware runs. They give the mode of every pin (output, input, analog input or a peripheral pin such as a timer output) and the timer, comparator and port settings. - The original firmware's code: the Capstone disassembler for a first look, then Ghidra (ARM Cortex, little endian, base
0x08000000). It tells which pins the program reads and which ones it waits on for interrupts: a plain input after reset looks exactly like a pin the firmware never touches, and only the code tells them apart. - A pull-up/pull-down test: through the ST-Link we switched each pin's internal pull-up and then pull-down on in turn. A pin whose level follows the pull has nothing on the board holding its level.
- Continuity testing: the beeper and resistance ranges, a needle on the probe. It tells where a pin leads on the board and through which parts.
⚠ The sensors and buttons were disconnected during the pull-up/pull-down test, so "floating" does not mean "goes nowhere": the pin may lead to a connector.
How to read registers without disturbing the program, and how to prepare the board for continuity testing, is in the appendix at the end.
What the firmware switches on in the chip
This was read from the live board's registers with the original firmware already running (the board on 3.3 V from the ST-Link, no motors connected).
| Peripheral | What we read | What it means |
|---|---|---|
| clocks | external oscillator × 9, APB2 bus undivided, APB1 /2 | an 8 MHz resonator × 9 = 72 MHz, this chip's top speed; our firmware runs from it the same way (resonator) |
| USART1 (PE0, PE1) | divider 7500, 8 bits without parity, interrupt-driven receive | 9600 baud, 8N1: exactly the D-Bus |
| TIM1 (PE8–PE13) | at rest: three complementary output pairs, centre-aligned PWM, period 1562, 2 µs dead time | a three-phase inverter that drives the FSB50550AB power module; PWM ≈ 23 kHz at rest, 10 kHz in operation (see below) |
| TIM8 (PC6–PC8, PC10–PC12) | at rest the same, period 3446 | a second three-phase inverter (PWM ≈ 10.4 kHz at rest); not populated on our board |
| outputs of both timers | main output enable off | the motors are stopped, as they should be without mains |
| comparators COMP1–COMP6 | all six on, outputs routed to the timers' break inputs | overcurrent protection: three per inverter, one per phase |
| op-amps OPAMP1–OPAMP4 | on | they amplify the current-shunt signals for the ADC |
| DAC, both channels | 1806 of 4095 (≈ 1.46 V) | the threshold for the protection comparators |
| ADC 1–4 | 23 pins in analog mode | currents, voltages, temperatures, levels |
| TIM2 (PA9, PA10), TIM3 (PB5), TIM4 (PD13, PD15) | pins in timer mode | PB5 and PA9 are the heater relays, PD13 the JW2SN relay (relays); PA10 and PD15 float on the board |
| UART5 | transmit only, ≈ 900 baud; not routed to any pin | purpose unknown |
| watchdogs | independent and window | if the program hangs, the chip restarts |
| CRC unit | computes a checksum of flash areas while running | a self-test (part one) |
We read the timers at rest, with the pump stopped. In operation the original firmware sets both to a period of 3600 with centre-aligned PWM, which is 10 kHz, and computes field-oriented control for the two motors in turn, about 5,000 times a second for each (field-oriented control).
Two inverters, one power module
The firmware is ready to drive two three-phase motors: both timers are set up the same way, each with its own protection. The board, though, carries a single FSB50550AB power module. Tracing showed that its inputs go to pins 39–44, so TIM1 drives it. The TIM8 outputs (63–65 and 78–80) lead through 1 kΩ resistors to an empty footprint for a second such module. Most likely the board is made for several dishwasher models, and on ours the second inverter is simply not populated (free pins).
The one module runs two pumps in turn: the JW2SN relay switches its three phases between them.
| Pump | Marking | Rating plate | When connected |
|---|---|---|---|
| circulation with heater, ours | 9001.230.206 (genuine BSH spare part 12019637, also 1BS3610-6AA) | not copied yet | JW2SN relay off |
| drain, which we do not need | C00297919 | 3 phases, AC, 54 V, 55 Hz, 50 W, 0.6 A | JW2SN relay on |
The original firmware also confirms that the relay off means our pump: it has three sets of motor settings, and before a start it decides whether to switch the relay on. The set with the relay on gives a field frequency of command / 60, up to ≈ 58 Hz at a command of 3500, which matches the 55 Hz on the drain pump's rating plate. The set with the relay off has speeds of 1500…5000 rpm and three rotor pole pairs, a field of 75…250 Hz: that is our pump. So our firmware never switches the JW2SN on, and the module always runs the pump with the heater.
Field-oriented motor control
The original firmware runs the pump with field-oriented control (FOC): it keeps measuring the phase currents and from them works out where the rotor is and how fast it turns. There is no rotor position sensor. We worked out how this is done for our pump:
- Current is measured in two phases only, U and V. Each phase's shunt voltage goes through one of the microcontroller's built-in op-amps (×4) to its own ADC. A timer triggers the measurement roughly in the middle of the time the low-side switches are on, when the phase current is actually flowing through the shunt. The W shunt goes only to a protection comparator (PB11 has no ADC channel), and the firmware computes the third phase current as minus the sum of the other two.
- Then comes the usual FOC chain: the currents are converted into the rotor's frame of reference, two regulators hold the required currents, the result is converted back into three phases, divided by the DC bus voltage and applied through space-vector PWM.
- The rotor position comes from an observer: it compares the measured current with what a model of the winding predicts, estimates from the difference the voltage the rotor induces in the windings, and from that the angle.
- Start-up: the rotor is lined up with a current of ≈ 0.42 A for 0.3 s, then accelerated for about a second at the same current without estimating the position, and only then is control handed over to the observer.
- Loss of synchronism: if the rotor turns the wrong way, or runs slower than half the set speed for more than 100 cycles in a row, the firmware decides it has fallen behind the field.
The control cycle runs about 5,000 times a second per motor. Which motor parameters this needs, which of them we found in the original firmware, and how to measure them for an unknown motor is in part three. For now our own firmware runs the pump more simply, "blind": it applies a rotating field without checking that the rotor keeps up (part three).
Temperature sensors
The firmware has two tables that convert a 12-bit ADC reading (0–4095) into degrees, both from 0 to 125 °C. These are thermistors (NTC), and both sit on the heater itself: the sensor's three wires arrive at connector X13 (heater temperature sensor). Pin 34 uses table 1 and pin 26 table 2: we checked this with our own firmware (part three).
| °C | Table 1, ADC (pin 34) | Table 2, ADC (pin 26) |
|---|---|---|
| 0 | 3147 | 3492 |
| 10 | 2810 | 3244 |
| 20 | 2439 | 2948 |
| 30 | 2062 | 2616 |
| 40 | 1702 | 2268 |
| 50 | 1378 | 1923 |
| 60 | 1101 | 1600 |
| 70 | 875 | 1317 |
| 82 | 661 | 1029 |
| 90 | 548 | 870 |
| 100 | 435 | 703 |
| 125 | 249 | 416 |
The hotter it gets, the lower the number: the thermistor is in the lower leg of the divider. Between the points the firmware most likely interpolates linearly. The 82 °C point instead of 80 comes straight from the firmware table. The original firmware treats a sensor as healthy if it reads between −10 and 95 °C; anything else is an open or a short. For our water heater this is a ready calibration table: it is the same board, so the table can be used as it is.
Which inputs the firmware reads
The registers only show a pin's mode, so we looked for the inputs in the code. Direct reads turned up on pins 67 (PA8), 47 (PB10), 82 (PD1), 83 (PD2) and a few others. A separate function reads pin 71 (PA12) as active-low, like a button or a switch. There are two pin interrupts: EXTI7 on pin 93 (PB7), most likely from something that pulses, and EXTI1 on pin 98 (PE1), the receive line from the panel, to catch the start of a byte.
We now understand pin 47 (PB10) better: it looks like the firmware uses it to check that the power module's driver supply chain has worked (driver supply). The rest, 67, 71, 82, 83 and 93, have nothing on the board holding their level, yet the firmware reads them. So most likely they lead to connectors, where dishwasher sensors sit that are not connected now. We leave them alone.
The firmware picks some pins at run time from tables, so this list may be incomplete.
How the board talks to the panel: the D-Bus
What D-Bus is. It is the name BSH (Bosch, Siemens, Neff, Gaggenau) uses for the internal bus in its home appliances. Over it the control board, the button panel and the Wi-Fi module send each other commands: "program selected", "start the pump", "time remaining". Physically it is three wires: ground, a supply for the nodes and a single data wire. On the data wire all nodes take turns sending bytes, just like an ordinary serial port. Not to be confused with D-Bus on Linux, which is something else entirely: messaging between programs on the same computer. How D-Bus compares with other buses such as I²C, RS-485, CAN or LIN is in the overview of communication protocols.
The hn/bsh-home-appliances project describes this bus for dishwashers of the same family. What in that description matches our firmware:
| What | hn's description | In our firmware |
|---|---|---|
| wires | three: GND, DATA, VBUS; in dishwashers VBUS ≈ 13.5 V, DATA is 5 V logic | USART1 on pins 97 (PE0) and 98 (PE1); where they go is still to be found |
| speed and format | 9600 baud, 8N1 | yes: divider 7500 at 72 MHz, no parity |
| frame | length, address and subsystem, command (2 bytes), data, CRC16 (XMODEM) | not analysed |
| acknowledgement | one byte right after an addressed frame | not analysed |
Node addresses according to hn: 1 the washing control unit (our board), 2 the control panel, 0x6 the floor time projector, 0xA/0xB internet modules. Known commands: 17.10-10 xx selects wash program xx, 17.10-00 the options, 24.20-06 the rinse aid and salt indicators, 25.20-08 the remaining time.
According to the same description our board is the dishwasher's main unit: the panel only sends it the selected program and options, while the "run the pump" command is generated by the board's own firmware as it runs a wash program. That is why we cannot drive the pump over the D-Bus and keep the original firmware: it would wait for the water, door and valve sensors. We went another way, our own firmware (part three). Later on, the D-Bus can serve as a ready-made serial port on a connector: through it the board running our firmware will be able to talk to our own controller.
⚠ All of this is described for hn's boards; we have not recorded the real exchange between the panel and our board.
The board map
Everything we found, in one picture: where each node is on the board, which microcontroller pin it leads to and what was measured there. Below is the same as a table, and after that each node on its own, with photos and probe points.
Points found
| MCU pin | What | Where on the board | What was measured |
|---|---|---|---|
| 39–44 (PE8–PE13) | power module inputs, timer TIM1 | through 102 (1 kΩ) to FSB50550AB pins 4, 5, 9, 10, 14, 15 | our stage 3 test (our firmware, 20 kHz PWM): each input has its own pin; at 50 % PWM the sum of the voltages on a phase's high-side and low-side inputs is ≈ 3.0 V instead of 3.3 V, so the 2 µs dead time is there |
| 35 (PB0), 52 (PB13), 48 (PB11) | phase shunts U, V, W → TIM1 protection comparators; U and V also via op-amps to the ADC | through 18B (1.5 kΩ) to R820 pairs; plus 01C (10 kΩ) to 3.3 V | shunt 0.41 Ω (two R820 in parallel); ≈ 0.43 V on the pin with no current; protection trips at ≈ 2.9 A [calculated] |
| 91 (PB5), 68 (PA9) | ALZ51B12T heater relays, left and right | through 472 (4.7 kΩ) to the 1GW transistors (points 1 and 6) | 0.70 and 0.71 V at the transistor input when the pin is "1" |
| 60 (PD13) | JW2SN relay: off is our pump, on is the drain pump | through 472 (4.7 kΩ) to a transistor; contacts to connector X5_1 | 0.756 V at the transistor input when the pin is "1" |
| 92 (PB6) | pulses for the charge pump that turns on the power module's driver supply (VCC) | through 472 (4.7 kΩ) to a capacitor and the "A7W" diode pair; then the "1GW" and "5BW" transistors | module VCC: 0 V without pulses, 13.48 V with 1 kHz pulses |
| 47 (PB10) | apparently feedback from the VCC chain | not traced | 0 while the pulses run; briefly 1 when they stop |
| 7 (PC13) | keeps the board powered from mains | through a diode and 473 (47 kΩ) to the "1GW 37" transistor by the power supply | at "1" the supply holds (VDDA 3373–3375 mV on mains); without it the board dies in ≈ 1 s |
| 34 (PC5), 26 (PA3) | two temperature sensors on the heater, tables 1 and 2 | X13.3 and X13.5 through 473 (47 kΩ); the middle X13.4 is ground | 22.7 and 22.6 °C in the room; 4091–4093 of 4095 with no sensor |
| 12 (PF0), 13 (PF1) | 8 MHz resonator | 80.K ceramic resonator, 1 MΩ (105) between the pins | our firmware runs from it at 72 MHz, and the dead time comes out as calculated |
| 63–65 (PC6–PC8), 78–80 (PC10–PC12) | TIM8 outputs for the missing second inverter → display and buttons | through 102 (1 kΩ) to the empty second power module footprint | the display answers at address 0x3C with no transfer errors |
| 76 (PA14), 72 (PA13), 14 (NRST) | SWD: SWCLK, SWDIO, reset | pads X20.1, X20.2, X20.3 (NRST through 220 Ω) | we read and write the firmware through them |
| 90 (PB4) | free | pad X20.4 | we found no access to it in the original firmware's code |
| — | ground and 3.3 V | pads X20.5 and X20.6 | 3.26 V from the ST-Link; 3.35 V on mains with the original firmware |
| 97 (PE0), 98 (PE1) | D-Bus (USART1) | not found yet | — |
| — | the power module's DC bus | FSB50550AB pin 17, the big capacitor | 296–300 V on mains |
Relays
The board has three relays with 12 V coils: two 16 A Panasonic ALZ51B12T switch the heater, and one 5 A JW2SN-B-DC12V switches the power module's phases between the two pumps. Each relay coil is switched by its own transistor, and the transistor by a microcontroller pin through a 472 (4.7 kΩ) resistor.
| Point | What it is | What was measured |
|---|---|---|
| 1 | the end of resistor 473 (47 kΩ) next to the left transistor | through a 472 resistor (4.7 kΩ; the meter shows 4.6 kΩ on the board) to pin 91 (PB5): the left heater relay |
| 6 | the end of resistor 473 next to the right transistor | through the same kind of 472 to pin 68 (PA9): the right heater relay |
The upper ALZ51B12T (left on the driver photo) is driven by pin 91, the lower one (right) by pin 68; the two switch the heater on together. The JW2SN relay is driven by pin 60, and its contacts switch the module's three phases between the pumps (connector X5_1).
The 1GW marking most likely means a BC847C NPN transistor (code 1G, W is the factory mark), but other parts use the same code too. The relay candidates the original firmware's code suggested (pins 10, 11, 61) were not confirmed.
Under the original firmware all three pins are in timer mode (PB5 TIM3_CH2, PA9 TIM2_CH3, PD13 TIM4_CH2): the coil is first pulled in with a full signal, then held with ≈ 16 kHz PWM at 70 % so it runs cooler. Our own firmware does the same (version 25, not yet written to the board; part three).
How to test the relays off mains. The ST-Link powers the board at 3.3 V; the coils need 12 V, so the relays will not click. With a multimeter we measure the transistor input, points 1 and 6 and the JW2SN transistor input, to ground: ≈ 0.7 V means the pin is driving "1" and the transistor is on. That is how we checked all three relays: 0.70 V, 0.71 V, and 0.756 V on the JW2SN (part three). No separate 12 V supply for the coils is needed for this.
Power module and shunts
Six switch inputs connect the FSB50550AB to the microcontroller, module pins 4, 5, 9, 10, 14, 15, plus pin 16 (Vts, the module temperature, to an analog input; we have not found that pin yet). The phase shunts sit next to the module.
- Area A: a column of 102 (1 kΩ) and 104 (100 kΩ) resistors by the module's control pins. The ends of the 102 resistors that do not go to the module lead to pins 39–44, each input through its own 1 kΩ: 4 IN(UH) → 40 PE9 (TIM1_CH1), 5 IN(UL) → 39 PE8 (TIM1_CH1N), 9 IN(VH) → 42 PE11 (TIM1_CH2), 10 IN(VL) → 41 PE10 (TIM1_CH2N), 14 IN(WH) → 44 PE13 (TIM1_CH3), 15 IN(WL) → 43 PE12 (TIM1_CH3N). So TIM1 drives the module: the high-side switches are on the main channels, the low-side ones on the complementary ones.
- Areas C1, C2, C3: three pairs of R820 resistors (0.82 Ω: the R is the decimal point). These are the three phase shunts, two in parallel each: we measured 0.41 Ω. Each pair goes through an 18B resistor (EIA-96 code, 1.5 kΩ; the meter shows 1.325 kΩ on the board): C1, pin 19 NU → 35 PB0; C2, pin 20 NV → 52 PB13; C3, pin 22 NW → 48 PB11. All three pins are comparator inputs that shut TIM1 down on overcurrent; the TIM8 protection pins (24, 32, 53) do not lead to the shunts.
- Offset. Each of these three pins also has a 01C (10 kΩ) resistor to 3.3 V: ≈ 0.43 V on the pin with no current (the meter reads 0.4272 V), which is what the calculation for such a divider gives.
- Area D: the dot on the package, module pin 1. The numbering starts from it: 1–16 along the bottom row right to left (the module has no pins 6 and 11), 17–23 along the top row, also right to left.
The comparator does not see the shunt voltage itself but 10/11.5 of it plus 0.43 V. So the protection trips at ≈ 2.9 A [calculated], below the module's pulse limit (5 A for no more than 100 ms). How the original firmware sets this up, and how we repeated it, is in part three. The same shunts also feed the U and V phase currents to the ADC: pin 35 through op-amp OPAMP3, pin 52 through OPAMP4. Pin 48 (phase W) has no ADC channel, only a comparator input.
Module driver supply and keeping the board powered
Two pins without which the board does not work on mains were revealed not by continuity testing but by our firmware's failures: until it did the same as the original, the board did not work on mains.
- Pin 7 (PC13) keeps the board powered. As long as it is "1", the power supply runs; without it the board dies on mains in about a second. The pin leads through a diode and a 473 (47 kΩ) resistor to the "1GW 37" transistor by the power supply. How we tracked it down is in part three.
- Pin 92 (PB6) turns on the power module's driver supply (VCC, pins 3, 8, 13). A steady "1" will not do here: it takes pulses. Through a 472 (4.7 kΩ) resistor and a capacitor they reach a diode charge pump (the "A7W" part, two diodes in series), which turns on the "1GW" and "5BW" transistors that feed 13.5 V to the module. Without pulses VCC is 0 V and the module does not switch any of its transistors on; with 1 kHz pulses it is 13.48 V. The original firmware toggles PB6 in software, and on a fault turns it into an input and locks its configuration until a restart. Meanwhile it reads pin 47 (PB10), apparently to check that the chain has worked. The details, with photos and measurements, are in part three.
Heater temperature sensor
The heater sensor has three grey wires: 10 kΩ between the 1st and 2nd, 10 kΩ between the 2nd and 3rd. These are two thermistors sharing the middle wire. On the board the wires arrive at connector X13, pins 3, 4 and 5. The middle one, X13.4, goes to ground, so both thermistors have one end on ground and the other on an analog input of its own.
| Sensor wire | MCU pin | Resistor to pin | Firmware table |
|---|---|---|---|
| X13.3 | 34 (PC5) | 473 (47 kΩ; 46 kΩ measured on the board) | 1 |
| X13.4 (middle) | ground: 74 (VSS) | — | — |
| X13.5 | 26 (PA3) | 473 (47 kΩ; 46 kΩ measured on the board) | 2 |
With no sensor the input reads close to full scale, 4091–4093, so there is a resistor to 3.3 V somewhere on the board. We have not measured its value: the original firmware's tables already account for the divider, and with them our firmware shows the right degrees (part three).
Resonator
There is a clock source next to pins 12 and 13.
| What | Result |
|---|---|
| marking | 80.K |
| what it is | an 8 MHz ceramic resonator with built-in capacitors: 6 pads on the board but really 3 terminals |
| outer pins | pins 12 (PF0, oscillator input) and 13 (PF1, oscillator output) |
| between them | a 105 resistor, 1 MΩ (10 × 10⁵ Ω), which is the usual way to wire the oscillator |
| middle pin | the continuity test shows pin 21 (VREF+). On a resonator like this the middle pin normally goes to ground: it needs checking again against pins 20 (VSSA) and 74 (VSS) |
Our firmware runs from this resonator at 72 MHz (8 MHz × 9), as the original does. A ceramic resonator is less accurate than a crystal: its frequency can be off by about half a percent. That is fine for the serial port and the inverter PWM; it would not do for a real-time clock, but we do not need one.
Connectors
| What | Board connector | Pins | Wire colours |
|---|---|---|---|
| pump, three phases | X5_1, through the JW2SN relay | — | — |
| heater temperature sensor (3 wires) | X13 | 3, 4, 5 | all three grey |
We have not yet traced the heater and mains input connectors, or the pins carrying phases U, V, W (what is still unknown).
Free pins for a display and buttons
The original firmware sets up the six TIM8 outputs for a second inverter, but our board does not have that inverter: the 1 kΩ resistors are fitted, while the module footprint is empty. Nothing sits behind those resistors on our board, so using these pins takes nothing away from any sensor. We used them for a small I²C display with four buttons (part three):
| Display | Microcontroller pin | Where to solder |
|---|---|---|
| SCL | 63 (PC6) | the footprint hole behind the 1 kΩ resistor |
| SDA | 64 (PC7) | the same |
| K1 | 65 (PC8) | the same |
| K2 | 78 (PC10) | the same |
| K3 | 79 (PC11) | the same |
| K4 | 80 (PC12) | the same |
| VCC | 3.3 V | pad 6 of connector X20 |
| GND | ground | pad 5 of connector X20 |
A 1 kΩ resistor in the line bothers neither the buttons nor the display at ordinary I²C speed: the display answers at address 0x3C without a single transfer error. One more free pin is 90 (PB4) on pad 4 of connector X20: we found no access to it in the original firmware's code.
⚠ On mains, the board ground is at mains potential, and so are the display and the buttons. So on mains the display with its buttons runs only inside a closed insulated enclosure, and we do not touch the buttons.
Every pin: what the original firmware does with it and what is on the board
What the original firmware's code suggested
Before any tracing we searched the code for the pins the program switches. The search was static, so these were hints; here is what became of them:
| What the firmware does | Pins | What it turned out to be |
|---|---|---|
| reads two pins as inputs and, depending on them, sets three outputs | PF9, PF10, PD14 | neither the relays nor the driver supply; most likely recognising the board variant |
| an initial set of outputs right after start-up | PA11, PC9, PD10 to 1; PD8, PD9, PD11, PB15, PF6 to 0 | a safe state after power-on |
| a step-by-step sequence with pauses | PF6, PD3, PD4, PC13 | PC13 keeps the board powered; the rest is unknown |
| pins that are sometimes inputs, sometimes outputs | PD5, PD6 | most likely bit-banged I²C to the EEPROM |
| overcurrent protection comparator inputs | PB0, PB13, PB11 → TIM1; PA1, PA7, PB14 → TIM8 | the shunts are on the TIM1 trio; the TIM8 trio does not lead to the shunts |
| current op-amp outputs | PA2, PA6, PB1, PB12 | the amplified shunt signal goes to the ADC inside the chip; on the board these pins float |
Which pin belongs to which comparator and op-amp comes from ST's reference manual, not from measurement. It fits with all these pins being in analog mode on the live board.
Pin modes on the live board under the original firmware:
| Mode | Pins |
|---|---|
| output | 17 |
| analog input | 23 |
| alternate function (timers, ports, SWD) | 21 |
| plain input or unconnected | 26 |
| power and service pins (NRST, BOOT0, VBAT) | 13 |
All pins: the original firmware and what is on the board
Mark *: "floating" comes from the pull-up/pull-down test with the sensors disconnected (how we went about it). "Reads" means it was found in the original firmware's code. The firmware picks some pins at run time from tables, and a plain reading of the code misses such places, so "not configured" only means we found no access to the pin. Power pins and BOOT0 are not in the table.
| Pin | Port | Original firmware | On the board |
|---|---|---|---|
| 1 | PE2 | not configured | held by external circuitry (not traced) |
| 2 | PE3 | not configured | held by external circuitry (not traced) |
| 3 | PE4 | not configured | held by external circuitry (not traced) |
| 4 | PE5 | not configured | held by external circuitry (not traced) |
| 5 | PE6 | not configured | held by external circuitry (not traced) |
| 7 | PC13 | output (currently 1) | through a diode and 473 (47 kΩ) to the "1GW 37" transistor: keeps the board powered from mains |
| 8 | PC14 | not configured | held by external circuitry (not traced) |
| 9 | PC15 | not configured | held by external circuitry (not traced) |
| 10 | PF9 | output (currently 0); also reads it | held by external circuitry (not traced); most likely recognising the board variant |
| 11 | PF10 | output (currently 0); also reads it | held by external circuitry (not traced); most likely recognising the board variant |
| 12 | PF0 | clock oscillator (external resonator) | 80.K resonator, 8 MHz; 1 MΩ between 12 and 13 |
| 13 | PF1 | clock oscillator (external resonator) | 80.K resonator, 8 MHz; 1 MΩ between 12 and 13 |
| 14 | NRST | reset | pad X20.3 through 220 Ω |
| 15 | PC0 | analog input ADC12_IN6 | held by external circuitry (not traced) |
| 16 | PC1 | analog input ADC12_IN7 | held by external circuitry (not traced) |
| 17 | PC2 | reads it as an input | held by external circuitry (not traced) |
| 18 | PC3 | analog input ADC12_IN9 | held by external circuitry (not traced) |
| 19 | PF2 | analog input ADC12_IN10 | held by external circuitry (not traced) |
| 23 | PA0 | output (currently 1) | held by external circuitry (not traced) |
| 24 | PA1 | analog input ADC1_IN2; OPAMP1 and COMP1 input (TIM8 protection) | held by external circuitry (not traced); does not lead to the shunts |
| 25 | PA2 | analog input ADC1_IN3; OPAMP1 output → ADC | floating: nothing on the board holds the level* |
| 26 | PA3 | analog input ADC1_IN4 | heater temperature sensor, X13.5 through 47 kΩ; table 2 |
| 27 | PF4 | analog input ADC1_IN5 | held by external circuitry (not traced) |
| 29 | PA4 | analog input ADC2_IN1; also DAC1 channel 1 output | floating: nothing on the board holds the level* |
| 30 | PA5 | analog input ADC2_IN2; also DAC1 channel 2 output | held by external circuitry (not traced) |
| 31 | PA6 | analog input ADC2_IN3; OPAMP2 output → ADC | floating: nothing on the board holds the level* |
| 32 | PA7 | analog input ADC2_IN4; OPAMP2 and COMP2 input (TIM8 protection) | held by external circuitry (not traced); does not lead to the shunts |
| 33 | PC4 | analog input ADC2_IN5 | held by external circuitry (not traced) |
| 34 | PC5 | analog input ADC2_IN11 | heater temperature sensor, X13.3 through 47 kΩ; table 1 |
| 35 | PB0 | analog input ADC3_IN12; OPAMP3 and COMP4 input (TIM1 protection) | phase U shunt (C1, pin 19 NU) via 18B; 01C to 3.3 V; U current via OPAMP3 to the ADC |
| 36 | PB1 | analog input ADC3_IN1; OPAMP3 output → ADC | floating: nothing on the board holds the level* |
| 37 | PB2 | analog input ADC2_IN12 | held by external circuitry (not traced) |
| 38 | PE7 | analog input ADC3_IN13 | held by external circuitry (not traced) |
| 39 | PE8 | peripheral pin: TIM1_CH1N | through 1 kΩ to power module pin 5 IN(UL) |
| 40 | PE9 | peripheral pin: TIM1_CH1 | through 1 kΩ to power module pin 4 IN(UH) |
| 41 | PE10 | peripheral pin: TIM1_CH2N | through 1 kΩ to power module pin 10 IN(VL) |
| 42 | PE11 | peripheral pin: TIM1_CH2 | through 1 kΩ to power module pin 9 IN(VH) |
| 43 | PE12 | peripheral pin: TIM1_CH3N | through 1 kΩ to power module pin 15 IN(WL) |
| 44 | PE13 | peripheral pin: TIM1_CH3 | through 1 kΩ to power module pin 14 IN(WH) |
| 45 | PE14 | reads it as an input | held by external circuitry (not traced) |
| 46 | PE15 | analog input ADC4_IN2 | held by external circuitry (not traced) |
| 47 | PB10 | reads it as an input | floating*; apparently feedback from the module driver supply (not traced) |
| 48 | PB11 | COMP6 input (TIM1 protection); no ADC channel | phase W shunt (C3, pin 22 NW) via 18B; 01C to 3.3 V |
| 51 | PB12 | analog input ADC4_IN3; OPAMP4 output → ADC | floating: nothing on the board holds the level* |
| 52 | PB13 | analog input ADC3_IN5; OPAMP4 and COMP5 input (TIM1 protection) | phase V shunt (C2, pin 20 NV) via 18B; 01C to 3.3 V; V current via OPAMP4 to the ADC |
| 53 | PB14 | analog input ADC4_IN4; COMP3 input (TIM8 protection) | held by external circuitry (not traced); does not lead to the shunts |
| 54 | PB15 | output (currently 0); also reads it | floating: nothing on the board holds the level* |
| 55 | PD8 | output (currently 0) | floating: nothing on the board holds the level* |
| 56 | PD9 | output (currently 0) | held by external circuitry (not traced) |
| 57 | PD10 | output (currently 1) | held by external circuitry (not traced) |
| 58 | PD11 | output (currently 0) | floating: nothing on the board holds the level* |
| 59 | PD12 | not configured | held by external circuitry (not traced) |
| 60 | PD13 | peripheral pin: TIM4_CH2 | through 472 (4.7 kΩ) to the JW2SN relay transistor (pump changeover); 0.756 V at the transistor input at "1" |
| 61 | PD14 | output (currently 0); also reads it | held by external circuitry (not traced); most likely recognising the board variant |
| 62 | PD15 | peripheral pin: TIM4_CH4 | floating: nothing on the board holds the level* |
| 63 | PC6 | peripheral pin: TIM8_CH1 | through 1 kΩ to the empty second power module footprint, display: SCL |
| 64 | PC7 | peripheral pin: TIM8_CH2 | through 1 kΩ to the empty second power module footprint, display: SDA |
| 65 | PC8 | peripheral pin: TIM8_CH3 | through 1 kΩ to the empty second power module footprint, button K1 |
| 66 | PC9 | output (currently 1) | held by external circuitry (not traced) |
| 67 | PA8 | reads it as an input | floating: nothing on the board holds the level* |
| 68 | PA9 | peripheral pin: TIM2_CH3 | through 472 (4.7 kΩ) to the right heater relay transistor (point 6 on the driver photo); 0.71 V at "1" |
| 69 | PA10 | peripheral pin: TIM2_CH4 | floating: nothing on the board holds the level* |
| 70 | PA11 | output (currently 1) | held by external circuitry (not traced) |
| 71 | PA12 | reads it as an active-low input | floating: nothing on the board holds the level* |
| 72 | PA13 | peripheral pin: SWDIO | pad X20.2 |
| 73 | PF6 | output (currently 1); also reads it; later switched by the firmware's sequence | held by external circuitry (not traced) |
| 76 | PA14 | peripheral pin: SWCLK | pad X20.1 |
| 77 | PA15 | not configured | held by external circuitry (not traced) |
| 78 | PC10 | peripheral pin: TIM8_CH1N | through 1 kΩ to the empty second power module footprint, button K2 |
| 79 | PC11 | peripheral pin: TIM8_CH2N | through 1 kΩ to the empty second power module footprint, button K3 |
| 80 | PC12 | peripheral pin: TIM8_CH3N | through 1 kΩ to the empty second power module footprint, button K4 |
| 81 | PD0 | output (currently 0); also reads it | held by external circuitry (not traced) |
| 82 | PD1 | reads it as an input | floating: nothing on the board holds the level* |
| 83 | PD2 | reads it as an input | floating: nothing on the board holds the level* |
| 84 | PD3 | output (currently 1) | held by external circuitry (not traced) |
| 85 | PD4 | output (currently 1) | floating: nothing on the board holds the level* |
| 86 | PD5 | reads it as an input; sometimes an input, sometimes an output | held by external circuitry (not traced); most likely bit-banged I²C to the EEPROM |
| 87 | PD6 | sometimes an input, sometimes an output | held by external circuitry (not traced); most likely bit-banged I²C to the EEPROM |
| 88 | PD7 | output (currently 1) | held by external circuitry (not traced) |
| 89 | PB3 | not configured | held by external circuitry (not traced) |
| 90 | PB4 | not configured | pad X20.4; free |
| 91 | PB5 | peripheral pin: TIM3_CH2 | through 472 (4.7 kΩ) to the left heater relay transistor (point 1 on the driver photo); 0.70 V at "1" |
| 92 | PB6 | toggles it in software (pulses) | through 472 (4.7 kΩ) to the "A7W" charge pump that turns on the module driver VCC |
| 93 | PB7 | interrupt EXTI7 | floating: nothing on the board holds the level* |
| 95 | PB8 | not configured | held by external circuitry (not traced) |
| 96 | PB9 | not configured | held by external circuitry (not traced) |
| 97 | PE0 | peripheral pin: USART1_TX (D-Bus) | held by external circuitry (not traced) |
| 98 | PE1 | peripheral pin: USART1_RX (D-Bus); interrupt EXTI1 | held by external circuitry (not traced) |
What is still unknown
This was enough for our own firmware, which already clicks the relays, shows degrees and runs the pump. What remains unknown:
- connectors: which pins carry the power module's phases U, V, W, and where the heater and mains come in;
- the DC bus voltage divider: a chain of high-value resistors should run from the "+" of the big capacitor to an analog input; we have found neither the values nor the pin, and the original firmware divides by this voltage in its field-oriented control;
- SEN013DG (a chip that disconnects the mains voltage sensing resistors in standby; see part one): which pin its control input goes to;
- module temperature: which pin FSB50550AB pin 16 (Vts) goes to;
- D-Bus: which connector pins 97 and 98 go to and which parts are on the way; the VBUS voltage;
- mains zero-cross detector: whether there is one and on which pin;
- the 12 V switch: whether +12 V reaches the relay coils directly or through another transistor (candidates PF6, PD3, PD4); the coil resistance;
- pin 47 (PB10) and the other two leads of the "1GW 37" transistor behind pin 7: where they go;
- the resonator's middle pin: check it against ground once more;
- the resistor to 3.3 V on the temperature sensor inputs;
- pins 67, 71, 82, 83, 93, which the original firmware reads: which connectors they go to.
What use this is to us
What we learned, and what we took from it:
- From part one: no read protection, copy saved → the board can always be returned to its factory state (part one), so we can try our own things freely.
- CRC self-test → the original firmware cannot be patched, and without the dishwasher's sensors it will not run the pump, so our way is our own firmware (part three).
- PWM pins, frequency, dead time, comparator protection → our firmware sets up TIM1, the 2 µs dead time and the hardware overcurrent protection the same way (part three).
- PC13 keeps the board powered, PB6 pulses give module VCC → without them the board dies on mains and the module switches nothing on; we repeated both (keeping power, VCC).
- The motor set for our pump and the JW2SN relay → speeds 1500…5000 rpm, three pole pairs; we never switch the JW2SN on (stage 4).
- Heater rules and relay drive → the "water flows" current threshold, sensor limits, relay order and holding at 70 %, as in the original (heater, relays).
- NTC tables → degrees without our own calibration (stage 2).
- Field-oriented control of the pump → motor parameters and start-up order for the next step of our firmware (parameters).
- Free TIM8 pins → a display and buttons to see the firmware's state without a computer (display).
- D-Bus: 9600 8N1 → in future, a link between the board and our own controller.
Next
The map was enough to write our own firmware: it already clicks the relays, shows degrees and runs the pump on mains. What comes next is in part three: running the pump with water, porting field-oriented control from the original firmware, heating. We will fill in the map from what is still unknown as the items become needed, starting with the DC bus voltage divider for field-oriented control.
For anyone repeating this
Before continuity testing
- The board has been disconnected from mains for at least 10 minutes, and the ST-Link is disconnected too.
- With the multimeter on DC volts, check the big capacitor: it must read under 5 V. If it is higher, discharge it through a 2–10 kΩ 5 W resistor and check again.
- Meter ranges: continuity (beeper) and resistance on 2 kΩ and 20 kΩ. Many signals pass through a resistor of 100 Ω to 10 kΩ: the beeper stays silent while the meter shows the value. Write the number down. On the board the reading can be lower than the marked value because of parallel paths, so measure with both probe polarities.
- The microcontroller pins are thin, at 0.5 mm pitch. Tape a sewing needle to the probe. Touch the "knee" of the pin or the pad of a resistor next to it.
- If neither end of a resistor beeps straight to the microcontroller, the track goes through a via to the other side of the board: probe from that via.
Reading the live board's registers
The board is powered only by the ST-Link, the original firmware is running, and we read the registers "hot" (mode=HOTPLUG) without stopping it. Every command only reads; the output is hexadecimal words. Below are RCC, one port (GPIOE), TIM1, TIM8 and USART1; the other ports were read the same way at a 0x400 step:
STM32_Programmer_CLI -c port=SWD mode=HOTPLUG freq=100 -r32 0x40021000 0x20
STM32_Programmer_CLI -c port=SWD mode=HOTPLUG freq=100 -r32 0x48001000 0x28
STM32_Programmer_CLI -c port=SWD mode=HOTPLUG freq=100 -r32 0x40012C00 0x50
STM32_Programmer_CLI -c port=SWD mode=HOTPLUG freq=100 -r32 0x40013400 0x50
STM32_Programmer_CLI -c port=SWD mode=HOTPLUG freq=100 -r32 0x40013800 0x14
| Address | What is there |
|---|---|
0x40021000 | RCC, the clocks |
0x48000000…0x48001400 | GPIOA…GPIOF, the mode of every pin (0x400 step) |
0x40012C00, 0x40013400 | timers TIM1 and TIM8, the inverter PWM |
0x40013800 | USART1, configuration registers only, up to 0x10 |
0x4001001C…0x40010044 | comparators and op-amps |
0x40007400 | DAC |
What else can be read the same way to settle a question without a multimeter:
| What we read | Address | What we learn |
|---|---|---|
| ADC 1–4 | 0x50000000, …0100, …0400, …0500 | which channels the program samples and in what order |
| SYSCFG, EXTI | 0x40010000, 0x40010400 | which pin the interrupt comes from, on which edge |
| timers TIM2, TIM3, TIM4 | 0x40000000, …0400, …0800 | pulse capture or PWM, frequencies |
| DMA1, DMA2 | 0x40020000, 0x40020400 | where in memory the measurements go |
STM32_Programmer_CLI -c port=SWD mode=HOTPLUG freq=100 -r32 0x50000000 0x40
STM32_Programmer_CLI -c port=SWD mode=HOTPLUG freq=100 -r32 0x40010000 0x1C
STM32_Programmer_CLI -c port=SWD mode=HOTPLUG freq=100 -r32 0x40000000 0x34
⚠ We deliberately skip the serial port data registers (from 0x24 in USART1), the ADC data registers and the timer capture registers: reading them clears their flags, and the program on the board could lose a byte or a measurement.
Article changelog
- 2026-11-18 — the series was restructured from five parts into three. This part brings together the former part three (what the firmware does: chip peripherals, inverters, NTC, D-Bus, inputs) and part four (the board map and continuity testing); the firmware layout moved to part one. A new "board map" picture; one summary table of points found instead of seven step tables; the all-pins table updated (92 PB6 pulses for module VCC, 47 PB10 feedback, 7 PC13, NRST 14, SWD, display and buttons, shunts, relays, sensors); a short account of field-oriented control of the pump in the original firmware; "What use this is" and "Next" now follow our own firmware; the empty "not measured yet" tables replaced with a "What is still unknown" list; relays off mains are tested at the transistor input with the ST-Link rather than with a 12 V supply; preparation for continuity testing and register reading moved to an appendix.
- 2026-11-16 — corrected: pin 48 (PB11) has no ADC channel, only a comparator and op-amp input; the table wrongly said "ADC12_IN14". Pin 7 (PC13) keeps the board powered from mains.
- 2026-11-15 — "Every pin" section: all 87 pins from the registers, the original firmware's code, the pull-up/pull-down test and continuity tracing; the inputs the firmware reads (67, 71, 47, 82, 83, and 93 as an interrupt); the TIM8 outputs (63–65, 78–80) lead to the empty second-module footprint and go to the display and buttons; marked-up photo; interrupts and timers in "A second register read".
- 2026-11-15 — TIM1 drives the FSB50550AB, the TIM8 outputs lead to the empty second-module footprint; timers TIM2–TIM4 drive the relays; "Which inputs the firmware reads" section (direct reads, an active-low input, EXTI7 and EXTI1 interrupts).
- 2026-11-12 — the sections on working safely on mains and the start-up order moved to the part about our own firmware.
- 2026-11-12 — no series incandescent lamp.
- 2026-11-12 — "Board ground and mains" section: what happens to USB, how to check with a multimeter off mains, how we work without a USB isolator.
- 2026-11-12 — two pumps: ours, 9001.230.206 (BSH 12019637), and the drain pump C00297919 (54 V, 55 Hz, 50 W); with the JW2SN relay off, ours is connected. New start-up order: from the board itself, no separate power supplies.
- 2026-11-12 — relays: the heater on pins 91 (PB5) and 68 (PA9), the JW2SN on 60 (PD13), all through 4.7 kΩ and in timer mode (probably coil PWM).
- 2026-11-12 — everything found by continuity testing marked on the pin diagram (✓) and on the microcontroller and module photos (green, ✓); the phase shunts go to pins 35, 52, 48 through 1.5 kΩ (18B), so the protection is TIM1's too.
- 2026-11-12 — the power module inputs go to pins 39–44 through 1 kΩ: TIM1 drives the module.
- 2026-11-12 — clock source: an
80.Kresonator (most likely 8 MHz) on pins 12 and 13 with 1 MΩ between them; middle pin still being checked. - 2026-11-12 — every module pin labelled on its photo from the datasheet; pins 4, 5, 9, 10, 14, 15 and 16 run to the microcontroller.
- 2026-11-12 — photos with probe points by the relay drivers and the power module (turned the same way as the microcontroller); the FSB50550AB datasheet as a file.
- 2026-11-12 — heater temperature sensor (three grey wires): X13.3 → 47 kΩ → pin 34 (PC5), X13.5 → 47 kΩ → pin 26 (PA3), the middle X13.4 is ground.
- 2026-11-12 — photo of the microcontroller with every pin numbered; first measurements: two ALZ51B12T relays switch the heater, the JW2SN switches the power module outputs between the pump with the heater and the drain pump (connector X5_1), the temperature sensor is on connector X13, pins 3–5, with a 47 kΩ resistor from X13.3.
- 2026-11-12 — "What to measure first" section: the minimum for the first firmware (relays and temperature, no motor) and how to power the board without mains.
- 2026-11-11 — first draft of the board map: goals and limits, what is known from the live board and the firmware, the pin diagram, the testing order with empty result tables, the second register read.
- 2026-11-10 — first draft of the firmware analysis: firmware layout, bootloader, chip peripherals from the live board, two inverters, NTC tables, self-test, D-Bus, use and plan.