cancel
Showing results for 
Search instead for 
Did you mean: 

X-CUBE-MEMS1 is working for I2C interface. But X-CUBE-MEMS1 is not working for SPI interface.

Rajesh1
Associate II

Hi,

We are using ISM330DLC MEMS sensor in our project and trying to interface sensor using X-CUBE-MEMS1 library.

In configuration parameters, SPI module is not visible. Please suggest how to configure X-CUBE-MEMS1 library to interface using SPI module.

Regards,

Rajesh K.

1 REPLY 1
Eleon BORLINI
ST Employee

Hi @Rajesh​ ,

the libraries of the X-CUBE-MEMS1 (in the folder \Middlewares\ST) are platform independent, so their functions can be called from any project and can be fed by any accelerometer or gyroscope data stream.

On the other side, the projects in the X-CUBE-MEMS1 platform are not platform or device independent, so the corresponding .ioc files are configured with the I2C lines enabled because reference platform (STEVAL-IKS0xAy) use this communication protocol. But if in your project you have connected the SPI lines to your application processor, you can acquire the data and then call the platform independent functions / algorithm. already configured for the SPI data acquisition of the sensor you want to use, i.e. the ISM330DLC in combination with the X-CUBE-MEMS1 libraries (right?)

As a side point, please note that the libraries in \Middlewares\ST are given in binary format, and to modify them you have to consider that the release of STM proprietary libraries is subject to signature of a License User Agreement (LUA); you should this way contact a STMicroelectronics sales offices and representatives for further information.

-Eleon