2023-11-10 12:19 AM
Hello Team,
Recently I bought Sensortile board from ST. I tried to interface the LSM6DSM gyroscope and accelerometer sensor with STM32L476 microcontroller through SPI half duplex master, but I'm not able to read the device ID or 'Who Am I' register address in LSM6DSM. I hope SPI is working fine it seems, but not able to receive the device ID. It is returning constantly 0xFF instead 0x6A. Here I attached the source code of my project, please go through and let me know the solution to interface this module. Because of this problem I've stuck and I don't know how to proceed further, so please let me know the solution as soon as possible.
2023-11-10 05:53 AM
Hi @Saranbabu ,
Welcome to ST Community!
SPI can be tricky, but first of all, make sure that it is working by uploading one of the projects available on the board page. Then can you tell me how did you develop your project? if you used CubeMX, what configuration did you use?
Have you got a signal analyzer, so that we can see the signals of the SPI?
2023-11-14 03:04 AM - edited 2023-11-14 03:13 AM
Thanks for your reply and support.
It was working fine, we were able to see the output in mobile phone through bluetooth. We are trying to get data from LSM6DSM sensor, for that we made firmware, I hope you've gone through the source code which I've attached. Please find the attached image of cubemx configuration images for SPI communication. I've tried both the ways of SPI 4wire and SPI 3wire mode as well. Please let me know the solution to communicate with LSM6DSM.
2023-11-18 04:34 PM
Hello team,
Is there any progress on my query?. Because this issue I can't go further, please give me the solution to overcome this issue.