<?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: Accelerometer FXLS8974 - bug in library ? in Sensors</title>
    <link>https://community.nxp.com/t5/Sensors/Accelerometer-FXLS8974-bug-in-library/m-p/1432143#M6865</link>
    <description>&lt;P&gt;Hi Tomas,&lt;/P&gt;&lt;P&gt;I found another bug, a small one this time.&lt;/P&gt;&lt;P&gt;file fxls896xaf_driver.h, desctription of fxls896xaf_deinit() function (end of file)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;/*! @brief       The interface function to de-initialize the fxls896xaf sensor.
 *  @details     This function de-initialize the fxls896xaf sensor.
 *  [in]   pDriver - Pointer to the driver
 *  [out]  selftest - Pointer to the self-test metadata.
 *  @return      returns the status of the operation.
 */
uint8_t fxls896xaf_deinit(fxls896xaf_driver_t *pDriver);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In description is information about param[out], but this argument does not exist in the function.&lt;/P&gt;&lt;P&gt;it was probably created in the process of copying.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And next one, fxls896xaf_config_interrupt() function, line 368:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;...
	//Read the CRTL3 and preserve the existing configuration bits of the control registers other than interrupt configuration bits
	status = sensor_comm_read(&amp;amp;pDriver-&amp;gt;comHandle, FXLS896xAF_SENS_CONFIG4, 1, &amp;amp;ctrlReg);

	// Update the Ctrl reg with polarity and open drain/push pull
	ctrlReg |= ((uint8_t)(pConfig-&amp;gt;control.ipol | (pConfig-&amp;gt;control.pp_od &amp;lt;&amp;lt; FXLS896xAF_SENS_CONFIG4_INT_PP_OD_SHIFT)) &amp;amp; (FXLS896xAF_SENS_CONFIG4_INT_POL_MASK | FXLS896xAF_SENS_CONFIG4_INT_PP_OD_MASK));

	// configure the interrupts sources with desired pin configuration setting for fxls896xaf
...&lt;/LI-CODE&gt;&lt;P&gt;incorrect implementation of the register bit change, thus the bits cannot be reset.&lt;/P&gt;&lt;P&gt;My proposition of implementation:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;...
	// Update the Ctrl reg with polarity and open drain/push pull
	ctrlReg = (ctrlReg &amp;amp; ~(FXLS896xAF_SENS_CONFIG4_INT_POL_MASK | FXLS896xAF_SENS_CONFIG4_INT_PP_OD_MASK)) | ((uint8_t)(pConfig-&amp;gt;control.ipol | (pConfig-&amp;gt;control.pp_od &amp;lt;&amp;lt; FXLS896xAF_SENS_CONFIG4_INT_PP_OD_SHIFT)));
...&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One more question, I'm introducing modifications to the library, which in my opinion will become more universal, is there a place for sending changes or proposition of changes?&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Adrian Chmiel&lt;/P&gt;</description>
    <pubDate>Tue, 22 Mar 2022 20:43:49 GMT</pubDate>
    <dc:creator>adrian_chmiel</dc:creator>
    <dc:date>2022-03-22T20:43:49Z</dc:date>
    <item>
      <title>Accelerometer FXLS8974 - bug in library ?</title>
      <link>https://community.nxp.com/t5/Sensors/Accelerometer-FXLS8974-bug-in-library/m-p/1409260#M6832</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I work on your new product FXLS8974 accelerometer and probably I found bug.&lt;/P&gt;&lt;P&gt;It's regarding interrupt configuration, fuction fxls896xaf_config_interrupt with look:&lt;/P&gt;&lt;P&gt;...&lt;BR /&gt;&amp;nbsp;// configure the interrupts sources with desired pin configuration setting for fxls896xaf&lt;BR /&gt;status = sensor_comm_write(&amp;amp;pDriver-&amp;gt;comHandle, FXLS896xAF_SENS_CONFIG4, 1, &amp;amp;ctrlReg);&lt;BR /&gt;// Enable the desired interrupt sources.&lt;BR /&gt;status = sensor_comm_write(&amp;amp;pDriver-&amp;gt;comHandle, FXLS896xAF_INT_EN, 1, &amp;amp;pConfig-&amp;gt;intSources.w);&lt;BR /&gt;// configure the interrupt routing&lt;BR /&gt;&lt;STRONG&gt;status = sensor_comm_write(&amp;amp;pDriver-&amp;gt;comHandle, FXLS896xAF_INT_EN, 1, &amp;amp;pConfig-&amp;gt;int1_2.w);&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;status = set_mode(pDriver, ACTIVE, NULL);&lt;BR /&gt;...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think, in marked line, should be call to FXLS896xAF_INT_PIN_SEL, not again FXLS896xAF_INT_EN.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;BTW&lt;BR /&gt;How to put the code in the frame? Like &amp;lt;code&amp;gt; in standard forums?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Adrian Chmiel&lt;/P&gt;</description>
      <pubDate>Tue, 03 Feb 2026 20:51:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Sensors/Accelerometer-FXLS8974-bug-in-library/m-p/1409260#M6832</guid>
      <dc:creator>adrian_chmiel</dc:creator>
      <dc:date>2026-02-03T20:51:05Z</dc:date>
    </item>
    <item>
      <title>Re: Accelerometer FXLS8974 - bug in library ?</title>
      <link>https://community.nxp.com/t5/Sensors/Accelerometer-FXLS8974-bug-in-library/m-p/1409567#M6835</link>
      <description>&lt;P&gt;Hi Adrian,&lt;/P&gt;
