A method includes immersing a wafer in an electrolyte including a plurality of compounds having elements of a thermally stable soft magnetic material. The method also includes applying a combined stepped and pulsed current to the wafer when the wafer is immersed in an electrolyte. The wafer is removed from the electrolyte when a layer of the thermally stable soft magnetic material is formed on the wafer.