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.

cc2541evm

Guru 13485 points

I am testing some code on the SensorTag and I have noticed that in the part list  and the schematics it is noted that the accelerometer is KIONIX KXTJ9-1007, but when I look at the code supplied with the CC2541EVM I can see that the register addresses match a different accelerometer - KXTF9-4100.

 

Is the mistake in the schematics or the code.

I would like to use the example and add my own code – will the accelerometer work?

 1234.cc2541 Presentation1.pptx

 

  • The registers are no problem and the accelerometer definitely works. You can find the following register mapping in spec

    #define ACC_REG_ADDR_XOUT_L            0x06 // R
    #define ACC_REG_ADDR_XOUT_H            0x07 // R
    #define ACC_REG_ADDR_YOUT_L            0x08 // R
    #define ACC_REG_ADDR_YOUT_H            0x09 // R
    #define ACC_REG_ADDR_ZOUT_L            0x0A // R
    #define ACC_REG_ADDR_ZOUT_H            0x0B // R

  • Hi

    The device which is used on the SensorTag board is KXTJ9-1007 – according to the schematics.

    I would like to control the wakeup threshold of the sensortag. 

    In its datasheet if the KXTJ9-1007 there is a register at address 0x6A:

    In the code this register do not appear.

    Also KXTJ9-1007 require a resistor on the ADDR input (leg 8)

    In the schematics the pin is floating:

    This make me assume that the device that is declared in the schematics and in the BOM is not the one that is actually used.

  • The ADDR pin changes the I2C slave address. This means you can have 2 of the same chip, or you can change the address in the unfortunate event another chip has the same address. It probably defaults to some value when left floating.

  • Hello Eli,

    I checked one of my SensorTag boards (rev. 1.3) and it had the KXTJ9 part mounted. 

    It might seem like there has been an update on the sensor since our initial design as you now can adjust the last bit in the address:

    "The Slave Address associated with the KXTJ9 is 000111X, where the programmable bit, X, is determined by the assignment of ADDR (pin 8) to GND or IO_Vdd."

    There is a note in the revision history for the part documentation:

    4 - Updated ADDR Pin description - 03-Dec-2012

    Just connect the ADDR line high to get the address 0x0F. It should work.

  • Hi Eli,

    We actually started the SensorTag development using the KXTF9 (hence the reference in FW) then we changed to KXTI9 which is pin compatible with KXTJ9, except pin 8 is NC compared to ADDR. We decided to updated to J9 just before SensorTag launch as KXTJ9 was a new part and had lower sleep current. Since we were so late in the process we didn't update the PCB since it worked having the pin floating.

    /delete

  • I have looked at the SensorTag board I have and KXTJ9 is mounted.

    If I want to update the wakeup threshold on the KXTJ9 (which is mounted) I need to configure register at address 0x6A.

    In the Sensortag code, which I got, the registers are aligned with KXTI9 and the wakeup register address is 0x5A.

    Also see the header of the code which specify the supported accelerometer :

     

     

    There are other registers that are not aligned with KXTJ9.

    Is there a newer version of the sensortag code which supports the KXTJ9?

    I guess the code works because these registers are not used in the example functionality.

  • Hello Eli,

    I don't think we have updated code. But it looks fairly easy to just update the defines and functions yourself.