<?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>SensorsのトピックRe: FXOS8700CQ Motion Detection and Interrupts</title>
    <link>https://community.nxp.com/t5/Sensors/FXOS8700CQ-Motion-Detection-and-Interrupts/m-p/435316#M2129</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Anthony, I adjusted your code to my needs and it works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One of the problems that I was having is that there is an error in KDS 3.0 Processor Expert. The pin FXOS8700CQ_INT1 doesn't correspond to the one that is connected to de chip (PTC6).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_0.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/51899iCAA34C3A9B126740/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_0.png" alt="pastedImage_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Nov 2015 17:19:49 GMT</pubDate>
    <dc:creator>alejandrovelez</dc:creator>
    <dc:date>2015-11-04T17:19:49Z</dc:date>
    <item>
      <title>FXOS8700CQ Motion Detection and Interrupts</title>
      <link>https://community.nxp.com/t5/Sensors/FXOS8700CQ-Motion-Detection-and-Interrupts/m-p/435312#M2125</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to configure the FXOS8700CQ sensor with motion detection and interrupt in one of the two interrupt pins. So far I tried to do an example from the application note AN4070 made for a MMA8451 Sensor changing the register number for the FXOS8700CQ ones, but I still don't get the interrupt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I follow the steps:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Example Steps for Configuring Motion Detection&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;X or Y &amp;gt; 3g using MFF Function 4g, 100 Hz ODR, Normal Mode&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Step 1:&lt;/STRONG&gt; Put the device into Standby Mode: Register 0x2A CTRL_REG1&lt;/P&gt;&lt;P&gt;IIC_RegWrite(0x2A, 0x18); //Set the device in 100 Hz ODR, Standby&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Step 2:&lt;/STRONG&gt; Set Configuration Register for Motion Detection by setting the “OR” condition OAE = 1, enabling&lt;/P&gt;&lt;P&gt;X, Y, and the latch&lt;/P&gt;&lt;P&gt;IIC_RegWrite(0x15, 0xD8)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Step 3:&lt;/STRONG&gt; Threshold Setting Value for the Motion detection of &amp;gt; 3g //&lt;SPAN style="color: #7ed529;"&gt;(I tried with less Threshold)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Note: The step count is 0.063g/ count&lt;/P&gt;&lt;P&gt;• 3g/0.063g = 47.6; //Round up to 48&lt;/P&gt;&lt;P&gt;IIC_RegWrite(0x17, 0x30)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Step 4:&lt;/STRONG&gt; Set the debounce counter to eliminate false readings for 100 Hz sample rate with a requirement&lt;/P&gt;&lt;P&gt;of 100 ms timer.&lt;/P&gt;&lt;P&gt;Note: 100 ms/10 ms (steps) = 10 counts&lt;/P&gt;&lt;P&gt;IIC_RegWrite(0x18, 0x0A);&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Step 5:&lt;/STRONG&gt; Enable Motion/Freefall Interrupt Function in the System (CTRL_REG4)&lt;/P&gt;&lt;P&gt;IIC_RegWrite(0x2D, 0x04);&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Step 6:&lt;/STRONG&gt; Route the Motion/Freefall Interrupt Function to INT1 hardware pin (CTRL_REG5) //&lt;SPAN style="color: #7ed529;"&gt;(I tried with int1 and int2)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;IIC_RegWrite(0x2E, 0x04);&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Step 7:&lt;/STRONG&gt; Put the device in Active Mode&lt;/P&gt;&lt;P&gt;CTRL_REG1_Data = IIC_RegRead(0x2A);&lt;/P&gt;&lt;P&gt;CTRL_REG1_Data| = 0x01;&lt;/P&gt;&lt;P&gt;IIC_RegWrite(CTRL_REG1_Data);&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Step 8:&lt;/STRONG&gt; Write Interrupt Service Routine Reading the System Interrupt Status and the Motion/Freefall&lt;/P&gt;&lt;P&gt;Status&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did exactly, but with the correct register numbers for the FXOS8700CQ sensor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using a FRDM-K64F with its embedded accelerometer and Processor Expert for the I2C communication. The pins are correctly configured and the I2C communication works good but I don't get an interrupt when I move it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there something that I'm missing?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2026 20:59:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Sensors/FXOS8700CQ-Motion-Detection-and-Interrupts/m-p/435312#M2125</guid>
      <dc:creator>alejandrovelez</dc:creator>
      <dc:date>2026-02-03T20:59:31Z</dc:date>
    </item>
    <item>
      <title>Re: FXOS8700CQ Motion Detection and Interrupts</title>
      <link>https://community.nxp.com/t5/Sensors/FXOS8700CQ-Motion-Detection-and-Interrupts/m-p/435313#M2126</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alejandro,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For motion detection, I advise you to use the Acceleration Vector-Magnetitude detection feature inluded in the &lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;FXOS8700CQ device.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="VECM.PNG"&gt;&lt;IMG alt="VECM.PNG" src="https://community.nxp.com/t5/image/serverpage/image-id/25543iA2B32122984F2C08/image-size/large?v=v2&amp;amp;px=999" title="VECM.PNG" /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Here a code sample for integration :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="_jivemacro_uid_14460254449542430 jive_macro_code jive_text_macro" data-renderedposition="258_8_1232_1328" jivemacro_uid="_14460254449542430"&gt;&lt;P&gt;////////////////////////////////////////////////////////////////////////////////&lt;/P&gt;&lt;P&gt;//!&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Defines&lt;/P&gt;&lt;P&gt;////////////////////////////////////////////////////////////////////////////////&lt;/P&gt;&lt;P&gt;// Cfg register&lt;/P&gt;&lt;P&gt;#define FXOS8700_WHO_AM_I 0x0D&lt;/P&gt;&lt;P&gt;#define FXOS8700_CTRL_REG1 0x2A&lt;/P&gt;&lt;P&gt;#define FXOS8700_CTRL_REG2 0x2B&lt;/P&gt;&lt;P&gt;#define FXOS8700_CTRL_REG3 0x2C&lt;/P&gt;&lt;P&gt;#define FXOS8700_CTRL_REG4 0x2D&lt;/P&gt;&lt;P&gt;#define FXOS8700_CTRL_REG5 0x2E&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#define FXOS8700_M_CTRL_REG1 0x5B&lt;/P&gt;&lt;P&gt;#define FXOS8700_M_CTRL_REG2 0x5C&lt;/P&gt;&lt;P&gt;#define FXOS8700_M_CTRL_REG3 0x5D&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#define FXOS8700_XYZ_DATA_CFG 0x0E&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Interupts&lt;/P&gt;&lt;P&gt;#define FXOS8700_A_VECM_CFG&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x5F&lt;/P&gt;&lt;P&gt;#define FXOS8700_A_VECM_THS_MSB&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x60&lt;/P&gt;&lt;P&gt;#define FXOS8700_A_VECM_THS_LSB&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x61&lt;/P&gt;&lt;P&gt;#define FXOS8700_ASLP_COUNT 0x29&lt;/P&gt;&lt;P&gt;#define FXOS8700_TRIG_CFG 0x0A&lt;/P&gt;&lt;P&gt;// Data register&lt;/P&gt;&lt;P&gt;#define FXOS8700_M_OUT_X 0x33&lt;/P&gt;&lt;P&gt;#define FXOS8700_OUT_X 0x01&lt;/P&gt;&lt;P&gt;#define FXOS8700_TEMP 0x51&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#define FXOS8700_WHO_AM_I_VALUE 0xC7&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;////////////////////////////////////////////////////////////////////////////////&lt;/P&gt;&lt;P&gt;//!&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Static members&lt;/P&gt;&lt;P&gt;////////////////////////////////////////////////////////////////////////////////&lt;/P&gt;&lt;P&gt;static bool _b_IsFXOS8700Init=FALSE;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;////////////////////////////////////////////////////////////////////////////////&lt;/P&gt;&lt;P&gt;//!&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Public functions&lt;/P&gt;&lt;P&gt;////////////////////////////////////////////////////////////////////////////////&lt;/P&gt;&lt;P&gt;bool bFXOS8700_Init()&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; bool __b_result = FALSE;&lt;/P&gt;&lt;P&gt;&amp;nbsp; uint8_t __u8_CmdResult = 0;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if(!_b_IsFXOS8700Init)&lt;/P&gt;&lt;P&gt;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; I2C_Init (NULL);&lt;/P&gt;&lt;P&gt;&amp;nbsp; if(_bFXOS8700_Write(FXOS8700_CTRL_REG1,0x00)) // Pass to standby mode for writable operations&lt;/P&gt;&lt;P&gt;&amp;nbsp; if(_bFXOS8700_Read(FXOS8700_WHO_AM_I,&amp;amp;__u8_CmdResult)) // Check device communication&lt;/P&gt;&lt;P&gt;&amp;nbsp; if(__u8_CmdResult== FXOS8700_WHO_AM_I_VALUE) // Check device ID&lt;/P&gt;&lt;P&gt;&amp;nbsp; if(_bFXOS8700_Write(FXOS8700_XYZ_DATA_CFG,0x02)) //±0.976 mg/LSB&lt;/P&gt;&lt;P&gt;&amp;nbsp; if(_bFXOS8700_Write(FXOS8700_M_CTRL_REG1,0x17))// Hybrid&lt;/P&gt;&lt;P&gt;&amp;nbsp; if(_bFXOS8700_Write(FXOS8700_M_CTRL_REG2,0x00))&lt;/P&gt;&lt;P&gt;&amp;nbsp; if(_bFXOS8700_Write(FXOS8700_M_CTRL_REG3,0x80))&lt;/P&gt;&lt;P&gt;&amp;nbsp; /* Sleep mode */&lt;/P&gt;&lt;P&gt;&amp;nbsp; if( _bFXOS8700_Write(FXOS8700_TRIG_CFG, 0x02))&lt;/P&gt;&lt;P&gt;&amp;nbsp; if( _bFXOS8700_Write(FXOS8700_CTRL_REG2,0x04))//Autosleep on&lt;/P&gt;&lt;P&gt;&amp;nbsp; if( _bFXOS8700_Write(FXOS8700_ASLP_COUNT,0x06))//Auto-sleep trigg&lt;/P&gt;&lt;P&gt;&amp;nbsp; if( _bFXOS8700_Write(FXOS8700_CTRL_REG4,0x02))//Autosleep IT enable&lt;/P&gt;&lt;P&gt;&amp;nbsp; if( _bFXOS8700_Write(FXOS8700_CTRL_REG5,0x02))//IT on IT1 pin&lt;/P&gt;&lt;P&gt;&amp;nbsp; if( _bFXOS8700_Write(FXOS8700_CTRL_REG3,0x07))//wake on vecm 1101&lt;/P&gt;&lt;P&gt;&amp;nbsp; if( _bFXOS8700_Write(FXOS8700_A_VECM_CFG,0x48))//A_VECM_CFG &lt;/P&gt;&lt;P&gt;&amp;nbsp; if( _bFXOS8700_Write(FXOS8700_A_VECM_THS_MSB,0x00))//A_VECM_THS_MSB&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; if( _bFXOS8700_Write(FXOS8700_A_VECM_THS_LSB,/0x40))//A_VECM_THS_LSB &lt;/P&gt;&lt;P&gt;&amp;nbsp; if( _bFXOS8700_Write(FXOS8700_CTRL_REG3,0x04))//wake on vecm&lt;/P&gt;&lt;P&gt;&amp;nbsp; //---------------&lt;/P&gt;&lt;P&gt;&amp;nbsp; if(_bFXOS8700_Write(FXOS8700_CTRL_REG1,0x29)) // Active Mode + ODR max -&amp;gt;freq min&lt;/P&gt;&lt;P&gt;&amp;nbsp; if(_bFXOS8700_Read(0x0B,&amp;amp;__u8_CmdResult)) // Check WakeMode&lt;/P&gt;&lt;P&gt;&amp;nbsp; if((__u8_CmdResult&amp;amp;0x03)== 1) // ok&lt;/P&gt;&lt;P&gt;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp; _b_IsFXOS8700Init = TRUE;&lt;/P&gt;&lt;P&gt;&amp;nbsp; __b_result&amp;nbsp; =TRUE;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return __b_result;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anthony&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Nov 2020 13:20:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Sensors/FXOS8700CQ-Motion-Detection-and-Interrupts/m-p/435313#M2126</guid>
      <dc:creator>anthonyduhamel</dc:creator>
      <dc:date>2020-11-02T13:20:52Z</dc:date>
    </item>
    <item>
      <title>Re: FXOS8700CQ Motion Detection and Interrupts</title>
      <link>https://community.nxp.com/t5/Sensors/FXOS8700CQ-Motion-Detection-and-Interrupts/m-p/435314#M2127</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anthony&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried several codes, even yours.... my problem now is that I don't get a interrupt from the pins int1 or int2. When I poll the INT_SOURCE register&amp;nbsp; I can see that the respective interrupt bits are set and then I clear it by reading the interrupt source in the respective register. The code works with polling but I need and edge, rising or falling in the intx pin when the respective bit is asserted in the INT_SOURCE register because I need to work a processor in low power mode and then wake up it with an edge.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2015 03:34:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Sensors/FXOS8700CQ-Motion-Detection-and-Interrupts/m-p/435314#M2127</guid>
      <dc:creator>alejandrovelez</dc:creator>
      <dc:date>2015-10-29T03:34:37Z</dc:date>
    </item>
    <item>
      <title>Re: FXOS8700CQ Motion Detection and Interrupts</title>
      <link>https://community.nxp.com/t5/Sensors/FXOS8700CQ-Motion-Detection-and-Interrupts/m-p/435315#M2128</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alejandro,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've just tested again my code, (I did&amp;nbsp; some updates), it works well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my FXOS8700.c file:&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="_jivemacro_uid_14461124041247490 jive_macro_code jive_text_macro" data-renderedposition="134_8_1232_1008" jivemacro_uid="_14461124041247490"&gt;&lt;P&gt;////////////////////////////////////////////////////////////////////////////////&lt;/P&gt;&lt;P&gt;//!&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Public functions&lt;/P&gt;&lt;P&gt;////////////////////////////////////////////////////////////////////////////////&lt;/P&gt;&lt;P&gt;bool bFXOS8700_Init()&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; bool __b_result = FALSE;&lt;/P&gt;&lt;P&gt;&amp;nbsp; uint8_t __u8_CmdResult = 0;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if(!_b_IsFXOS8700Init)&lt;/P&gt;&lt;P&gt;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp; I2C_Init (NULL);&lt;/P&gt;&lt;P&gt;&amp;nbsp; if(_bFXOS8700_Write(FXOS8700_CTRL_REG1,0x00)) // Pass to standby mode for writable operations&lt;/P&gt;&lt;P&gt;&amp;nbsp; if(_bFXOS8700_Read(FXOS8700_WHO_AM_I,&amp;amp;__u8_CmdResult)) // Check device communication&lt;/P&gt;&lt;P&gt;&amp;nbsp; if(__u8_CmdResult== FXOS8700_WHO_AM_I_VALUE) // Check device ID&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; /* Acc-cell Config */&lt;/P&gt;&lt;P&gt;&amp;nbsp; if(_bFXOS8700_Write(FXOS8700_XYZ_DATA_CFG,0x02)) // ±0.976 mg/LSB&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; /* M-cell Config */&lt;/P&gt;&lt;P&gt;&amp;nbsp; if(_bFXOS8700_Write(FXOS8700_M_CTRL_REG1,0x17)) // Hybrid mode (mag+acc)&lt;/P&gt;&lt;P&gt;&amp;nbsp; if(_bFXOS8700_Write(FXOS8700_M_CTRL_REG2,0x00))&lt;/P&gt;&lt;P&gt;&amp;nbsp; if(_bFXOS8700_Write(FXOS8700_M_CTRL_REG3,0x80))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; /* Sleep mode + wake mode config + interrupt*/&lt;/P&gt;&lt;P&gt;&amp;nbsp; if( _bFXOS8700_Write(FXOS8700_CTRL_REG2,0x04 | 0x03)) // Autosleep on |LowPower&lt;/P&gt;&lt;P&gt;&amp;nbsp; if( _bFXOS8700_Write(FXOS8700_CTRL_REG3,0x04|0x00)) // wake on vecm | active low | PushPull&lt;/P&gt;&lt;P&gt;&amp;nbsp; if( _bFXOS8700_Write(FXOS8700_CTRL_REG4,0x02)) // VECM INT enable in sleep mode&lt;/P&gt;&lt;P&gt;&amp;nbsp; if( _bFXOS8700_Write(FXOS8700_CTRL_REG5,0x02)) // INT on INT1 pin&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if( _bFXOS8700_Write(FXOS8700_ASLP_COUNT,0x06)) // Auto-sleep counter&lt;/P&gt;&lt;P&gt;&amp;nbsp; if( _bFXOS8700_Write(FXOS8700_TRIG_CFG, 0x00)) // FIFO not used&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; /* Vector Magnitude config */&lt;/P&gt;&lt;P&gt;&amp;nbsp; if( _bFXOS8700_Write(FXOS8700_A_VECM_CFG,0x48)) // 0b0100 1000&amp;nbsp; current x/y/z accelerometer output data as initial reference values | vecm enable&lt;/P&gt;&lt;P&gt;&amp;nbsp; if( _bFXOS8700_Write(FXOS8700_A_VECM_THS_MSB,0x00)) // Threshold value MSB&lt;/P&gt;&lt;P&gt;&amp;nbsp; if( _bFXOS8700_Write(FXOS8700_A_VECM_THS_LSB,0x40)) // Threshold value LSB&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; //---------------&lt;/P&gt;&lt;P&gt;&amp;nbsp; if(_bFXOS8700_Write(FXOS8700_CTRL_REG1,0x29)) // Active Mode + ODR max -&amp;gt;freq min&lt;/P&gt;&lt;P&gt;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; _b_IsFXOS8700Init = TRUE;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; __b_result&amp;nbsp; =TRUE;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; INT_MOTIONDECTECTION_Init(NULL);&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return __b_result;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void vFXOS8700_OnMotionDetected() // Called form Event.c&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; bool __b_IsMotionDetected;&lt;/P&gt;&lt;P&gt;&amp;nbsp; uint8_t __u8_CmdResult = 0xFF;&lt;/P&gt;&lt;P&gt;&amp;nbsp; _bFXOS8700_Read(FXOS8700_INT_SOURCE,&amp;amp;__u8_CmdResult);// Read INT source to clear vecm int flag&lt;/P&gt;&lt;P&gt;&amp;nbsp; __b_IsMotionDetected =&amp;nbsp; ( ((__u8_CmdResult&amp;gt;&amp;gt;1)&amp;amp;0x01)==1); // Check if vecm has been setted by it&lt;/P&gt;&lt;P&gt;&amp;nbsp; if(__b_IsMotionDetected )&lt;/P&gt;&lt;P&gt;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Wake up the MCU&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you have well configured your INT component? I configure it for Falling Edge interrupt. For pin number, I'm using a FRDM-KL46Z, so it's not the rigth value, yours should be PTC6 (INT1) on FRDM-K46 QRC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_4.png"&gt;&lt;IMG alt="pastedImage_4.png" src="https://community.nxp.com/t5/image/serverpage/image-id/27595iFEA0120F4135E039/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_4.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my Event.c file&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14461132351983854 jive_text_macro" data-renderedposition="1746_8_1232_64" jivemacro_uid="_14461132351983854"&gt;&lt;P&gt;void INT_MOTIONDECTECTION_OnInterrupt(LDD_TUserData *UserDataPtr)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; vFXOS8700_OnMotionDetected();&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By the end, I have checked the well working of INT with a scope:&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="trigg.PNG"&gt;&lt;IMG alt="trigg.PNG" src="https://community.nxp.com/t5/image/serverpage/image-id/27808i18E26DEC81B8A037/image-size/large?v=v2&amp;amp;px=999" title="trigg.PNG" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Level is normally High. When a motion is detected, There is a falling edge: Interrup is catched by the code and cleared by vFXOS8700_OnMotionDetected() function by reading the FXOS8700 INT_SOURCE register.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it will help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anthony&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Nov 2020 13:20:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Sensors/FXOS8700CQ-Motion-Detection-and-Interrupts/m-p/435315#M2128</guid>
      <dc:creator>anthonyduhamel</dc:creator>
      <dc:date>2020-11-02T13:20:54Z</dc:date>
    </item>
    <item>
      <title>Re: FXOS8700CQ Motion Detection and Interrupts</title>
      <link>https://community.nxp.com/t5/Sensors/FXOS8700CQ-Motion-Detection-and-Interrupts/m-p/435316#M2129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Anthony, I adjusted your code to my needs and it works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One of the problems that I was having is that there is an error in KDS 3.0 Processor Expert. The pin FXOS8700CQ_INT1 doesn't correspond to the one that is connected to de chip (PTC6).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_0.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/51899iCAA34C3A9B126740/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_0.png" alt="pastedImage_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Nov 2015 17:19:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Sensors/FXOS8700CQ-Motion-Detection-and-Interrupts/m-p/435316#M2129</guid>
      <dc:creator>alejandrovelez</dc:creator>
      <dc:date>2015-11-04T17:19:49Z</dc:date>
    </item>
    <item>
      <title>Re: FXOS8700CQ Motion Detection and Interrupts</title>
      <link>https://community.nxp.com/t5/Sensors/FXOS8700CQ-Motion-Detection-and-Interrupts/m-p/435317#M2130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great catch Alejandro.&lt;/P&gt;&lt;P&gt;I will inform the Processor Expert team.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anthony&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Nov 2015 16:10:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Sensors/FXOS8700CQ-Motion-Detection-and-Interrupts/m-p/435317#M2130</guid>
      <dc:creator>anthonyduhamel</dc:creator>
      <dc:date>2015-11-16T16:10:44Z</dc:date>
    </item>
  </channel>
</rss>

