This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2650 Configuration movement issue

Other Parts Discussed in Thread: CC2541, CC2650, BLE-STACK

Hello everyone, 

I'm a beginner with the CC2650 and I'm trying to get the movement data in my app Previously I worked with the old sensorTag(CC2541)  we had a different service for every movement sensor (accelerometer, gyro, magneto) but now it seem to be all in one service : movement service (AA81, AA82, AA83)

The problem is when I try to manager the configuration (AA82), with the help of the  wiki : processors.wiki.ti.com/.../CC2650_SensorTag_Usxer's_Guide#Configuration

I just dont understand this : One bit for each gyro and accelerometer axis (6), magnetometer (1), wake-on-motion enable (1), accelerometer range (2). Write any bit combination top enable the desired features. Writing 0x0000 powers the unit off.


For exemple, for the tempetature's configuration I just have my byte array with 0x01 to enable the data collection

byte[] enableSensor = new byte[1];
enableSensor[0] = 0x01;

So my question is : what's the format of the configuration, for example, get the x y z axis accelerometer and then get the data

Thank you all in advance !

Regards

  • Hi,

    Have you taken a look at the Android source code? Also, taking a sniffer trace would probably help understand how it's set.

    Best wishes
  • Yes I saw the android source code : git.ti.com/.../sensortag

    And this is what I saw :
    0: disable, bit 0: enable x, bit 1: enable y, bit 2: enable z
    So we have 3 bytes, but in the wiki, they say we have only 2

    And this one in JS : github.com/.../app.js

    And what he wrote seem to be different than the wiki :

    // Set accelerometer configuration to ON.
    // magnetometer on: 64 (1000000) (seems to not work in ST2 FW 0.89)
    // 3-axis acc. on: 56 (0111000)
    // 3-axis gyro on: 7 (0000111)
    // 3-axis acc. + 3-axis gyro on: 63 (0111111)
    // 3-axis acc. + 3-axis gyro + magnetometer on: 127 (1111111)

    I have different information for the same thing, and get little bit lost

    Thank you for your help ! :)
  • In the code sensor_mpu9250.h (BLE-Stack 2.1):
    // Axis bitmaps
    #define MPU_AX_GYR 0x07
    #define MPU_AX_ACC 0x38
    #define MPU_AX_MAG 0x40
    #define MPU_AX_ALL 0x7F

    You can follow the code in the SDK :)

    Best wishes
  • Thank you for your help ! :)

    How do I access to the sdk the BTool ? to check the sensor_mpu9250.h, I still looking for the range's configuration ( 2, 4, 8, 16) for the accelerometer.

    I thought may be something like that :

    byte[] enableSensor = new byte[2]; // 2 bytes
    enableSensor[0] = 0x7F; // enable all
    enableSensor[1] = 0x01; // 4G range

    regards,