cancel
Showing results for 
Search instead for 
Did you mean: 

How can I connect STEVAL-MKI207V1 over I2C, with Ti LaunchPad?

HarshC
Associate

Hello ST Community Experts,

I am completely beginner here. We have purchased STEVAL-MKI207V1 for Accelerometer, Ti MSP432 as MCU. We wanted to connect both over I2C. But facing some problems.

STEVAL-MKI207V1 Kit has ISM330DHCX sensor. I checked datasheets for Adapter board and for Sensor. But little confused regarding I2C Connection.

  1. Could not find I2C Address easily for ISM330DHCX in its datasheet. (assumed WHO_AM_I register's value - 6Bh, we could be totally wrong regarding this assumption but scanned via I2C Scanner and found its address as 0x6b so assumed after checking in datasheet). So how we can find any I2C address in datasheet?
  2. How we can connect both modules over I2C and program it to get 3-axis data to MSP432. (What registers should be set to achieve data acquisition over I2C connection.)
  3. Was this a good idea to purchase this adapter board STEVAL-MKI207V1 for collaboration with Ti's MSP432 LaunchPad? (As we are experimenting)

Please anyone can help with this problem. Or at least guide us something about where we were wrong or how we can start?

2 REPLIES 2
Eleon BORLINI
ST Employee

Hi @HarshC​ ,

1.As you can see from the table below (you can find it at p.38 of ISM330DHCX datasheet), the SAD is composed by 3 parts, and the proper I2C slave address is the SAD+SA0. So the two possible I2C address values are 6Ah and 6Bh. SA0 value is determined by the PIN 1 hardware status (if SA0 at GND, the value is 0, while if SA0 at Vdd, the logical value is 1). So in your case the SA0 pad should be at Vdd.

0690X00000DXHDPQA5.png

2. You can base your code on the standard C drivers on github repository, both for standard drivers and examples, at this link. Btw, consider that for STM32 MCU family there are plenty of dedicated FW examples and libraries (FP-SNS-ALLMEMS1, FP-AI-SENSING1, etc), especially if you are oriented to the IoT world and potentially to the AI environment. For I think you should ask to TI community on how to program MSP432...

3. See point number 2 😉

Regards

Thank you very much, Eleon BORLINI,

For your kind and prompt help. I really appreciate.

Actually we tried to interface STEVAL-MKI207V1 (Sensor Part: ISM330DHCX) with ESP8266, over I2C, using Arduino, Wire and Adafruit's libraries. In that implementation, we got to succeed in getting ISM330DHCX's register values (like reading or writing to register through I2C). Also it's successfully connected and working fine as Accelerometer and giving valid X, Y, Z Axis output data.

But when we are trying to interface it with Ti MSP432 LaunchPad (using same setup and technique, used for ADXL345 Accelerometer, successfully), the result is nothing. It even fails to read (WHO_AM_I) register's value at 0x0F while I2C reading. I can't understand this behavior. I know problem will be something little. But I am thinking whether I should do any preprocessing before accessing it in MSP432, or maybe is it locked/powered down by default, and in Arduino Wire library they do all preprocessing in background, hence working there without any problems.

Excuse my confusion, but I am trying hard for many days to get exact I2C read/write commands to get 3-axis data, for interfacing it with MSP432. We also crafted these Read/Write Steps for getting 3-axis data, by reading ISM330DHCX's datasheet. If anyone expert like you, can validate it.

STEP 1-

Write 0x84 (1000 0100 b) in CTRL3_C (12h) register

STEP 2-

Write 0x01 (0000 0001 b) in INT1_CTRL (0Dh) register

STEP 3-

Write 0x01 (0000 0001 b) in INT2_CTRL (0Eh) register

STEP 4-

Write 0x60 (0110 0000 b) in CTRL1_XL (10h) register // 417Hz

STEP 5-

Write 0x06 (0000 0110 b) in FIFO_CTRL3 (09h) register

STEP 6-

Write 0x00 (0000 0000 b) in CTRL4_C (13h) register

Write 0x00 (0000 0000 b) in CTRL5_C (14h) register // if accelerometer self-test is to be enable then CTRL5_C=0x01

Write 0x00 (0000 0000 b) in CTRL6_C (15h) register

Write 0x00 (0000 0000 b) in CTRL7_G (16h) register

Write 0x00 (0000 0000 b) in CTRL8_XL (17h) register

Write 0x00 (0000 0000 b) in CTRL9_XL (18h) register

Write 0x00 (0000 0000 b) in CTRL10_XL (19h) register

(Wait 100ms for set up)

STEP 7-

Monitor (Check) XLDA bit (i.e. 0th bit) of STATUS_REG (1Eh) /STATUS_SPIaux (1Eh) register If XLDA bit is set only then go to step 8

STEP 8-

Read OUTX_L_A(28h), OUTX_H_A(29h) Read OUTY_L_A(2Ah), OUTY_H_A(2Bh) Read OUTZ_L_A(2Ch), OUTZ_H_A(2Dh)

(Linear acceleration sensor X-axis, Y-axis, Z-axis output register (r). The value is expressed as a 16-bit word in two’s complement.)

Thanks.