A gatedriver circuit arranged to generate an electric control signal output for controlling switching of a power electronic switch, the gatedriver circuit comprising - a transformer arranged to receive an electric control signal at its electric input (E_I) and to transform the electric control signal to the electric control signal output at its electric output (E_O), wherein the transformer provides a galvanic separation between its electric input (E_I) and output (E_O), and characterized in that the transformer comprises - separate first and second cores of magnetically conductive material, wherein each of the first and second cores are shaped to form respective closed loops, - a first electrical conductor forming the electric input, wherein the first electrical conductor has at least one winding arranged around a part of the first core and at least one winding arranged around a part of the second core, - a second electrical conductor forming the electric output, wherein the second electrical conductor has at least one winding arranged around a part of the first core and at least one winding arranged around a part of the second core, wherein the first core is positioned in relation to the second core so as to allow mutual magnetic interaction between the first and second cores, and wherein the windings of the first and second electrical conductors around the first core have the same winding direction, and wherein the windings of the first and second electrical conductors around the second core have opposite winding direction of the windings of the first and second electrical conductors around the first core, so as to counteract electric influence induced by a common magnetic field through the closed loops of the first and second cores. - a transformer arranged to receive an electric control signal at its electric input (E_I) and to transform the electric control signal to the electric control signal output at its electric output (E_O), wherein the transformer provides a galvanic separation between its electric input (E_I) and output (E_O), and characterized in that the transformer comprises - separate first and second cores of magnetically conductive material, wherein each of the first and second cores are shaped to form respective closed loops, - a first electrical conductor forming the electric input, wherein the first electrical conductor has at least one winding arranged around a part of the first core and at least one winding arranged around a part of the second core, - a second electrical conductor forming the electric output, wherein the second electrical conductor has at least one winding arranged around a part of the first core and at least one winding arranged around a part of the second core, wherein the first core is positioned in relation to the second core so as to allow mutual magnetic interaction between the first and second cores, and wherein the windings of the first and second electrical conductors around the first core have the same winding direction, and wherein the windings of the first and second electrical conductors around the second core have opposite winding direction of the windings of the first and second electrical conductors around the first core, so as to counteract electric influence induced by a common magnetic field through the closed loops of the first and second cores. - separate first and second cores of magnetically conductive material, wherein each of the first and second cores are shaped to form respective closed loops, - a first electrical conductor forming the electric input, wherein the first electrical conductor has at least one winding arranged around a part of the first core and at least one winding arranged around a part of the second core, - a second electrical conductor forming the electric output, wherein the second electrical conductor has at least one winding arranged around a part of the first core and at least one winding arranged around a part of the second core,