2020-12-01 03:08 AM
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?
2020-12-01 03:20 AM
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.
2020-12-01 04:02 AM
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.
2020-12-01 04:14 AM
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.
2020-12-02 01:51 AM
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