I'm using a MAG3110 on a board quite similar to the TI Sensortag, a cc2541 controlling the MAG via I2C, but without all other sensors (just the mag).
I would like to use the MAG only once in a while (say, every 10 minutes for a few seconds, to save battery), so I'm using the 20miliamp pins of the TI to control the power in and out of the MAG.
I manage to get results from the MAG up to the first shut down, after that it seems that the measurement stops. When I'm giving a continuous "1" signal through that pin I keep getting measurements.
What could be the problem?
Thank you very much in advance,
Is the IIC bus still active while you "turn off" the MAG3110?
Please take a look at the datasheet page 6, table 4, Absolute Maximum Ratings:
Input voltage on any control pin (SCL, SDA) --> -0.3 to VDDIO + 0.3
If the IIC bus is still active while VDDIO is a zero logic, unknown behavior might occur or even worst, permanent damage. Instead of suppress the supply voltage, I would rather recommend you to set the device status to STANDBY mode by setting the SYSMOD register (0x08) to 0x00.
In STANDBY mode the MAG3110 would only draw ~2uA.
Hope it helps!