Hello Rens,
Please be aware about the M_CTRL_REG2. You do not need to set the auto-increment mode due to you are using the magnetometer mode only.
You may use the following configuration in order to initialize the FXOS8700QC:
I2C_WriteRegister(FXOS8700CQ_I2C_ADDRESS, CTRL_REG2, 0x40); // Reset all registers to POR values, Standby mode
Delay(); // ~1ms delay
I2C_WriteRegister(FXOS8700CQ_I2C_ADDRESS, XYZ_DATA_CFG_REG, 0x00); // +/-2g range with 0.244mg/LSB
I2C_WriteRegister(FXOS8700CQ_I2C_ADDRESS, M_CTRL_REG1, 0x1D); // Magnetometer mode, max OSR
I2C_WriteRegister(FXOS8700CQ_I2C_ADDRESS, CTRL_REG2, 0x02); // High Resolution mode
I2C_WriteRegister(FXOS8700CQ_I2C_ADDRESS, CTRL_REG1, 0x15); // ODR = 200Hz, Reduced noise, Active mode
Please let me know if this configuration helps.
In case it is useful for you, you may refer to the FX0S87OOCQ - Bare metal example project.
https://community.freescale.com/docs/DOC-101073
I hope this information will be useful for you.
If I misunderstood your question or you still have concerns, feel free to let me know. I will be glad to help.
Have a great day.
David Diaz.
Note: If this post answers your question, please click the Correct Answer button. Thank you!