cancel
Showing results for 
Search instead for 
Did you mean: 

I am using LSM6DSOX sensor with STM32WB55CG microcontroller. I am using LSM6DSOX with SPI interface with INT1 enabled as Data ready interrupt and INT2 enabled as Activity detection interrupt. Accelerometer reading stops after a continuous time of reading.

ASiva.1
Associate III

It correctly reads expected values for about 4 hours and then goes to undetected state by SPI. Then IMU does not work even after I reset the microcontroller. IMU only works again after I power off and on the system again. What could be the reason and solution for this?

4 REPLIES 4
Ozone
Lead

Wouldn't you suppose a problem in your firmware ?

Like a stack overflow, dangling pointer access, or race condition, causing a fault ?

Either try the debugger, set breakpoints in suspected fault handlers and work your way backwards (analysing the fault registers).

Or instrument your firmware, and log the output via another available channel in your system.

ASiva.1
Associate III

Yes. I supposed a problem in the firmware. I set the break points in the fault handlers and tested it and the firmware does not run into any fault handlers. But, the accelerometer reading stopped working and the firmware continuously runs without going into fault handlers. Then, I flashed a new firmware with accelerometer reading and debugged it and it cannot even identify the LSM6DSOX. Then, after I power reset the board I was able to get the readings correctly again.

Yes. I supposed a problem in the firmware. I set the break points in the fault handlers and tested it and the firmware does not run into any fault handlers. But, the accelerometer reading stopped working and the firmware continuously runs without going into fault handlers. Then, I flashed a new firmware with accelerometer reading and debugged it and it cannot even identify the LSM6DSOX. Then, after I power reset the board I was able to get the readings correctly again.

Eleon BORLINI
ST Employee

Hi @ASiva.1​ ,

is the LSM6DSOX the only device that stops to work in your STM32WB55CG application?

If you think it's not a firmware issue, did you try to change the configuration registers (e.g. ODR, working mode), or the reading way (e.g. from synchronous with the DRDY interrupt to polling mode) on LSM6DSOX? Just for checking if it could be an IMU-related issue.

-Eleon