Skip to main content
Visitor II
January 10, 2024
Question

LSM6DSOX Example

  • January 10, 2024
  • 2 replies
  • 1072 views

Hi, I'm developing a project with a NUCLEO-WB55RG and I need to to communicate with a STEVAL-MKI197V1. I'm using the CUBE IDE v1.13.1 and the X-CUBE-MEMS1 v10.0.0. But I'm having a problem when trying to initiate the library calling LSM6DSOX_Init function the program gives me a Hard Fault. I'm trying to use a SPI to communicate with the module.

Is there any examples I can use as guide?

 

    This topic has been closed for replies.

    2 replies

    Technical Moderator
    January 10, 2024

    Hi @matheusprom ,

    Welcome to ST Community!

    You could look at the FP-SNS-MOTENVWB1 function pack that  connects your IoT node to a smartphone via Bluetooth Low Energy (BLE) and uses a suitable Android or iOS application such as the STBLESensor app to view real-time motion, environmental (temperature, pressure and relative humidity), and Time-of-Flight sensor data.

    Let me know if this helps.

    Visitor II
    January 16, 2024

    Hi Federica,

    Thanks for your answer.

    I've been looking this function pack you suggested, but I'm having some trouble finding how to make it work with a SPI instead of the I2C. I can't use it as it is because I don't own a X-NUCLEO-IKS01A3 or a X-NUCLEO-IKS4A1, so I'm making some adaptation to communicate with my NUCLEO-WB55RG.

    Searching throught the FP-SNS-MOTENVWB1 function pack, I could understand better how it uses the lsm6dsox library. But to make it work with the SPI protocol I'll have to adapt some functions to make it works(the whole lsm library looks to work better with a I2C, as some function pointers doesn't fit for the SPI functions as it is).

    It may take some more time, but if anything appears, I'll come back here to ask you.