2023-02-09 03:20 AM
I have a custom PCB with a LSM6DSM accelerometer and it's being controlled with a nRF52 running Zephyr. The Zephyr RTOS sensor libraries only have LSM6DSL and LSM6DSO devicetrees. According to the initialzation functions it's communicating correctly, but the readings come out very wrong, sometimes it's all zeros, sometimes it's 0.004, very weird in my opinion. At first I considered it could be damage to the board, but testing on multiple PCBs still gives out that same result. I asked about it on the Nordic forum and the answer I got was to firstly check with ST if the LSM6DSM module is fully compatible with the LSM6DSL command set, and if not which LSM6 could be more campatible. I did take a look on the datasheet and it seems to be compatible.
2023-02-14 08:29 AM
Hi @BKrug.1 ,
The two parts share the same configuration (see for example lsm6dsl_read_data_polling.c and lsm6dsm_read_data_polling.c), and the sensitivity re the same too, so the issue might be at higher level, with the nRF52 Zephyr libraries...
-Eleon