cancel
Showing results for 
Search instead for 
Did you mean: 

lsm6dsv320x WHO_AM_i

fk
Associate II

We're looking to use the lsm6dsv320x in our product. I'm using this senser on the on the STEVAL-MKI247A adapter board for testing. We're currently in development using the adapter board with the Nordic nRF52840DK board. I'm having issues with getting the correct value from the WHO_AM_I with certain SPI pin configurations on the nRF52840DK. I can only get one SPI configuration to output the correct value of 0x73 which is SPI1. If I try change the pins or use one of the other SPI's available on the 52840, I consistently get a value of 0x64. Does that value mean anything to anyone? I've tried lowering the frequency to 500kHz, tried all four of SPI modes, I've tried performing a reset using the FUNC_CFG_ACCESS and CTRL3 registers before reading the WHO_AM_I register, but I still get the value of 0x64 except with the one configuration mentioned. I'm using the ST fsm_example for this test. We would like to change the SPI pins as the we want to use the smaller package of the nRF52840 which doesn't have some of the default pins for this SPI! bus. I've looked at the waveforms on an analyzer and there seems to be plenty of setup and hold with the address and data. Any significance to the value of 0x64?Screenshot 2025-07-03 114225.png

17 REPLIES 17
gabriele33
Associate II
 
Andrew Neil
Super User


single_wire_zoomed.png:

AndrewNeil_0-1753180496846.png


double_wire_zoomed.png:

AndrewNeil_1-1753180540137.png

 

What's the significance of "single wire" and "double wire" ?

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

Yep sorry, single wire is a single jump wire between the dk and the steval. double wire is a double jump wire connected in series between dk and steval to have a longer connection. The difference is only on the SDO/MISO line.

I want to show you a new screenshot. This time I removed the "clock stretching" changing how I call spi_transceive in zephyr os (it was tx 1 byte and rx 2 bytes now it is both 2 bytes, I don't know why in the previous configuration there was a clock stretching). I removed the pull up on the mcu side.

RigolDS1.png

The curios thing is that I have another breadboard with another steval (iis2dh) and it works fine connected on the same bus in place of this one we are discussing.

tjstone14
Associate

I have also seen this issue intermittently with the lsm6dsv320x (STEVAL-MKI251A) connected via jumper wires to a nRF54L15 dev kit.  I think it is a timing issue.  If I read the WHO_AM_I register immediately at power on, I get a 0x73.  However, if I delay slightly (~20 msec) before reading, I get 0x64.

I am also facing exactly same issue with mk1251 kit used with three different st controllers .

tjstone14
Associate

I am able to work around the issue by switching from SPI to I2C. 

mshioji
Associate

Hello, 

I'm experiencing the same issue with LSM6DSV320X (on STEVAL-MKI251A evaluation board) - WHO_AM_I returns 0x64 instead of 0x73 when using SPI.

My Setup:

  • Sensor: LSM6DSV320X (STEVAL-MKI251A board)
  • MCU: xiao ESP32S3
  • Interface: 4-wire SPI, Mode 3 / Mode 0

Interesting finding:

While testing with external pull-up/pull-down resistors on the SPI lines to see if it would affect the communication, I noticed something unusual:

When I physically touch the SCK line (even through the resistor lead), the WHO_AM_I register occasionally returns the correct value 0x73 instead of 0x64. This behavior is inconsistent and seems to depend on skin moisture/capacitance.

  • External resistors (1kΩ - 10kΩ) alone have NO effect
  • Only human touch changes the behavior
  • The effect is not always reproducible

This suggests the issue might be related to:

  • Signal integrity / impedance matching on SCK
  • Rise/fall time requirements
  • Capacitive loading effects


    I have recorded a video showing the oscilloscope waveform changes and WHO_AM_I value changes when touching/not touching the SCK line with the breadboard setup. (attached)


    waveform.jpg

    Has anyone else observed similar behavior? Could this indicate a PCB design issue with the STEVAL-MKI251A board, or perhaps specific signal conditioning requirements for the LSM6DSV320X SPI interface?

    Any insights would be appreciated.

    Thank you,

That is so weird. Thanks for posting the video.

If you feel a post has answered your question, please click "Accept as Solution".