Skip to main content
Explorer
July 10, 2025
Solved

lsm6dsv320x WHO_AM_i

  • July 10, 2025
  • 12 replies
  • 1627 views

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

    This topic has been closed for replies.
    Best answer by rv_08

    It worked after opening the bridges SB36 and Sb38 over X Nucleo- IQS4A1A to avoid the conflict of two devices connected over I2c with same address of LSM6DSV320X but with different whoAmI. That's is why problem is only on I2C and not over SPI. See the Fedrcia Bossi reply on my other thread. Device is perfectly working now.

    Solved: Inconsistent whoAMI address of LSM6dsv320x on eval... - STMicroelectronics Community

    12 replies

    Super User
    July 11, 2025
    fkAuthor
    Explorer
    July 11, 2025

    fk_0-1752255426985.png

     

    Super User
    July 11, 2025

    @fk wrote:

    I've looked at the waveforms on an analyzer 


    Does it show any difference between "working" and "non-working" cases?

     

    PS:

    Check also with an oscilloscope for any issues in the analogue domain.

    Have you checked carefully that the Nordic DK doesn't have anything attached to the "non-working" pins?

    fkAuthor
    Explorer
    July 11, 2025

    The difference between the waveforms is that it accurately shows the data value that is being received by the 52840. 0x64 which is the incorrect value and 0x73 which is the correct value. So, the waveforms are accurately showing the incorrect/correct data being produced by the lsm6dsv320x.

    Super User
    July 11, 2025

    How confident are you that it's a lsm6dsv320x chip? Does the marking on top match up? Apart from the WHO_AM_I register, does the chip behave as expected? Could just be a bad datasheet value.

     

    It looks like the STEVAL-MKI247A board comes with a different chip (LSM6DSV80X). You replaced it with this one?

    STEVAL-MKI247A - LSM6DSV80X adapter board for a standard DIL24 socket - STMicroelectronics

     

    Doubt any of that solves it, but I'm out of ideas.

    fkAuthor
    Explorer
    July 11, 2025

    Thanks for trying but yes, I have tried another module with the same result. On the 528140, the module works in one pin configuration, but not in the other pin configurations. It also works as expected using another Nordic kit, the nRF54L15. So, it seems to be something with the 54840, but I have no idea why the sensor puts out this incorrect value while the communication looks clean.

    Visitor II
    July 22, 2025

    Hello,

    I have the same board (steval mkI247AA) and I noticed the same exact issue.

    I am using a nrf2340 dk as main board and the steval is on a breadboard and I connected the dk with the breadboard using jump wires.

    I transmit 0x8f and I receive 0x64 on the second received byte. If I make a longer connection SDO -> MISO (i.e. double jumper wire), I read 0x73! And the waveform is completely different looking at the oscilloscope, it's a clear 0x64 and a clear 0x73. It's like the chip is changing is output.

    I tried both with pull up enabled and disabled on the mcu side.

    I don't know what else I can try.

    Super User
    July 22, 2025

    @gabriele33 wrote:

    the steval is on a breadboard and I connected the dk with the breadboard using jump wires..


    So loads of potential there for dodgy connections!

    Can you try with soldered connections; eg, via an X-NUCLEO-IKS4A1 or an Arduino prototyping shield?

     


    @gabriele33 wrote:

    the waveform is completely different looking at the oscilloscope, .


    Please post oscilloscope traces of both cases.

    (If at all possible, Please use the scope's screen capture, rather than photographing the screen)

    Visitor II
    July 22, 2025

    Hello,

    thanks for your reply. I attached two screenshots with the two cases, I am still with two jumper wires. I'll try with soldered connections. Yellow CS, cyan CLK, violet MOSI and blue MISO.

    Super User
    July 22, 2025


    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" ?

    Visitor II
    July 22, 2025

    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.

    Explorer
    August 29, 2025

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

    Visitor II
    August 4, 2025

    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.

    Visitor II
    August 29, 2025

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

    Super User
    October 29, 2025

    That is so weird. Thanks for posting the video.