2019-03-14 03:29 AM
Hi,
I'm working with a STM32F401 Nucleo-64 board. The board is connected to a mems accelerometer (IIS2DH) via SPI, and I'm using the HAL library.
Everything was working good and I was able to retrieve samples from the accelerometer. Suddenly one day last week it stopped working. The only data I get from the accelerometer now is either all zeros or all ones.
I did no change to the system other than disassemble the two components and then reassemble them.
I've tried using other pins on the board for the SPI and it does not work. However, I did try the exact same configuration on another nucleo board of the same type, and it worked.
Maybe I've damaged the nucleo board somehow, but if any of you have had similar issues or any ideas I'd appreciate to hear it.
Thanks!
2019-03-14 04:29 AM
hi christian, the SPI was stuck also after restarting the Nucleo board (power off --> power on)? And when you changed the board, did you tried the same IIS2DH axl? Just to understand also id the Nucleo is still working (maybe except from the SPIs) after the stuck. Regards
2019-03-14 05:16 AM
Hi Eleon,
2019-03-14 12:03 PM
Use an oscilloscope and monitor NSS, MISO, MOSI, SCK, GND of sensor and Vdd of sensor.
2019-03-14 02:31 PM
Forgot to mention that I did try that last week.
NSS, SCK, GND and Vdd seemed to work as expected. MISO and MOSI was very noisy. This is maybe the reason why I get incorrect values, but what’s causing the noise I have no idea...
But I’m not very experienced with oscilliscopes so I might have done something wrong.
And sadly an oscilliscope is not something I’ve readily got access to