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.

How can we get the accelerometer's data of the board DRV2667?

Other Parts Discussed in Thread: DRV2667

Hi,

We want to use our accelerometer of our DRV 2667 evaluation module, but we don't have informations about it, and the code doesn't work (we use Code Composer).
We would like to now if it is operationnal or disable. Should we use an extern accelerometer instead? 

Thank for your answer,

  • Hi Benot,

    Using an external accelerometer is preferable. The onboard accelerometer (ADXL345) on the DRV2667 is disabled.

    Please let us know if you have further questions.

     Regards,

    Gautham

  • Hi,


    Considering your answer, we bought an external accelerometer (ADXL345 : https://www.sparkfun.com/datasheets/Sensors/Accelerometer/ADXL345.pdf). We tried to use the file "accelerometer.c" of the DRV2667 EVM CT.

    When we include the function accelerometer_init (), in the main function, our module doesn't work and we have to reboot it.

    We would like to know if the function "accelerometer.c" is adapted with an external accelerometer.

    Thank you for helping us,

    Best regards,

    Benoit

    Our function :

    void Accelerometer_Init()
    {
        uint8_t accelMeasurement[7];

        Accelerometer_SetClocks();

        I2C_SetSlaveAddress(ACCEL_ADDR);            // Set accelerometer slave address

        Accelerometer_PowerOn();                    // Power on accelerometer
        I2C_WriteSingleByte(THRESH_ACT, 75);        // 62.5mg per increment
        I2C_WriteSingleByte(THRESH_INACT, 75);        // 62.5mg per increment
        I2C_WriteSingleByte(TIME_INACT,10);            // Inactive after 10s of no activity

        Accelerometer_SetActivityAll(1);

        I2C_WriteSingleByte(THRESH_TAP, 0x40);        // 4G
        I2C_WriteSingleByte(THRESH_ACT, 0x40);        // 4G
        I2C_WriteSingleByte(BW_RATE, 0x0D);            // 400Hz bandwidth
        I2C_WriteSingleByte(DATA_FORMAT,0x01);        // 4G range
        I2C_WriteSingleByte(FIFO_CTL, 0x5F);        // FIFO mode, 32 sample trigger

        I2C_ReadMultiByte(DATAX0,6,accelMeasurement);    // Read data
        CapTouch_ButtonLEDOnSequence();
        I2C_ReadMultiByte(DATAX0,6,accelMeasurement);    // Read data

        Accelerometer_ResetClocks();
    }