<?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: MMA9551 - problem to read raw XYZ asis data using AFE appllication in Sensors</title>
    <link>https://community.nxp.com/t5/Sensors/MMA9551-problem-to-read-raw-XYZ-asis-data-using-AFE-appllication/m-p/777906#M5028</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Janusz,&lt;/P&gt;&lt;P&gt;I'm afraid you're not using the appropriate message syntax&amp;nbsp;to communicate with MMA9551L:&lt;/P&gt;&lt;P&gt;"cmd: 0x98, 0x06, 0x30,0x12,0x06" is not correct (assuming it represents the I2C multi-byte write transaction).&lt;/P&gt;&lt;P&gt;You need to specify the &lt;STRONG&gt;starting register address&lt;/STRONG&gt; (usually 0x00 i.e. Mailbox0) where you want to write the command, which gives:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"cmd: 0x98, &lt;STRONG&gt;0x00&lt;/STRONG&gt;, 0x06, 0x30, 0x12, 0x06"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;With such command, the host is requesting to AFE application (ID 0x06), 6 bytes of data, starting at status register 0x12 (i.e. output [FRONTEND_Stage_0_GM][XYZ] registers, cf MMA955xL_SWRM.pdf §8.3.4)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/14566i10B932C962B303D4/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_3.png" alt="pastedImage_3.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Answer from MMA9551 device can be read by the following transaction:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"ans: 0x98, 0x00, 0x99, 0x06, 0x80, 0x06, 0x06, &lt;STRONG&gt;0x00, 0x27, 0x00, 0x9D, 0xFD, 0xEB&lt;/STRONG&gt;"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Last 6 bytes are the XYZ data, but as the MMA9551L is still in sleep mode, they are not relevant.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_4.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/14623iC61C487BD9A18127/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_4.png" alt="pastedImage_4.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To actually start measurement, you shall disable the SNCEN bit in the Sleep-Wake Application config register, with the below command:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"cmd: 0x98,&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;0x00&lt;/STRONG&gt;&lt;SPAN&gt;, 0x12, 0x20, 0x06, 0x01, 0x00"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If you have&amp;nbsp;the complete KITMMA9551LEVM demoboard, I can send you the "Mailbox Tool" basic SW to communicate with the device from a Windows computer:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_5.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/14671i8337A3E076B58F26/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_5.png" alt="pastedImage_5.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;After the "disable sleep mode" command, the XYZ data new values are sensible.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Z data is 0x105A = 4186counts (about 1g as board is horizontal), whereas X and Y are close to 0g.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Note that I've shown so far the "command/response" protocol (2 steps are required to get information from the MMA9551 device: host sends a query, then reads the answer). You may also configure some of the Mailboxes for "Quick-Read" (MB20 and beyond), so only a read transaction is required to directly fetch&amp;nbsp;predefined sensor information/results.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Regards,&amp;nbsp;&amp;nbsp;&amp;nbsp;Jacques.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Feb 2018 18:33:26 GMT</pubDate>
    <dc:creator>JackITB</dc:creator>
    <dc:date>2018-02-15T18:33:26Z</dc:date>
    <item>
      <title>MMA9551 - problem to read raw XYZ asis data using AFE appllication</title>
      <link>https://community.nxp.com/t5/Sensors/MMA9551-problem-to-read-raw-XYZ-asis-data-using-AFE-appllication/m-p/777905#M5027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I send&lt;/P&gt;&lt;P&gt;cmd: 0x98, 0x06, 0x30,0x12,0x06&lt;/P&gt;&lt;P&gt;ans: 0x99, 0x06, 0x40, 0x02, 0x01, 0x06, 0x03, 0x41 - looks like ans on APP_ID_0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe my initialization is failed:&lt;/P&gt;&lt;P&gt;1. Verify ID - OK (APP_ID_0)&lt;/P&gt;&lt;P&gt;2. Set range +/-2g (AFE)&lt;/P&gt;&lt;P&gt;3. Set ODR (AFE)&lt;/P&gt;&lt;P&gt;4. Set MBOX (I tried without it as well)&lt;/P&gt;&lt;P&gt;5. Run mode (APP SLEEP WAKE)&lt;/P&gt;&lt;P&gt;6. Read data (AFE, cmd 0x30)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2026 21:38:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Sensors/MMA9551-problem-to-read-raw-XYZ-asis-data-using-AFE-appllication/m-p/777905#M5027</guid>
      <dc:creator>januszjonski</dc:creator>
      <dc:date>2026-02-03T21:38:45Z</dc:date>
    </item>
    <item>
      <title>Re: MMA9551 - problem to read raw XYZ asis data using AFE appllication</title>
      <link>https://community.nxp.com/t5/Sensors/MMA9551-problem-to-read-raw-XYZ-asis-data-using-AFE-appllication/m-p/777906#M5028</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Janusz,&lt;/P&gt;&lt;P&gt;I'm afraid you're not using the appropriate message syntax&amp;nbsp;to communicate with MMA9551L:&lt;/P&gt;&lt;P&gt;"cmd: 0x98, 0x06, 0x30,0x12,0x06" is not correct (assuming it represents the I2C multi-byte write transaction).&lt;/P&gt;&lt;P&gt;You need to specify the &lt;STRONG&gt;starting register address&lt;/STRONG&gt; (usually 0x00 i.e. Mailbox0) where you want to write the command, which gives:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"cmd: 0x98, &lt;STRONG&gt;0x00&lt;/STRONG&gt;, 0x06, 0x30, 0x12, 0x06"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;With such command, the host is requesting to AFE application (ID 0x06), 6 bytes of data, starting at status register 0x12 (i.e. output [FRONTEND_Stage_0_GM][XYZ] registers, cf MMA955xL_SWRM.pdf §8.3.4)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/14566i10B932C962B303D4/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_3.png" alt="pastedImage_3.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Answer from MMA9551 device can be read by the following transaction:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"ans: 0x98, 0x00, 0x99, 0x06, 0x80, 0x06, 0x06, &lt;STRONG&gt;0x00, 0x27, 0x00, 0x9D, 0xFD, 0xEB&lt;/STRONG&gt;"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Last 6 bytes are the XYZ data, but as the MMA9551L is still in sleep mode, they are not relevant.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_4.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/14623iC61C487BD9A18127/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_4.png" alt="pastedImage_4.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To actually start measurement, you shall disable the SNCEN bit in the Sleep-Wake Application config register, with the below command:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"cmd: 0x98,&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;0x00&lt;/STRONG&gt;&lt;SPAN&gt;, 0x12, 0x20, 0x06, 0x01, 0x00"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If you have&amp;nbsp;the complete KITMMA9551LEVM demoboard, I can send you the "Mailbox Tool" basic SW to communicate with the device from a Windows computer:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_5.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/14671i8337A3E076B58F26/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_5.png" alt="pastedImage_5.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;After the "disable sleep mode" command, the XYZ data new values are sensible.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Z data is 0x105A = 4186counts (about 1g as board is horizontal), whereas X and Y are close to 0g.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Note that I've shown so far the "command/response" protocol (2 steps are required to get information from the MMA9551 device: host sends a query, then reads the answer). You may also configure some of the Mailboxes for "Quick-Read" (MB20 and beyond), so only a read transaction is required to directly fetch&amp;nbsp;predefined sensor information/results.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Regards,&amp;nbsp;&amp;nbsp;&amp;nbsp;Jacques.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Feb 2018 18:33:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Sensors/MMA9551-problem-to-read-raw-XYZ-asis-data-using-AFE-appllication/m-p/777906#M5028</guid>
      <dc:creator>JackITB</dc:creator>
      <dc:date>2018-02-15T18:33:26Z</dc:date>
    </item>
    <item>
      <title>Re: MMA9551 - problem to read raw XYZ asis data using AFE appllication</title>
      <link>https://community.nxp.com/t5/Sensors/MMA9551-problem-to-read-raw-XYZ-asis-data-using-AFE-appllication/m-p/777907#M5029</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Jacques&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you very much for your help. Right now I am able to write and read data to register, MMA9551 gives me correct answer.&lt;/P&gt;&lt;P&gt;I don’t know why, but when I read raw axis data, MMA gives me all the time the same value (I started measurement clearing SNCEN bit )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think that you should add information inside user manual (MMA955xLSWRM point 3.1):&lt;/P&gt;&lt;P&gt;1. Bytes to send 0x98 | 0x00 0x00, 0x00, 0x00, 0x0C - No info about additional byte (starting register address)&lt;/P&gt;&lt;P&gt;2. Reading bytes needs second cmd, (repeated start doesn’t work). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;	a. Cmd 0x98, 0x06, 0x30,0x12,0x06&lt;/P&gt;&lt;P&gt;	b. Ans: 0x98, 0x00, 0x99, 0x06, 0x80, 0x06, 0x06, 0x00, 0x27, 0x00, 0x9D, 0xFD, 0xEB"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Janusz Joński&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ProfBox Janusz Joński&lt;/P&gt;&lt;P&gt;NIP: 728-254-86-68&lt;/P&gt;&lt;P&gt;tel.: (+48) 607 710 286&lt;/P&gt;&lt;P&gt;aleja Politechniki 11,&lt;/P&gt;&lt;P&gt;93 - 590 Łódź,&lt;/P&gt;&lt;P&gt;profbox.pl&lt;/P&gt;&lt;P&gt;jj@profbox.pl&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Feb 2018 10:37:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Sensors/MMA9551-problem-to-read-raw-XYZ-asis-data-using-AFE-appllication/m-p/777907#M5029</guid>
      <dc:creator>januszjonski</dc:creator>
      <dc:date>2018-02-16T10:37:18Z</dc:date>
    </item>
    <item>
      <title>Re: MMA9551 - problem to read raw XYZ asis data using AFE appllication</title>
      <link>https://community.nxp.com/t5/Sensors/MMA9551-problem-to-read-raw-XYZ-asis-data-using-AFE-appllication/m-p/777908#M5030</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Janusz,&lt;BR /&gt;Thanks for your feedback.&lt;/P&gt;&lt;P&gt;Regarding your last status: "MMA gives me all the time the same value (I started measurement clearing SNCEN bit)", definitely this should not be the case !&lt;BR /&gt;I suggest you to check that "Disable Sleep Mode" command was successful by reading the COCO flag (0x80 -&amp;gt; Command Completed without error).&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.5pt;"&gt;Write@00 : 12 20 06 01 00 // Disable sleep mode&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 8.5pt;"&gt;Read@00&amp;nbsp; : 12 80 01 01&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Confirms the command was &lt;/SPAN&gt;executed successfully&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;For the record, I'm attaching a pdf document that illustrates various transactions for both I2C/SPI slave interfaces.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that answer to a command will typically need&amp;nbsp;several ms to be available, so you may have to introduce a delay before querying the result, or repeat the query till COCO flag is set.&amp;nbsp;Using the MBOX Configuration Application (App_ID 0x18), you can also program the INT_O pin so that it toggles when Command is completed. This provides a hardware line to trigger the host MCU read transaction.&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN&gt;Regards,&amp;nbsp;&amp;nbsp;&amp;nbsp;Jacques.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Feb 2018 16:36:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Sensors/MMA9551-problem-to-read-raw-XYZ-asis-data-using-AFE-appllication/m-p/777908#M5030</guid>
      <dc:creator>JackITB</dc:creator>
      <dc:date>2018-02-21T16:36:49Z</dc:date>
    </item>
  </channel>
</rss>

