edit/tl;dr: The set/reset strap driver is an H-bridge circuit to deliver 10 mA of DC current to a strap which temporarily produces about a 1.1 gauss magnetic field offset. A change in the measurement before and during this field offset can be used to confirm that the device is functional, as a manufacturing test. However, these straps are also said to work for degaussing, but I have still not found clear instructions how to use them to degauss the sensor. Usually degaussing of macroscopic objects is done with an AC field that slowly decreases in amplitude.
When I hear degaussing I think of the application of an oscillating (AC) external magnetic field to a magnetized ferromagnetic material, then slowly ramping the amplitude of the oscillations field down to zero to remove almost all residual magnetization. Automatic (and manual) degaussing magnetic heads on tape recorders and magnetic shielding on CRTs are some examples.
However, a quick read of that article shows that the term degaussing also applies to the cancellation of the external fields resulting from magnetization of materials through the careful use of one or more coils excited by a DC current to "cancel" the field within some finite region. The example there is large coils on ships to cancel the fields resulting from the ferromagnetic hulls producing external fields excited by the Earth's magnetic field.
In the cases of the HMC5883L 3-Axis Digital Compass chip - or any similar type of Magnetoresistive sensor, how does the degaussing feature work? Are there actually coils inside the chip that are intended to carry DC currents to cancel some fields? How is this done - how are the currents correctly calculated and applied?
Here is HMC5883L_3-Axis_Digital_Compass_IC.pdf where it says:
Feature: Built-In Strap Drive Circuits
Benefit: Set/Reset and Offset Strap Drivers for Degaussing, Self Test, and Offset Compensation
above: screenshot from the datasheet. There are separate OFFSET STRAP DRIVER
and SET/RESET STRAP DRIVER
circuit blocks, and they appear to be separately controllable.