Skip to main content
Associate III
January 25, 2025
Question

Stm32f407 interface with IIS3DWB using X-CUBE-MEMS1

  • January 25, 2025
  • 3 replies
  • 869 views

Hi

I need guidance on how to write the logic for interfacing the STM32F407 with the IIS3DWB vibration sensor after installing the X-CUBE-MEMS1 package and selecting SPI2 to generate the code.

This topic has been closed for replies.

3 replies

Andrew Neil
Super User
January 25, 2025

Have you checked the documentation for X-CUBE-MEMS1 ?

https://www.st.com/en/embedded-software/x-cube-mems1.html#documentation

UM1859Getting started with the X-CUBE-MEMS1 motion MEMS and environmental sensor software expansion for STM32Cube sounds like the place to start ...

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Kumar123Author
Associate III
January 25, 2025

Hi 

"I installed the X-CUBE MEMS1 package and configured SPI2 in the STM32. I generated BSP packages and generated the IIS3DWB source and header files. After writing the code (which I've attached here), the sensor is not vibrating. Could you provide some suggestions?"

ST Employee
January 31, 2025

Hello @Kumar123,

You can refer to the SPI_ACCEL_ComPolling example available in STM32CubeH7RS with the NUCLEO-H7S3L8. It may assist you in your implementation.

I hope my answer has helped you. When your question is answered, please select this topic as solution that answered you, it will help others find that answer faster.

Thanks for your contribution.

Dor_RH

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Dor_RH