cancel
Showing results for 
Search instead for 
Did you mean: 

Can the LSM6DSM replace the LSM6DS3 with no code changes?

AAllg.1
Associate

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Eleon BORLINI
ST Employee

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

View solution in original post

2 REPLIES 2
Eleon BORLINI
ST Employee

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.1
Associate

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