• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Low Power RF & Wireless Connectivity » Low Power RF Bluetooth® Low Energy & ANT Forum » cc2540 accelerometer
Share
Low Power RF & Wireless Connectivity
  • Forums
  • Announcements
  • Files
  • E2E Wiki
Options
  • Subscribe via RSS

Forums

cc2540 accelerometer

This question is not answered
hazmel ilyas
Posted by hazmel ilyas
on Jun 07 2011 15:11 PM
Prodigy40 points

Hi,

I just bought the CC2540 MDK, and I am currently try to figure the precision of the accelerometer ? From what I understand, the accelerometer now is in a mode that measures 'tilt', so I was wondering is there any way for the accelerometer to measure " movement acceleration" instead of "tilted acceleration". By the way when I opened the cma3000d.c file,  I found that the accelerometer is in "Measurement mode" (MEAS 100HZ, range 2g), and I believe the "Motion detection mode" is limited because it is band pass filtered, therefore we will not be able to get real data. Plus, I also did not see any parameter that related with "tilted" either in the data sheet or  cma3000d.c file, forgive me if I'm wrong since I am new to this device. I would really appreciate for any help.

Regards.

 

CC2540 CC 2540 CC2540DK-MINI C2540
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • GregS
    Posted by GregS
    on Jun 09 2011 13:09 PM
    Expert4165 points

     

    Hello,

    I believe you are familiar with keyFobDemo -  but this is different that what you are trying.

    http://processors.wiki.ti.com/index.php/Category:KeyFobDemo

    Maybe there is more info at

     VTI's web site: http://www.vti.fi/en/products/accelerometers/consumer_electronics/cma3000_series/

    -Greg

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • hazmel ilyas
    Posted by hazmel ilyas
    on Jun 09 2011 15:39 PM
    Prodigy40 points

    Hi Greg,

    Thanks for replying. By the way,I already downloaded the source code from keyFobDemo and in the cma3000d.c file, it shows that the accelerometer is "measurement mode" as it is described in the data sheet that I downloaded from the VTI's web site. However from this previous discussion, http://e2e.ti.com/support/low_power_rf/f/538/p/110761/394353.aspx#394353, it seems there is a mode for the accelerometer to measure movement which I am not sure how to change to that mode.


    Regards.

    CC2540 CC 2540 CC2540DK-MINI C2540 CC2540 development cc2540 current driver code
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Radu Iorgulescu
    Posted by Radu Iorgulescu
    on Mar 14 2012 17:20 PM
    Prodigy50 points

    On the subject of the accelerometer found in the keyfob of the CC2540 Mini DK (BLE stack 1.2)

    I am able to read the Characteristic Value Handle for the UUIDs:

    ACCEL_ENABLER_UUID         0xFFA1   (0x0033)   and

    ACCEL_RANGE_UUID              0xFFA2  (0x0033)

    unfortunately, when I try to discover the handles for 

    ACCEL_X_UUID                  0xFFA3
    ACCEL_Y_UUID                  0xFFA4
    ACCEL_Z_UUID                  0xFFA5

    I get  a status of "READ_NOT_PERMITTED"

    same for the keys UUIDs. Also, writing to the attribute handles (say, 0x0035) results in a "WRITE_NOT_PERMITTED" status.

    What am I doing wrong?

    Thank you for your help

    Radu

    Accelerometer CC2540DK CC2540DK-MINI cc2540 uuid CC2540 Keyfob keyfob
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Misael
    Posted by Misael
    on Mar 14 2012 18:42 PM
    Intellectual490 points

    Radu Iorgulescu

    unfortunately, when I try to discover the handles for 

    ACCEL_X_UUID                  0xFFA3
    ACCEL_Y_UUID                  0xFFA4
    ACCEL_Z_UUID                  0xFFA5

    I get  a status of "READ_NOT_PERMITTED"

    The characteristics of the UUIDs for the accelerometer axes are set to notify only. In order for you to read any UUID set to a notify characteristic, you have to read the next address of the register for the corresponding handle. For instance, using the BLE Stack v1.2, you can discover that the handles for the axes are as follows.

    ACCEL_X_UUID                  0x0039
    ACCEL_Y_UUID                  0x003D
    ACCEL_Z_UUID                  0x0041

    If you want to read the x-axis value, you have to read 0x003A (which is one register after 0x0039). For the y-axis, it's 0x003E and for the z-axis, 0x0042.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Radu Iorgulescu
    Posted by Radu Iorgulescu
    on Mar 15 2012 09:31 AM
    Prodigy50 points

    Thanks Misael. All clear.

    I can see the UUID handle in the reply itself; I was expecting the characteristic value handle to be filled automatically as result of my discovery request.

    I also understand the "characteristic configuration" concept and the need to write at characteristic-value_handle + 1 to enable the accel. axis notifications.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Armando Barbedo
    Posted by Armando Barbedo
    on Apr 12 2012 08:43 AM
    Prodigy240 points

    I also followed all the steps and checked multiple forums treads on this topic, but I still read 00 from any of the accelerometers. I have successfully written 01 to 0x0033 (handle for 0xFFA1). I thought I had to specify a range (ACCEL_RANGE_UUID, 0xFFA2, handle 0x0036), but the parameter does not accept any writing. Even if it did, I would not know what number to use. The stack is correct and the keyfob has the proper firmware, since I can confirm it with my iphone. What am I missing or doing wrong? 

    Thank you in advance!

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Misael
    Posted by Misael
    on Apr 12 2012 12:56 PM
    Intellectual490 points

    Armando Barbedo

    I also followed all the steps and checked multiple forums treads on this topic, but I still read 00 from any of the accelerometers. I have successfully written 01 to 0x0033 (handle for 0xFFA1).

    So you are not seeing notification updates on occurring on your iPhone? I can see BTool v1.20c auto updating values (through notifications) when I rotate the keyfob to engage the accelerometer after running these steps. Can you check to see if you can at least see the transmission through BTool?

    Armando Barbedo

    I thought I had to specify a range (ACCEL_RANGE_UUID, 0xFFA2, handle 0x0036), but the parameter does not accept any writing. Even if it did, I would not know what number to use.

    The way TI set up this profile, they only allow you to read the current "range" of the accelerometer, or the sensitivity of the accelerometer (2G or 8G). The only way that I know of to change this setting is to update the firmware manually by setting static uint16 accelRange = ACCEL_RANGE_8G; instead of the 2G parameter.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Armando Barbedo
    Posted by Armando Barbedo
    on Apr 12 2012 14:59 PM
    Prodigy240 points

    Thank you for the clarification about the range.

    My comment about the iphone was to make clear that everything works with the keyfob. The accelerometer responds properly, the buzzer responds to the command, and the buttons update the status in the app. What I am unable to do is to read any accelerometer data through BTool. I know I have to enable the accelerometer, but I am not sure I am doing it right and whether I am missing an additional step.

    Thank you!

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Misael
    Posted by Misael
    on Apr 12 2012 15:18 PM
    Intellectual490 points

    Check to make sure that you are also enabling notifications for each axis as well as enabling the accelerometer in BTool. Write 01:00 to characteristic handles 0x003A, 0x003E, and 0x0042. If that isn't enough, then the only other thing I would suggest is that you check to see if you are using the latest revision of BTool, or at least a 1.2 revision. I have seen in other posts about issues arising with people using the new BLE stack (1.2) with older versions of BTool (prior to 1.2). Hope that helps.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Armando Barbedo
    Posted by Armando Barbedo
    on Apr 12 2012 17:38 PM
    Prodigy240 points

    Misael, you're the man! It works! Thanks a lot!

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use