cancel
Showing results for 
Search instead for 
Did you mean: 

SPI Stopped Working

CJoha
Associate II

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!

4 REPLIES 4
Eleon BORLINI
ST Employee

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

CJoha
Associate II

Hi Eleon,

  1. Restarting the board does not help
  2. I used the same IIS2DH accelerometer with both boards.
  3. Other than the SPI everything else on the board seem to work

S.Ma
Principal

Use an oscilloscope and monitor NSS, MISO, MOSI, SCK, GND of sensor and Vdd of sensor.

CJoha
Associate II

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