修改acc 25Hz 让系统可以休眠 43/1 43/head
authorSnickerSun <snickersun@163.com>
Thu, 18 Apr 2024 07:37:05 +0000 (15:37 +0800)
committerSnickerSun <snickersun@163.com>
Thu, 18 Apr 2024 07:37:05 +0000 (15:37 +0800)
code/sdk/drivers/peripheral/cywee/service/cywee_service.c
code/sdk/drivers/peripheral/cywee/src/main_dml.c

index dfe1c9f..0aaa6e9 100644 (file)
@@ -46,7 +46,7 @@ typedef struct
  * 其他cmd在Header里定义,对外开放
  */
 
-#define CYWEE_CHECK_MS 20
+#define CYWEE_CHECK_MS 40
 
 osTimerId_t g_cywee_service_timer = NULL;
 static bool g_batter_service_initialled = false;
index 4d8ad52..b38dd4b 100644 (file)
@@ -750,11 +750,18 @@ int cywee_main_dml(int cmd)
         //设置acc gyro 相关参数
         memset(&scl, 0, sizeof(scl));
         scl.iData[0] = 1;
+        scl.iData[7] = 5;  //轴向配置
+    #if 0
         scl.iData[3] = 2;
         scl.iData[4] = 2; //1 anytime 2 fifo
         scl.iData[6] = 5; //先設定5
-        scl.iData[7] = 5;
         scl.iData[8] = 52; // for st sensor(52Hz)
+    #else
+        scl.iData[3] = 2;
+        scl.iData[4] = 2; //1 anytime 2 fifo
+        scl.iData[6] = 5; //fifocount 先設定5
+        scl.iData[8] = 25; // for st sensor(52Hz)
+    #endif
         CWM_SettingControl(SCL_DML_DRV_AG_CONFIG, &scl);
         //CWM_OS_dbgPrintf("[DBG] %s %d\n", __func__,__LINE__);