I emailed you a list of codes. It is an attachment. Hope you get it let me know if not.
On it you will find that the code twelve is a easily verifiable code as it indicates an open or short in the O2 sensor heater circuit. These are the two white wires on three wire sensors. It is a heater coil around the sensor to heat it. Lack of this heat causes the sensor to stay in open loop too long or maybe always.
Check with ohm meter across both wires. I don't know the ohm value but it takes about 1amp. E=IR says about 12 ohms. Check each of the wires to ground. You should have open circuit to the hundreds of thousands of ohms.
You can only get the heater with the sensor though.
Owner 24 bay BSC
Bosch Master, ASE master L1
26 years MB technician