iNEMO inertial module: 3D accelerometer and 3D gyroscope.

Dependencies:   X_NUCLEO_COMMON ST_INTERFACES

Dependents:   X_NUCLEO_IKS01A3 X_NUCLEO_IKS01A3

Files at this revision

API Documentation at this revision

Comitter:
cparata
Date:
Thu Apr 15 16:12:08 2021 +0000
Parent:
5:b65c1498ae3f
Commit message:
Fix issue on INT2 event

Changed in this revision

lsm6dso_reg.c Show annotated file Show diff for this revision Revisions of this file
diff -r b65c1498ae3f -r 4774b86385e5 lsm6dso_reg.c
--- a/lsm6dso_reg.c	Tue Nov 03 16:26:58 2020 +0000
+++ b/lsm6dso_reg.c	Thu Apr 15 16:12:08 2021 +0000
@@ -9024,9 +9024,11 @@
   md1_cfg.int1_single_tap   = val.single_tap;
   md1_cfg.int1_sleep_change = val.sleep_change;
 
+  emb_func_int1.not_used_01 = 0;
   emb_func_int1.int1_step_detector = val.step_detector;
   emb_func_int1.int1_tilt          = val.tilt;
   emb_func_int1.int1_sig_mot       = val.sig_mot;
+  emb_func_int1.not_used_02 = 0;
   emb_func_int1.int1_fsm_lc        = val.fsm_lc;
 
   fsm_int1_a.int1_fsm1 = val.fsm1;
@@ -9318,6 +9320,7 @@
     int2_ctrl.int2_fifo_ovr  = val.fifo_ovr;
     int2_ctrl.int2_fifo_full = val.fifo_full;
     int2_ctrl.int2_cnt_bdr   = val.fifo_bdr;
+    int2_ctrl.not_used_01    = 0;
 
     md2_cfg.int2_timestamp    = val.timestamp;
     md2_cfg.int2_6d           = val.six_d;
@@ -9327,8 +9330,11 @@
     md2_cfg.int2_single_tap   = val.single_tap;
     md2_cfg.int2_sleep_change = val.sleep_change;
 
+    emb_func_int2.not_used_01 = 0;
     emb_func_int2. int2_step_detector = val.step_detector;
     emb_func_int2.int2_tilt           = val.tilt;
+    emb_func_int2.int2_sig_mot        = val.sig_mot;
+    emb_func_int2.not_used_02 = 0;
     emb_func_int2.int2_fsm_lc         = val.fsm_lc;
 
     fsm_int2_a.int2_fsm1 = val.fsm1;
@@ -9355,9 +9361,7 @@
         if ( ( val.drdy_temp | val.timestamp ) != PROPERTY_DISABLE ) {
           ctrl4_c.int2_on_int1 = PROPERTY_DISABLE;
         }
-        else{
-          ctrl4_c.int2_on_int1 = PROPERTY_ENABLE;
-        }
+
         ret = lsm6dso_write_reg(ctx, LSM6DSO_CTRL4_C, (uint8_t*)&ctrl4_c, 1);
       }
     }