Skip to main content
Visitor II
March 14, 2019
Question

SPI Stopped Working

  • March 14, 2019
  • 3 replies
  • 955 views

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!

    This topic has been closed for replies.

    3 replies

    ST Employee
    March 14, 2019

    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

    CJohaAuthor
    Visitor II
    March 14, 2019

    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

    Visitor II
    March 14, 2019

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

    CJohaAuthor
    Visitor II
    March 14, 2019

    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