<?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: Help setting up Auto-Wake/Sleep Using the MMA8452Q in Sensors</title>
    <link>https://community.nxp.com/t5/Sensors/Help-setting-up-Auto-Wake-Sleep-Using-the-MMA8452Q/m-p/263395#M452</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tomas,&lt;/P&gt;&lt;P&gt;You are awesome!!!!&lt;/P&gt;&lt;P&gt;Your code helped me a lot and solved my issue!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You rock bud!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much.&lt;/P&gt;&lt;P&gt;All the best&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Flavio&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Jan 2014 19:26:54 GMT</pubDate>
    <dc:creator>flavioortolano</dc:creator>
    <dc:date>2014-01-29T19:26:54Z</dc:date>
    <item>
      <title>Help setting up Auto-Wake/Sleep Using the MMA8452Q</title>
      <link>https://community.nxp.com/t5/Sensors/Help-setting-up-Auto-Wake-Sleep-Using-the-MMA8452Q/m-p/263393#M450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello there,&lt;/P&gt;&lt;P&gt;I am trying to configure the MMA8452Q to auto-sleep-wake but I am having no success at all.&amp;nbsp; The accelerometer works fine since I was able to configure it to output simple XYZ data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've downloaded the document AN4074 (Auto-Wake/Sleep Using the MMA8451, 2, 3Q) that seems to explain how to setup the wake/sleep fucntion, but again, it didn't work. I followed the pseudo-code on page 8 at the end of the document and I've noticed that although the example says it configures the device to sleep time-out period to 20 seconds, I could not identify in the pseudo-code the changes/updates related to the ASLP_COUNT Register (0x29) values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could someone give me some help on how to configure register 0x29? I have no idea (even after reading the documentation) how to set the bits D7-D0 for this register. What values should be written to this register when setting up the wake-sleep function?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the stage of my prototype development, all I am trying to do right now is to get the accelerometer to sleep and be awaken after the device gets shaken - so any code/pseudo-code/explanation would be welcomed!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are some code samples and libraries that I was able to find through Google, but not one single example nor code demonstrates how to setup the autp-wake-sleep. Any direction is much appreciated!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;&lt;P&gt;Flavio&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-email-small" href="mailto:flavio@ortolanos.com" target="_blank"&gt;flavio@ortolanos.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2026 21:10:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Sensors/Help-setting-up-Auto-Wake-Sleep-Using-the-MMA8452Q/m-p/263393#M450</guid>
      <dc:creator>flavioortolano</dc:creator>
      <dc:date>2026-02-03T21:10:46Z</dc:date>
    </item>
    <item>
      <title>Re: Help setting up Auto-Wake/Sleep Using the MMA8452Q</title>
      <link>https://community.nxp.com/t5/Sensors/Help-setting-up-Auto-Wake-Sleep-Using-the-MMA8452Q/m-p/263394#M451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Flavio,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; background: white;"&gt;The pseudo-code on page 8 of the &lt;A href="http://cache.freescale.com/files/sensors/doc/app_note/AN4074.pdf"&gt;AN4074&lt;/A&gt; is indeed incomplete. Attached you can find my example code I have written for the &lt;A href="http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=FRDM-KL25Z"&gt;FRDM-KL25Z board&lt;/A&gt; and that demonstrates how to use the auto-wake/sleep function. The transient function is used to wake up the MMA8451Q and the &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Helvetica','sans-serif'; background: white;"&gt;time-out period&lt;/SPAN&gt; is set to 5s. If you look at table 51 on page 36 of the &lt;A href="http://www.freescale.com/files/sensors/doc/data_sheet/MMA8452Q.pdf"&gt;MMA8452Q datasheet&lt;/A&gt;, you will see that the time step depends on the selected ODR. It is 640ms for 1.56Hz and 320ms for all other ODR values. In the attached example code the ODR is set to 100Hz and the required time-out period is 5s, so the value that needs to be written to the ASLP_COUNT register is 16 or 0x10 (=5s/320ms=~16).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Helvetica','sans-serif'; background: white;"&gt;I hope it helps. If you have any other questions, just let me know.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Helvetica','sans-serif'; background: white;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Helvetica','sans-serif'; background: white;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;EM&gt;PS: &lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica','sans-serif';"&gt;&lt;EM&gt;If my answer solves your question, please mark it as "Correct" or “Helpful”. Thank you.&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jan 2014 14:27:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Sensors/Help-setting-up-Auto-Wake-Sleep-Using-the-MMA8452Q/m-p/263394#M451</guid>
      <dc:creator>TomasVaverka</dc:creator>
      <dc:date>2014-01-29T14:27:09Z</dc:date>
    </item>
    <item>
      <title>Re: Help setting up Auto-Wake/Sleep Using the MMA8452Q</title>
      <link>https://community.nxp.com/t5/Sensors/Help-setting-up-Auto-Wake-Sleep-Using-the-MMA8452Q/m-p/263395#M452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tomas,&lt;/P&gt;&lt;P&gt;You are awesome!!!!&lt;/P&gt;&lt;P&gt;Your code helped me a lot and solved my issue!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You rock bud!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much.&lt;/P&gt;&lt;P&gt;All the best&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Flavio&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jan 2014 19:26:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Sensors/Help-setting-up-Auto-Wake-Sleep-Using-the-MMA8452Q/m-p/263395#M452</guid>
      <dc:creator>flavioortolano</dc:creator>
      <dc:date>2014-01-29T19:26:54Z</dc:date>
    </item>
  </channel>
</rss>

