2023-06-26 02:37 AM - edited 2023-06-26 04:48 AM
Hi mates,
Today I came with some interesting observation, I Was working with LSM6DSM sensor interface with Arduino and writing the driver code for same. I was able to achieve 4 - wire communication between Arduino and Gyro using a logic level shifter. But, I am not able to achieve same, for 3 wire. My connections for 3-wire or like this,
Also I have Updated the 3-wire config register in the 70h register, I am Enabling SIM_OIS, 500dps [ FS1-0], and OIS, so I am writing 0x25 in 70h. What I am receiving is 0xFFs as the device ID, and -1 , -1 , -1 as x, y and Z value.
Also when I short MOSI and MISO with 2.2k resistor, my device ID is detected as 0x80h and getting a -32640, -32640, -32640 as x, y and Z value.
, So , i am not sure what else i am missing here, so basically my question is , how to connect LSM6DSM in 3-wire mode. If any help provided by any will be helpful. @Federica Bossi
Thanks and Regards
Solved! Go to Solution.
2023-06-27 01:38 AM
Hi @BGGopal ,
Here my answers to your questions:
If my reply answered your question, please click on Accept as Solution at the bottom of this post. This will help other users with the same issue to find the answer faster :)
2023-06-26 05:41 AM
Hi @BGGopal ,
This is not the best way to connect SPI3w to Arduino, by the way if you want to use these configuration, I suggest you to increase the value of the pull up resistances.
If this solves your problem, please mark my answer as "Best Answer" by clicking on the "Accept as Solution" button, this can be helpful for Community users to find this solution faster.
2023-06-26 09:44 PM
@Federica Bossi wrote:Hi @BGGopal ,
This is not the best way to connect SPI3w to Arduino, by the way if you want to use these configuration, I suggest you to increase the value of the pull up resistances.
If this solves your problem, please mark my answer as "Best Answer" by clicking on the "Accept as Solution" button, this can be helpful for Community users to find this solution faster.
Thank you for the response.
1. Then what is the best way to connect SPI3w to Arduino. Leaving the MOSI floating , just did not detect the presence of the Gyro LSM6DSM.
2. Increasing the resistance , will that lose the data ?.
PF the diagram for your understanding.
Thanks and regards
Bala Guga Gopal S
2023-06-27 01:38 AM
Hi @BGGopal ,
Here my answers to your questions:
If my reply answered your question, please click on Accept as Solution at the bottom of this post. This will help other users with the same issue to find the answer faster :)
2023-06-28 12:17 AM
Ciao @Federica Bossi
Thanks for the response and your help. I will check on the same, as you have suggested.