A magnetic field H1 in the hard-axis direction and a magnetic field H2 in
the easy-axis direction are caused to simultaneously act on a MTJ element
having an ideal asteroid curve, thereby reversing the magnetizing
direction of the storing layer of the MTJ element. When the actual
asteroid curve shifts in the hard-axis direction by Ho, a corrected
synthesized magnetic field ({right arrow over (H1)}+{right arrow over
(H2)}+{right arrow over (Ho)}) is generated in write operation to
reliably reverse the magnetizing direction. The corrected synthesized
magnetic field can easily be generated by individually controlling a
write word/bit line current on the basis of programmed setting data.