A magnetic device includes a semiconductor wafer, a spiral winding, and a magnetic core. The spiral winding forms a plurality of turns and is disposed in a channel of the semiconductor wafer. The magnetic core is disposed at least partially in the channel of the semiconductor wafer and at least partially surrounds the plurality of turns. A width of the spiral winding optionally varies such that a respective width of an edge turn is smaller than a respective width of a middle turn. The channel is formed, for example, by a method including (1) patterning a resist layer on the semiconductor wafer using a mask including angularly extending compensation features, and (2) anistropically etching the semiconductor wafer to form the channel.
 This invention was made with government support under contract number DE-AR0000123 awarded by the Department of Energy Advanced Research Project Agency. The government has certain rights in the invention.