2023-05-17 12:12 AM
but i am not able to read the data in slave module, how to connect this with the host and camera module processor and read the data, is there any settings have to be mentioned.? if any one information about this it will be helpful.
Solved! Go to Solution.
2023-06-01 01:14 AM
Ciao @BGGopal ,
Each slave should have a dedicated CS (this is the SPI), if Arduino 2 is a slave, it cannot read as a master. There should be only one master which is Arduino1 and two slaves which are LSM6DSM and Arduino 2 but each with its own CS.
From Arduino1 should start a CS1 and a CS2 that go to the two slaves.
If my reply answered your question, please click on Select as Best at the bottom of this post. This will help other users with the same issue to find the answer faster
2023-05-17 06:32 AM - edited 2023-11-20 05:17 AM
Hi @BGGopal ,
Welcome to ST Community!
In order to enable the OIS chain you need to set register 70h bit OIS_EN_SPI2:
Then set Full scale and ODR depending on the Mode you choose:
If this solves your problem, please mark my answer as "Best Answer" by clicking on the "Select as Best" button, this can be helpful for Community users to find this solution faster.
2023-05-23 07:54 AM - edited 2023-11-20 05:17 AM
Hi @Federica Bossi
Thanks for your response. I totally get your response for how to enable the OIS chain by setting the register in 70h.
But I am interested in this diagram below. (at the end)
In the application note AN4987 , section 8.2 it states that
```
The primary I2C/SPI (3/4-wire) interface is always available and the gyroscope output values can be read in registers 22h to 27h with full scale and ODR selectable through the CTRL2_G register
```
So, i am trying to connect two processors , to the LSM6DSM, through one I wanted to enabling the OIS ( through auxillary spi) and through other controller i wanted to read the the values. I tried using 2 Arduino UNO boards, so how to do this.
I followed the connection setup given below, but still I couldn't get the output. How to make the connection for this process and is there any other settings to be made for reading in primary spi.
Thanks and Regards
2023-05-26 05:20 AM
Hi @BGGopal ,
Am I correct in saying that you want to read the OIS data through the primary interface? if this is the case, it is not possible, the OIS data are accessible only from the auxiliary SPI, you can still read the data coming from the gyroscope via the registers OUTX_G OUTY_G OUTZ_G.
If my reply answered your question, please click on Select as Best at the bottom of this post. This will help other users with the same issue to find the answer faster :)
2023-05-31 05:36 AM - edited 2023-11-20 05:18 AM
Hi @Federica Bossi
Again Thank you for Your response. I got that, I can't read the OIS data through Primary SPI.
Is it possible to connect multiple Slaves in Auxiliary SPI, in my application (demands), from I have one master (Arduino 1) and 2 slave device( LSM6DSM & 'Arduino 2 ') , I want to enable OIS operation via master (Arduino 1) to slave device( LSM6DSM) and read the OIS Gyro value in Slave device (Arduino 2). Is it possible to connect and read the OIS value as given in circuit below. I have been trying on this. Please suggest or guide me if anything I might be missing
2023-06-01 01:14 AM
Ciao @BGGopal ,
Each slave should have a dedicated CS (this is the SPI), if Arduino 2 is a slave, it cannot read as a master. There should be only one master which is Arduino1 and two slaves which are LSM6DSM and Arduino 2 but each with its own CS.
From Arduino1 should start a CS1 and a CS2 that go to the two slaves.
If my reply answered your question, please click on Select as Best at the bottom of this post. This will help other users with the same issue to find the answer faster
2023-06-25 10:14 PM
Thank You @Federica Bossi , i was able read the same using a Bi-directional Logic level converter, Because arduino was on 5v and sensor was on 3.3v. And from your suggestion, used diff cs pin.
2023-06-25 10:17 PM
@Federica Bossi , but now i am wondering how to configure and connect the device for 3wire mode. Any way i will open that as a new thread.
Thanks and Regards