&lt;P&gt;You are right, the correct implementation is:&lt;/P&gt;
&lt;LI-CODE lang="c"&gt;// configure the interrupt routing
status = sensor_comm_write(&amp;amp;pDriver-&amp;gt;comHandle, FXLS896xAF_INT_PIN_SEL, 1, &amp;amp;pConfig-&amp;gt;int1_2.w);
&lt;/LI-CODE&gt;
&lt;P&gt;Thanks for pointing this out, we will fix it ASAP.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The code can be inserted/edited using the Insert/Edit code sample button:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 791px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/169714iC80FD3045ED25F14/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Tomas&lt;/P&gt;</description>
      <pubDate>Mon, 07 Feb 2022 09:08:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Sensors/Accelerometer-FXLS8974-bug-in-library/m-p/1409567#M6835</guid>
      <dc:creator>TomasVaverka</dc:creator>
      <dc:date>2022-02-07T09:08:51Z</dc:date>
    </item>
    <item>
      <title>Re: Accelerometer FXLS8974 - bug in library ?</title>
      <link>https://community.nxp.com/t5/Sensors/Accelerometer-FXLS8974-bug-in-library/m-p/1409692#M6836</link>
      <description>&lt;P&gt;if I can suggest anything else, I would like to suggest a separate function to start and stop the accelerometer.&lt;BR /&gt;In library is a set_mode function in the code but it is local.&lt;/P&gt;&lt;P&gt;The libraries assume that the accelerometer is always on, if we want to otherwise, we would have to manually control the registers or modify lib.&lt;/P&gt;&lt;P&gt;I think it would be good if the libraries were checking the status of the accelerometer (ACTIVE/STANDBY) and not always running it as in the above interrupt setting function.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Feb 2022 13:09:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Sensors/Accelerometer-FXLS8974-bug-in-library/m-p/1409692#M6836</guid>
      <dc:creator>adrian_chmiel</dc:creator>
      <dc:date>2022-02-07T13:09:14Z</dc:date>
    </item>
    <item>
      <title>Re: Accelerometer FXLS8974 - bug in library ?</title>
      <link>https://community.nxp.com/t5/Sensors/Accelerometer-FXLS8974-bug-in-library/m-p/1432143#M6865</link>
      <description>&lt;P&gt;Hi Tomas,&lt;/P&gt;&lt;P&gt;I found another bug, a small one this time.&lt;/P&gt;&lt;P&gt;file fxls896xaf_driver.h, desctription of fxls896xaf_deinit() function (end of file)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;/*! @brief       The interface function to de-initialize the fxls896xaf sensor.
 *  @details     This function de-initialize the fxls896xaf sensor.
 *  [in]   pDriver - Pointer to the driver
 *  [out]  selftest - Pointer to the self-test metadata.
 *  @return      returns the status of the operation.
 */
