<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: FXOS8700CQ Magnetometer Not Working Properly! in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FXOS8700CQ-Magnetometer-Not-Working-Properly/m-p/367361#M18955</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Amit Kumar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I played around with this sensor on my FRDM K64F board and had similar problems.&lt;/P&gt;&lt;P&gt;The problem was caused by the fact, that I did not put delays between different write operations to the configuration registers.&lt;/P&gt;&lt;P&gt;The datasheet states that you have to wait at least 1.6µs between a stop and a start condition.&lt;/P&gt;&lt;P&gt;Therefore my data was partly not written to the sensor and the sensor was missconfigured.&lt;/P&gt;&lt;P&gt;Therefore I think that your code will work if you put 2µs delays between your calls to &lt;SPAN style="font-family: 'Courier New', monospace;"&gt;GI2C2_WriteByteAddress8()&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, &lt;BR /&gt;&amp;nbsp;&amp;nbsp; iliketux&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 Aug 2014 16:28:50 GMT</pubDate>
    <dc:creator>iliketux</dc:creator>
    <dc:date>2014-08-27T16:28:50Z</dc:date>
    <item>
      <title>FXOS8700CQ Magnetometer Not Working Properly!</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FXOS8700CQ-Magnetometer-Not-Working-Properly/m-p/367360#M18954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I am using FXOS8700CQ ACC+ Mag with K60 custom made board. The accelerometer is fine but the magnetometer is not working properly. The value of magnetometer changes when I change the orientation but after placing it back to its initial state , the values doesn't recover. Attached is the value and the code snippet. I have made the code in Codewarrior 10.6 with PE. Please look into the matter and help me resolve the issue. The setup was tested on wooden table , Considering the external mag field should not effect much. After I did Power on Reset, the values returned to earlier state . I regenerated the issue multiple times.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000; font-size: 14pt; font-family: 'Courier New', monospace;"&gt;&lt;STRONG&gt;Main.c&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="western" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: 'Courier New', monospace;"&gt;&lt;STRONG&gt;#include&lt;/STRONG&gt; "FXOS8700CQ.h"&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: 'Courier New', monospace;"&gt;&lt;SPAN style="color: #005032;"&gt;uint8_t&lt;/SPAN&gt; adata[11];&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: 'Courier New', monospace;"&gt;&lt;SPAN style="color: #005032;"&gt;uint8_t&lt;/SPAN&gt; adata[13];&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt;&lt;SPAN style="color: #005032;"&gt;int16_t&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; ax, ay, az, mx, my, mz;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt;&lt;SPAN style="color: #7f0055;"&gt;&lt;STRONG&gt;float&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; accx, accy, accz, mag_vect ,magx, magy, magz;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt;&lt;SPAN style="color: #005032;"&gt;bool&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; flag = FALSE;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt;&lt;SPAN style="color: #7f0055;"&gt;&lt;STRONG&gt;#define&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; CTL_1_Standby 0x00 &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f;"&gt;// Standby mode&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt;&lt;SPAN style="color: #7f0055;"&gt;&lt;STRONG&gt;#define&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; CTL_1_Active_lownoise 0x1D &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f;"&gt;// LOw noise, 50Hz ODR, Active&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt;&lt;SPAN style="color: #7f0055;"&gt;&lt;STRONG&gt;#define&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; FOUR_G 0x01 &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f;"&gt;// 4G mode&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt;&lt;SPAN style="color: #7f0055;"&gt;&lt;STRONG&gt;#define&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; CTL_2_highres 0x10 &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f;"&gt;// high resolution&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="western" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt;&lt;SPAN style="color: #7f0055;"&gt;&lt;STRONG&gt;int&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;main&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #7f0055;"&gt;&lt;STRONG&gt;void&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #3f7f5f; font-size: 10pt; font-family: 'Courier New', monospace;"&gt;/*lint -restore Enable MISRA rule (6.3) checking. */&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: 'Courier New', monospace;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: 10pt; font-family: 'Courier New', monospace;"&gt;/* Write your local variable definition here */&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt;&lt;SPAN style="color: #3f7f5f;"&gt;/*** Processor Expert internal &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; text-decoration: underline;"&gt;initialization&lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f;"&gt;. DON'T REMOVE THIS CODE!!! ***/&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt;PE_low_level_init();&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt;&lt;SPAN style="color: #3f7f5f;"&gt;/*** End of Processor Expert internal &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; text-decoration: underline;"&gt;initialization&lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f;"&gt;. ***/&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt;AINT1 = AMINT1_Init(NULL);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;SPAN style="font-family: 'Courier New', monospace;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;GI2C2_WriteByteAddress8(FX_I2C_ADD, CTRL_REG1, CTL_1_Standby); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f;"&gt;// Standby for configuration&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;SPAN style="font-family: 'Courier New', monospace;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;GI2C2_WriteByteAddress8(FX_I2C_ADD, CTRL_REG2, CTL_2_highres); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f;"&gt;// high resolution &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;SPAN style="font-family: 'Courier New', monospace;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;GI2C2_WriteByteAddress8(FX_I2C_ADD, XYZ_DATA_CFG, FOUR_G); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f;"&gt;// 4G configuration enabled&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt;&lt;SPAN style="color: #7f0055;"&gt;&lt;STRONG&gt;int&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; magThreshold = 1000; &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f;"&gt;// 1000 counts --&amp;gt; 100.0uT&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt;&lt;SPAN style="color: #7f0055;"&gt;&lt;STRONG&gt;int&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; magThresholdHi = (magThreshold &amp;amp; 0XFF00) &amp;gt;&amp;gt; 8;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt;&lt;SPAN style="color: #7f0055;"&gt;&lt;STRONG&gt;int&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; magThresholdLo = (magThreshold &amp;amp; 0XFF);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;SPAN style="font-family: 'Courier New', monospace;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;GI2C2_WriteByteAddress8(FX_I2C_ADD, M_VECM_THS_MSB, 0x80 | magThresholdHi); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f;"&gt;// Setting the &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; text-decoration: underline;"&gt;mag&lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f;"&gt; threshold&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt;GI2C2_WriteByteAddress8(FX_I2C_ADD, M_VECM_THS_LSB, magThresholdLo);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;SPAN style="font-family: 'Courier New', monospace;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;GI2C2_WriteByteAddress8(FX_I2C_ADD, M_VECM_CNT, 0x01); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f;"&gt;// 20 &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; text-decoration: underline;"&gt;ms&lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; text-decoration: underline;"&gt;debounce&lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f;"&gt; time period = M_VECM_CN /ODR 08--&amp;gt;400Hz&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;SPAN style="font-family: 'Courier New', monospace;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;GI2C2_WriteByteAddress8(FX_I2C_ADD, M_VECM_CFG, 0x7A); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f;"&gt;// Enable magnetic Vector magnitude detection, INT2 enable &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;SPAN style="font-family: 'Courier New', monospace;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;GI2C2_WriteByteAddress8(FX_I2C_ADD, CTRL_REG3, 0x02); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f;"&gt;// Interrupt polarity set to high 02&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;SPAN style="font-family: 'Courier New', monospace;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;GI2C2_WriteByteAddress8(FX_I2C_ADD, CTRL_REG4, 0x01); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f;"&gt;// Interrupt for DR&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;SPAN style="font-family: 'Courier New', monospace;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;GI2C2_WriteByteAddress8(FX_I2C_ADD, CTRL_REG5, 0x01); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f;"&gt;// Interrupt for DR on intr1&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;SPAN style="font-family: 'Courier New', monospace;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;GI2C2_WriteByteAddress8(FX_I2C_ADD, M_CTRL_REG1, 0xDF); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f;"&gt;// Hybrid mode OS = 2, Auto &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; text-decoration: underline;"&gt;cal&lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; text-decoration: underline;"&gt;degausing&lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f;"&gt; --&amp;gt;DF&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;SPAN style="font-family: 'Courier New', monospace;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;GI2C2_WriteByteAddress8(FX_I2C_ADD, CTRL_REG1, 0x25); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f;"&gt;// Low noise, &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt;&lt;SPAN style="color: #7f0055;"&gt;&lt;STRONG&gt;for&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(;;) &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt;{&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #7f0055;"&gt;&lt;STRONG&gt;if&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(flag)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: 'Courier New', monospace;"&gt; {&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt;&lt;SPAN style="color: #000000;"&gt; ax = ((&lt;/SPAN&gt;&lt;SPAN style="color: #7f0055;"&gt;&lt;STRONG&gt;short&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)((adata[0]&amp;lt;&amp;lt;8) | adata[1])&amp;gt;&amp;gt;2);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt;&lt;SPAN style="color: #000000;"&gt; ay = ((&lt;/SPAN&gt;&lt;SPAN style="color: #7f0055;"&gt;&lt;STRONG&gt;short&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)((adata[2]&amp;lt;&amp;lt;8) | adata[3])&amp;gt;&amp;gt;2);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt;&lt;SPAN style="color: #000000;"&gt; az = ((&lt;/SPAN&gt;&lt;SPAN style="color: #7f0055;"&gt;&lt;STRONG&gt;short&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)((adata[4]&amp;lt;&amp;lt;8) | adata[5])&amp;gt;&amp;gt;2);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt;&lt;SPAN style="color: #000000;"&gt; mx = (&lt;/SPAN&gt;&lt;SPAN style="color: #005032;"&gt;uint16_t&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)((adata[6]&amp;lt;&amp;lt;8) | adata[7]);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt;&lt;SPAN style="color: #000000;"&gt; my = (&lt;/SPAN&gt;&lt;SPAN style="color: #005032;"&gt;uint16_t&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)((adata[8]&amp;lt;&amp;lt;8) | adata[9]);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt;&lt;SPAN style="color: #000000;"&gt; mz = (&lt;/SPAN&gt;&lt;SPAN style="color: #005032;"&gt;uint16_t&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)((adata[10]&amp;lt;&amp;lt;8) | adata[11]);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt;&lt;SPAN style="color: #000000;"&gt; magx = (&lt;/SPAN&gt;&lt;SPAN style="color: #7f0055;"&gt;&lt;STRONG&gt;float&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)mx/10; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt;&lt;SPAN style="color: #000000;"&gt; magy = (&lt;/SPAN&gt;&lt;SPAN style="color: #7f0055;"&gt;&lt;STRONG&gt;float&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)my/10; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt;&lt;SPAN style="color: #000000;"&gt; magz = (&lt;/SPAN&gt;&lt;SPAN style="color: #7f0055;"&gt;&lt;STRONG&gt;float&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)mz/10; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #642880;"&gt;&lt;STRONG&gt;printf&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff;"&gt;"%03.03f ,%03.03f ,%03.03f\n"&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;,magx, magy, magz);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: 'Courier New', monospace;"&gt; flag = FALSE;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: 'Courier New', monospace;"&gt; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt;}&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: 'Courier New', monospace;"&gt;}&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="western" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000; font-size: 14pt; font-family: 'Courier New', monospace;"&gt;&lt;STRONG&gt;Events.c&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt;&lt;SPAN style="color: #7f0055;"&gt;&lt;STRONG&gt;#define&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; FX_I2C_ADD (0x1F)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt;&lt;SPAN style="color: #7f0055;"&gt;&lt;STRONG&gt;#define&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; OUT_X_MSB 0x01&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt;&lt;SPAN style="color: #7f0055;"&gt;&lt;STRONG&gt;#define&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; OUT_X_LSB 0x02&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt;&lt;SPAN style="color: #7f0055;"&gt;&lt;STRONG&gt;#define&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; OUT_Y_MSB 0x03&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt;&lt;SPAN style="color: #7f0055;"&gt;&lt;STRONG&gt;#define&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; OUT_Y_LSB 0x04&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt;&lt;SPAN style="color: #7f0055;"&gt;&lt;STRONG&gt;#define&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; OUT_Z_MSB 0x05&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt;&lt;SPAN style="color: #7f0055;"&gt;&lt;STRONG&gt;#define&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; OUT_Z_LSB 0x06&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt;&lt;SPAN style="color: #7f0055;"&gt;&lt;STRONG&gt;#define&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; M_DR_STATUS 0x32&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt;&lt;SPAN style="color: #7f0055;"&gt;&lt;STRONG&gt;#define&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; M_OUT_X_MSB 0x33&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt;&lt;SPAN style="color: #7f0055;"&gt;&lt;STRONG&gt;#define&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; M_OUT_X_LSB 0x34&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt;&lt;SPAN style="color: #7f0055;"&gt;&lt;STRONG&gt;#define&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; M_OUT_Y_MSB 0x35&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt;&lt;SPAN style="color: #7f0055;"&gt;&lt;STRONG&gt;#define&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; M_OUT_Y_LSB 0x36&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt;&lt;SPAN style="color: #7f0055;"&gt;&lt;STRONG&gt;#define&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; M_OUT_Z_MSB 0x37&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt;&lt;SPAN style="color: #7f0055;"&gt;&lt;STRONG&gt;#define&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; M_OUT_Z_LSB 0x38&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt;&lt;SPAN style="color: #7f0055;"&gt;&lt;STRONG&gt;extern&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #005032;"&gt;bool&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; flag;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt;&lt;SPAN style="color: #7f0055;"&gt;&lt;STRONG&gt;extern&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #005032;"&gt;uint8_t&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; adata[13];&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="western" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt;&lt;SPAN style="color: #7f0055;"&gt;&lt;STRONG&gt;void&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;AMINT1_OnInterrupt&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #005032;"&gt;LDD_TUserData&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; *UserDataPtr)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: 'Courier New', monospace;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt; GI2C2_ReadByteAddress8(FX_I2C_ADD, OUT_X_MSB, &amp;amp;adata[0]);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt; GI2C2_ReadByteAddress8(FX_I2C_ADD, OUT_X_LSB, &amp;amp;adata[1]);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt; GI2C2_ReadByteAddress8(FX_I2C_ADD, OUT_Y_MSB, &amp;amp;adata[2]);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt; GI2C2_ReadByteAddress8(FX_I2C_ADD, OUT_Y_LSB, &amp;amp;adata[3]);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt; GI2C2_ReadByteAddress8(FX_I2C_ADD, OUT_Z_MSB, &amp;amp;adata[4]);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt; GI2C2_ReadByteAddress8(FX_I2C_ADD, OUT_Z_LSB, &amp;amp;adata[5]);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt; GI2C2_ReadByteAddress8(FX_I2C_ADD, M_OUT_X_MSB, &amp;amp;adata[6]);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt; GI2C2_ReadByteAddress8(FX_I2C_ADD, M_OUT_X_LSB, &amp;amp;adata[7]);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt; GI2C2_ReadByteAddress8(FX_I2C_ADD, M_OUT_Y_MSB, &amp;amp;adata[8]);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt; GI2C2_ReadByteAddress8(FX_I2C_ADD, M_OUT_Y_LSB, &amp;amp;adata[9]);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt; GI2C2_ReadByteAddress8(FX_I2C_ADD, M_OUT_Z_MSB, &amp;amp;adata[10]);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;SPAN style="font-size: 10pt; font-family: 'Courier New', monospace;"&gt; GI2C2_ReadByteAddress8(FX_I2C_ADD, M_OUT_Z_LSB, &amp;amp;adata[11]);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: 'Courier New', monospace;"&gt; flag = TRUE;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: 'Courier New', monospace;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-337627"&gt;FXOS8700CQ.h.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-337627"&gt;Magnetometer.csv.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2014 11:46:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/FXOS8700CQ-Magnetometer-Not-Working-Properly/m-p/367360#M18954</guid>
      <dc:creator>Amit_Kumar1</dc:creator>
      <dc:date>2014-08-19T11:46:11Z</dc:date>
    </item>
    <item>
      <title>Re: FXOS8700CQ Magnetometer Not Working Properly!</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FXOS8700CQ-Magnetometer-Not-Working-Properly/m-p/367361#M18955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Amit Kumar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I played around with this sensor on my FRDM K64F board and had similar problems.&lt;/P&gt;&lt;P&gt;The problem was caused by the fact, that I did not put delays between different write operations to the configuration registers.&lt;/P&gt;&lt;P&gt;The datasheet states that you have to wait at least 1.6µs between a stop and a start condition.&lt;/P&gt;&lt;P&gt;Therefore my data was partly not written to the sensor and the sensor was missconfigured.&lt;/P&gt;&lt;P&gt;Therefore I think that your code will work if you put 2µs delays between your calls to &lt;SPAN style="font-family: 'Courier New', monospace;"&gt;GI2C2_WriteByteAddress8()&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, &lt;BR /&gt;&amp;nbsp;&amp;nbsp; iliketux&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2014 16:28:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/FXOS8700CQ-Magnetometer-Not-Working-Properly/m-p/367361#M18955</guid>
      <dc:creator>iliketux</dc:creator>
      <dc:date>2014-08-27T16:28:50Z</dc:date>
    </item>
    <item>
      <title>Re: FXOS8700CQ Magnetometer Not Working Properly!</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FXOS8700CQ-Magnetometer-Not-Working-Properly/m-p/367362#M18956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tobias&lt;/P&gt;&lt;P&gt;Thanks for the reply. I tried with the delay also, but the result was the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Amit Kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2014 04:07:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/FXOS8700CQ-Magnetometer-Not-Working-Properly/m-p/367362#M18956</guid>
      <dc:creator>Amit_Kumar1</dc:creator>
      <dc:date>2014-08-28T04:07:40Z</dc:date>
    </item>
    <item>
      <title>Re: FXOS8700CQ Magnetometer Not Working Properly!</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FXOS8700CQ-Magnetometer-Not-Working-Properly/m-p/367363#M18957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Amit Kumar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried to reproduce the behavior of the sensor and found a hot candidate for the culprit.&lt;/P&gt;&lt;P&gt;I think that the continuous autocalibration changes the offsets which accumulate over time (cf. chapter 10.17.1, table 196 first row in the datasheet).&lt;/P&gt;&lt;P&gt;I've set the &lt;EM&gt;M_CTRL_REG1&lt;/EM&gt; to &lt;EM&gt;0x5F&lt;/EM&gt; instead of &lt;EM&gt;0xDF&lt;/EM&gt; and it seemed to work fine then.&lt;/P&gt;&lt;P&gt;To be sure that you get rid of all unwanted offsets you can reboot the sensor by writing &lt;EM&gt;0x40&lt;/EM&gt; to &lt;EM&gt;CTRL_REG2&lt;/EM&gt; and wait for 1ms before you configure it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Tobi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2014 22:06:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/FXOS8700CQ-Magnetometer-Not-Working-Properly/m-p/367363#M18957</guid>
      <dc:creator>iliketux</dc:creator>
      <dc:date>2014-08-28T22:06:06Z</dc:date>
    </item>
    <item>
      <title>Re: FXOS8700CQ Magnetometer Not Working Properly!</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FXOS8700CQ-Magnetometer-Not-Working-Properly/m-p/367364#M18958</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tobias&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for quick and correct reply. It worked. I Did those settings to get rid of soft iron/hard iron errors. Any ways now atleast it is working. Thanks a lot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Amit Kumar &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Aug 2014 05:12:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/FXOS8700CQ-Magnetometer-Not-Working-Properly/m-p/367364#M18958</guid>
      <dc:creator>Amit_Kumar1</dc:creator>
      <dc:date>2014-08-29T05:12:24Z</dc:date>
    </item>
  </channel>
</rss>

