cancel
Showing results for 
Search instead for 
Did you mean: 

How to communicate by I2C the LIS3DH sensor with the MKI109V3 evaluation board?

CVega.1
Associate

I need to communicate by I2C my board that contains the LIS3DH accelerometer with the MKI109V3 adapter board. In order to evaluate if the sensor readings are correct.

From what I understand, the MKI109V3 evaluation board allows communication via SPI and I2C. But, still not able to do it by I2C.

In my project I use the following signals:

SCL

SDA

While the signals:

SDO/SA0 (connected to 3V3)

CS (connected to 3V3)

0693W00000Nt78JQAR.pngAnd I am using Unico-GUI software version 9.12.0.0

And I have the following response.

0693W00000Nt78TQAR.pngI would like to know what I have to do to establish I2C communication between my board (slave) and the MKI109V3 board (master).

1 ACCEPTED SOLUTION

Accepted Solutions
Eleon BORLINI
ST Employee

Hi @Brian Rau​ ,

it is not possible, officially.

But well, there is indeed a workaround that you might use to overcome the issue of starting in SPI more. You can create a shortcut for Unico-GUI, adding in the Target (properties) the command -setcommi2c.

0693W00000StkaqQAB.pngYou can check whether it is working and see if this was the issue.

-Eleon

View solution in original post

6 REPLIES 6
Eleon BORLINI
ST Employee

Hi @CVega.1​ ,

My suggestion is to take inspiration (or copy) the schematic -or at least the connection- of the DIL24 adapter for the LIS3DH (STEVAL-MKI105V1).

0693W00000QKUInQAP.pngIn particular, I would leave the CS and the SDO/SA0 pins being driven by the Unico GUI.

-Eleon

CVega.1
Associate

For this project it is impossible, because the accelerometer communicates with other components through I2C and therefore I cannot modify the design.

Is it possible that the UNICO-GUI software allows the user to select the type of communication desired?

Is it possible to make any modification (hardware) on the MKI109v3 board to select I2C communication?

Is it possible to change some register in STM32F401VET6 to select I2C communication? And if so, how is it done?

I would greatly appreciate your help.

Brian Rau
Associate III

I believe I've run into the same or a similar issue - I have an LSM6DSO32X designed onto a board using the I2C bus for communication. The UNICO-GUI works great with the MKI109V3, and my hope was to use the MKI109V3, connect it to the I2C bus on my board and use it to collect data from and develop algorithms for the LSM6DSO32X. Unfortunately, it won't even find the device - I'm guessing it makes contact first via SPI, after which you can switch it to I2C communications. Can anyone in the ST world confirm that this is what happens?

Eleon BORLINI
ST Employee

Hi @Brian Rau​ ,

it is not possible, officially.

But well, there is indeed a workaround that you might use to overcome the issue of starting in SPI more. You can create a shortcut for Unico-GUI, adding in the Target (properties) the command -setcommi2c.

0693W00000StkaqQAB.pngYou can check whether it is working and see if this was the issue.

-Eleon

This is great, thank you! Now, is there a similar command line option to set the VDD/VDDIO voltage?

tfallon102
Associate

Hi there -

This thread looks similar to a problem that I am having.

I have the STEVAL-MKI109v3 motherboard and a STEVAL-MKI227KA (LSM6DSV16X) IMU working great with the Unico GUI.

Now, because of size constraints, I thought I could use an LSM6DSV16X chip mounted on a SparkFun board. https://cdn.sparkfun.com/assets/3/9/a/7/4/SparkFun_Micro_6DoF_LSM6DSV16X.pdf

and run that in the Unico GUI connected to the same motherboard.The SparkFun board does not support SPI, but the trick above "-setcommi2c" allows me to startup the Unico GUI in I2C communication. I thought that would do the trick, but alas, still getting the who_am_i error.

I am connecting Vcc, GND, SDA, SCL pins to the SparkFun breakout.

A couple of things I've tried that haven't seemed to work:

- remove pull up resistors on the SparkFun side.

- drive the CS and SDO/SA0 pins on the MKI109v3

 

Thanks for any help!

-Tim