uint8_t fxls896xaf_deinit(fxls896xaf_driver_t *pDriver);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In description is information about param[out], but this argument does not exist in the function.&lt;/P&gt;&lt;P&gt;it was probably created in the process of copying.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And next one, fxls896xaf_config_interrupt() function, line 368:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;...
	//Read the CRTL3 and preserve the existing configuration bits of the control registers other than interrupt configuration bits
	status = sensor_comm_read(&amp;amp;pDriver-&amp;gt;comHandle, FXLS896xAF_SENS_CONFIG4, 1, &amp;amp;ctrlReg);

	// Update the Ctrl reg with polarity and open drain/push pull
	ctrlReg |= ((uint8_t)(pConfig-&amp;gt;control.ipol | (pConfig-&amp;gt;control.pp_od &amp;lt;&amp;lt; FXLS896xAF_SENS_CONFIG4_INT_PP_OD_SHIFT)) &amp;amp; (FXLS896xAF_SENS_CONFIG4_INT_POL_MASK | FXLS896xAF_SENS_CONFIG4_INT_PP_OD_MASK));

	// configure the interrupts sources with desired pin configuration setting for fxls896xaf
...&lt;/LI-CODE&gt;&lt;P&gt;incorrect implementation of the register bit change, thus the bits cannot be reset.&lt;/P&gt;&lt;P&gt;My proposition of implementation:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;...
	// Update the Ctrl reg with polarity and open drain/push pull
	ctrlReg = (ctrlReg &amp;amp; ~(FXLS896xAF_SENS_CONFIG4_INT_POL_MASK | FXLS896xAF_SENS_CONFIG4_INT_PP_OD_MASK)) | ((uint8_t)(pConfig-&amp;gt;control.ipol | (pConfig-&amp;gt;control.pp_od &amp;lt;&amp;lt; FXLS896xAF_SENS_CONFIG4_INT_PP_OD_SHIFT)));
...&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One more question, I'm introducing modifications to the library, which in my opinion will become more universal, is there a place for sending changes or proposition of changes?&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Adrian Chmiel&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2022 20:43:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Sensors/Accelerometer-FXLS8974-bug-in-library/m-p/1432143#M6865</guid>
      <dc:creator>adrian_chmiel</dc:creator>
      <dc:date>2022-03-22T20:43:49Z</dc:date>
    </item>
    <item>
      <title>Re: Accelerometer FXLS8974 - bug in library ?</title>
      <link>https://community.nxp.com/t5/Sensors/Accelerometer-FXLS8974-bug-in-library/m-p/1433390#M6868</link>
      <description>&lt;P&gt;Hi Adrian,&lt;/P&gt;
&lt;P&gt;Thanks again for reporting these bugs.&amp;nbsp;There is a plan to fix them in both the FXLS896xAF and FXLS8974CF driver releases by end of April.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Tomas&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2022 10:03:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Sensors/Accelerometer-FXLS8974-bug-in-library/m-p/1433390#M6868</guid>
      <dc:creator>TomasVaverka</dc:creator>
      <dc:date>2022-03-24T10:03:25Z</dc:date>
    </item>
    <item>
      <title>Re: Accelerometer FXLS8974 - bug in library ?</title>
      <link>https://community.nxp.com/t5/Sensors/Accelerometer-FXLS8974-bug-in-library/m-p/1789388#M7856</link>
      <description>&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/108633"&gt;@adrian_chmiel&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;In library is a set_mode function in the code but it is local.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;A fix for this has now been promised:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/t5/Sensors/FXLS896xAF-library-why-is-set-mode-not-public/m-p/1789229/highlight/true#M7853" target="_blank"&gt;https://community.nxp.com/t5/Sensors/FXLS896xAF-library-why-is-set-mode-not-public/m-p/1789229/highlight/true#M7853&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2024 09:37:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Sensors/Accelerometer-FXLS8974-bug-in-library/m-p/1789388#M7856</guid>
      <dc:creator>andrewneil</dc:creator>
      <dc:date>2024-01-16T09:37:07Z</dc:date>
    </item>
  </channel>
</rss>

