<?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 Problem with FXOS8700CQ and FXAS21002 operating together in Sensors</title>
    <link>https://community.nxp.com/t5/Sensors/Problem-with-FXOS8700CQ-and-FXAS21002-operating-together/m-p/912685#M5738</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have managed to get both sensors generate data ready interrupts, routed at INT2 pin of each sensor, with active low polarity.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using a TM4C123 processor, with I2C3 connected to the gyro sensor, and I2C0 connected to accelmag sensor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here are my ISRs:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;// gyro interrupt service routine&lt;BR /&gt;void gyro_isr(void) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MAP_GPIOPinWrite(GPIO_PORTA_BASE, GPIO_PIN_2, GPIO_PIN_2);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(GPIOIntStatus(GPIO_PORTD_BASE, true) &amp;amp; GPIO_PIN_3) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GPIOIntClear(GPIO_PORTD_BASE, GPIO_PIN_3);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gyro_data_ready = true;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; GPIOIntStatus(GPIO_PORTD_BASE, false);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MAP_GPIOPinWrite(GPIO_PORTA_BASE, GPIO_PIN_2, 0x00);&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;// accelmag interrupt service routine&lt;BR /&gt;void accelmag_isr(void) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MAP_GPIOPinWrite(GPIO_PORTA_BASE, GPIO_PIN_3, GPIO_PIN_3);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(GPIOIntStatus(GPIO_PORTB_BASE, true) &amp;amp; GPIO_PIN_5) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GPIOIntClear(GPIO_PORTB_BASE, GPIO_PIN_5);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; accelmag_data_ready = true;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; GPIOIntStatus(GPIO_PORTB_BASE, false);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MAP_GPIOPinWrite(GPIO_PORTA_BASE, GPIO_PIN_3, 0x00);&lt;BR /&gt;}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And in my main loop:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;while(1) {&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;if(gyro_data_ready) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GyroGetData(FXAS21002C_ADDRESS, &amp;amp;gyroRD);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gyro_data_ready = false;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;if(accelmag_data_ready) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AGGetData(FXOS8700_ADDRESS, &amp;amp;accelRD, &amp;amp;magRD);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; accelmag_data_ready = false;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;BR /&gt;}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The system works, interrupts are generated, triggers the ISR's and data is read. But after a while, the accelmag sensor fails to deassert the interrupt. Thus never read again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a scopecap of the failure:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="scopecap1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/83154iF67F640E7BFDF299/image-size/large?v=v2&amp;amp;px=999" alt="scopecap1.png" title="scopecap1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The top 4 (D0 to D3) is the gyro sensor, D0: interrupt D1: PA2, D2: SCL3, D3: SDA3&lt;/P&gt;&lt;P&gt;The bottom 4 (D4 to D7) is the accelmag sensor, D4: interrupt, D5: PA3, D6: SCL3, D7: SDA3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is just where the accelmag sensor stops responding, near to the end, the interrupt line falls at D4, you see the spike at D5, and I2C data transfer takes place, but the interrupt line is never de-asserted again.&lt;/P&gt;&lt;P&gt;The spikes indicate entering and exiting of the ISR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My aim is to syncronize the sensors. For making calculations to get orientation from gyro, accelmag with extended kalman filtering, it is of great importance that the dt does not jitter. At first I was reading gyro's data_ready interrupt, and then reading the accelmag sensor, but then I tried a 2 interrupt approach, and It works but only for few minutes, then I get this error. At higher speeds like 400hz it crashes within few seconds.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any comments on sycnronization of these sensors, and ideas/help on the problem greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Can&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 03 Feb 2026 22:03:50 GMT</pubDate>
    <dc:creator>altineller</dc:creator>
    <dc:date>2026-02-03T22:03:50Z</dc:date>
    <item>
      <title>Problem with FXOS8700CQ and FXAS21002 operating together</title>
      <link>https://community.nxp.com/t5/Sensors/Problem-with-FXOS8700CQ-and-FXAS21002-operating-together/m-p/912685#M5738</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have managed to get both sensors generate data ready interrupts, routed at INT2 pin of each sensor, with active low polarity.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using a TM4C123 processor, with I2C3 connected to the gyro sensor, and I2C0 connected to accelmag sensor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here are my ISRs:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;// gyro interrupt service routine&lt;BR /&gt;void gyro_isr(void) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MAP_GPIOPinWrite(GPIO_PORTA_BASE, GPIO_PIN_2, GPIO_PIN_2);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(GPIOIntStatus(GPIO_PORTD_BASE, true) &amp;amp; GPIO_PIN_3) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GPIOIntClear(GPIO_PORTD_BASE, GPIO_PIN_3);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gyro_data_ready = true;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; GPIOIntStatus(GPIO_PORTD_BASE, false);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MAP_GPIOPinWrite(GPIO_PORTA_BASE, GPIO_PIN_2, 0x00);&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;// accelmag interrupt service routine&lt;BR /&gt;void accelmag_isr(void) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MAP_GPIOPinWrite(GPIO_PORTA_BASE, GPIO_PIN_3, GPIO_PIN_3);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(GPIOIntStatus(GPIO_PORTB_BASE, true) &amp;amp; GPIO_PIN_5) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GPIOIntClear(GPIO_PORTB_BASE, GPIO_PIN_5);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; accelmag_data_ready = true;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; GPIOIntStatus(GPIO_PORTB_BASE, false);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MAP_GPIOPinWrite(GPIO_PORTA_BASE, GPIO_PIN_3, 0x00);&lt;BR /&gt;}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And in my main loop:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;while(1) {&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;if(gyro_data_ready) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GyroGetData(FXAS21002C_ADDRESS, &amp;amp;gyroRD);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gyro_data_ready = false;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;if(accelmag_data_ready) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AGGetData(FXOS8700_ADDRESS, &amp;amp;accelRD, &amp;amp;magRD);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; accelmag_data_ready = false;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;BR /&gt;}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The system works, interrupts are generated, triggers the ISR's and data is read. But after a while, the accelmag sensor fails to deassert the interrupt. Thus never read again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a scopecap of the failure:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="scopecap1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/83154iF67F640E7BFDF299/image-size/large?v=v2&amp;amp;px=999" alt="scopecap1.png" title="scopecap1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The top 4 (D0 to D3) is the gyro sensor, D0: interrupt D1: PA2, D2: SCL3, D3: SDA3&lt;/P&gt;&lt;P&gt;The bottom 4 (D4 to D7) is the accelmag sensor, D4: interrupt, D5: PA3, D6: SCL3, D7: SDA3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is just where the accelmag sensor stops responding, near to the end, the interrupt line falls at D4, you see the spike at D5, and I2C data transfer takes place, but the interrupt line is never de-asserted again.&lt;/P&gt;&lt;P&gt;The spikes indicate entering and exiting of the ISR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My aim is to syncronize the sensors. For making calculations to get orientation from gyro, accelmag with extended kalman filtering, it is of great importance that the dt does not jitter. At first I was reading gyro's data_ready interrupt, and then reading the accelmag sensor, but then I tried a 2 interrupt approach, and It works but only for few minutes, then I get this error. At higher speeds like 400hz it crashes within few seconds.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any comments on sycnronization of these sensors, and ideas/help on the problem greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Can&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2026 22:03:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Sensors/Problem-with-FXOS8700CQ-and-FXAS21002-operating-together/m-p/912685#M5738</guid>
      <dc:creator>altineller</dc:creator>
      <dc:date>2026-02-03T22:03:50Z</dc:date>
    </item>
  </channel>
</rss>

