Skip to main content
Visitor II
November 1, 2022
Solved

Can the LSM6DSM replace the LSM6DS3 with no code changes?

  • November 1, 2022
  • 2 replies
  • 1285 views

We've been using the LSM6DS3 for several years, and are considering a switch to the LSM6DSM. It appears they are pin-compatible, and a superficial look at the register descriptions indicates they could be software-compatible as well, i.e. I could swap the ...DSM onto the same PCB and it may work out of the box.

Sadly, my SMT reworking skills aren't yet up to the task of swapping the ICs on a board, and I'd prefer not to spend half a day comparing the datasheets line by line, so I'm hoping somebody can answer the question off the top of their head: can I swap out the LSM6DSM on this board and expect it to work without changing my code at all? I'm not doing anything fancy with it, just setting ODRs, ranges, and using the FIFO.

EDIT: I *did* manage to rework a board, and I2C communication appears to be working, but the data isn't yet flowing. It's possible that the INT line somehow isn't connected while the rest of them are.

    This topic has been closed for replies.
    Best answer by Eleon BORLINI

    Hi @Community member​ ,

    they are both HW and SW compatible, but I invite you to compare the C sample code on Github for both devices: lsm6ds3_reg.h and lsm6dsm_reg.h.

    Check also if you have well configured the LSM6DSM --> lsm6dsm_read_data_polling.c

    -Eleon

    2 replies

    ST Employee
    November 4, 2022

    Hi @Community member​ ,

    they are both HW and SW compatible, but I invite you to compare the C sample code on Github for both devices: lsm6ds3_reg.h and lsm6dsm_reg.h.

    Check also if you have well configured the LSM6DSM --> lsm6dsm_read_data_polling.c

    -Eleon

    AAllg.1Author
    Visitor II
    November 7, 2022

    Thank you! I was able to reflow it again today, and confirmed that it does work.