Semiconductor devices containing a MOSFET and an on-chip current sensor in
the form of a magnetic resistive element are described. The magnetic
resistive element (MRE) is proximate the MOSFET in the semiconductor
device. The current flowing through the MOSFET generates a magnetic field
that is detected by the MRE. The MRE comprises a metal film that is
placed proximate the MOSFET during the normal fabrication processes,
thereby adding little to the manufacturing complexity or cost. Using the
MRE adds an accurate, effective, and cheap method to measure currents in
MOSFET devices.