Browse Source

shoe_mcu_2022_2_22

lwy 2 years ago
parent
commit
4f1c8ccc95

+ 69 - 0
shoe_mcu_2022_2_22/app/app_data_transfer.c

@@ -0,0 +1,69 @@
+/*Includes ----------------------------------------------*/
+#include "system.h"
+#include "ble_comm.h"
+#include "bsp_time.h"
+#include "hal_ble_client.h"
+#include "hal_ble_common.h"
+#include "hal_ser_imu_mode_manage.h"
+#include "app_flash.h"
+#include "app_game.h"
+#include "app_data_transfer.h"
+	
+/*Local Functions ------------------------------------------------------------------------------------------------------------------------------------*/
+static void app_data_transfer_Process(void)
+{
+	static uint32_t tim 	= 0;
+	static uint32_t	tim2 	= 0;
+	
+	if(hal_ser_imu_mode_manage_get_ready(HAL_SER_IMU_MODE_MANAGE_GAME) || \
+		 hal_ser_imu_mode_manage_get_ready(HAL_SER_IMU_MODE_MANAGE_REALSTEP))
+	{
+		if(TIME_GetTicks()-tim>=500){tim = TIME_GetTicks();
+			if( 0 == slave_isconnect())advertising_start();
+			if(mFlash.isHost && 0 == host_isconnect())scan_start();
+		}
+
+		if(TIME_GetTicks()-tim2>=FullPower_Interval){tim2 = TIME_GetTicks();	
+			IMU_Dtalige();
+		}			
+	}
+
+}
+
+
+/*API -------------------------------------------------------*/
+/**
+	@brief 		初始化数据传输应用
+	@param 		无
+	@return 	错误代码					- [out]	-1失败,0成功
+*/
+int	app_data_transfer_Init(void)
+{
+	//设置数据传输线程
+	Process_Start(0,"app_data_transfer_Process",app_data_transfer_Process);
+	
+	return 0;
+}
+/**
+	@brief 		将旧版本的IMU_SetSlaveData(uint8_t* pdat,uint8_t len)写在这里
+	@param 		pdat	略
+	@param 		len		略
+	@return 	无
+*/
+void app_data_transfer_set_SlaveData(uint8_t* pdat,uint8_t len)
+{
+	if(pdat[3]==BLE_TRACK){
+		IMU_Rec_data(pdat,len);
+	}
+	app_game_SetClientGameMode();
+}
+	
+void send_protocol(uint8_t index,uint8_t cmd,uint8_t* p,uint8_t datLen)
+{
+	BLE_Client_Tx_Send(0,(BLE_CMD_n)cmd,p,datLen);
+}	
+
+
+
+
+

+ 55 - 0
shoe_mcu_2022_2_22/app/app_data_transfer.h

@@ -0,0 +1,55 @@
+#ifndef __HAL_SER_IMU_H__
+#define __HAL_SER_IMU_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*Includes ------------------------------------------------------*/
+#include <stdbool.h>
+#include <stdint.h>
+#include <string.h>
+#include "sdk_common.h"
+#include "SEGGER_RTT.h"
+#include "usr_config.h"
+
+/*STRUCTION ----------------------------------------------------*/	
+	
+	
+	
+/*API -------------------------------------------------------*/
+/**
+	@brief 		初始化数据传输应用
+	@param 		无
+	@return 	错误代码					- [out]	-1失败,0成功
+*/
+int		app_data_transfer_Init(void);
+/**
+	@brief 		将旧版本的IMU_SetSlaveData(uint8_t* pdat,uint8_t len)写在这里
+	@param 		pdat	略
+	@param 		len		略
+	@return 	无
+*/
+void	app_data_transfer_set_SlaveData(uint8_t* pdat,uint8_t len);
+	
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+ 3 - 3
shoe_mcu_2022_2_22/hal/hal_ser_imu.c

@@ -786,12 +786,12 @@ int hal_ser_imu_is_param_get_ready(SER_IMU_DIR_e dir, ser_imu_config_param_t	*pa
 			break;
 	}
 	
-	return 0;
+	return ret;
 
 }
 /**
 	@brief 		获取IMU当前数据数量
-	@param 		foot 							- [in]	IMU方向 - 前/后脚
+	@param 		dir 							- [in]	IMU方向 - 前/后脚
 	@return 	错误代码					- [out]	返回数据数量
 */
 int	hal_ser_imu_get_data_num(SER_IMU_DIR_e dir)
@@ -816,7 +816,7 @@ int	hal_ser_imu_get_data_num(SER_IMU_DIR_e dir)
 }
 /**
 	@brief 		获取IMU数据
-	@param 		foot 							- [in]	IMU方向 - 前/后脚
+	@param 		dir 							- [in]	IMU方向 - 前/后脚
 	@param 		index 						- [in]	第几组数据
 	@param 		pdata 						- [out]	IMU数据
 	@return 	错误代码					- [out]	-1失败,0成功

+ 2 - 2
shoe_mcu_2022_2_22/hal/hal_ser_imu.h

@@ -177,13 +177,13 @@ int	hal_ser_imu_set_required_param(int handle_id, SER_IMU_DIR_e dir, ser_imu_con
 int hal_ser_imu_is_param_get_ready(SER_IMU_DIR_e dir, ser_imu_config_param_t	*param);
 /**
 	@brief 		获取IMU当前数据数量
-	@param 		foot 							- [in]	IMU方向 - 前/后脚
+	@param 		dir 							- [in]	IMU方向 - 前/后脚
 	@return 	错误代码					- [out]	返回数据数量
 */
 int	hal_ser_imu_get_data_num(SER_IMU_DIR_e dir);
 /**
 	@brief 		获取IMU数据
-	@param 		foot 							- [in]	IMU方向 - 前/后脚
+	@param 		dir 							- [in]	IMU方向 - 前/后脚
 	@param 		index 						- [in]	第几组数据
 	@param 		pdata 						- [out]	IMU数据
 	@return 	错误代码					- [out]	-1失败,0成功

+ 301 - 0
shoe_mcu_2022_2_22/hal/hal_ser_imu_mode_manage.c

@@ -0,0 +1,301 @@
+/*Includes ----------------------------------------------*/
+#include "system.h"
+#include "hal_ser_imu.h"
+#include "hal_ser_imu_mode_manage.h"
+
+
+/*Private macro ------------------------------------------------------------------------------------------------------------------------------------*/
+
+
+
+/*STRUCTION ------------------------------------------------------------------------------------------------------------------------------------*/
+typedef struct ser_imu_mode_manage
+{
+	/*private member*/
+	
+	int																										mode_switch[HAL_SER_IMU_MODE_MANAGE_NUM];																//模式开关
+	
+	int																										ser_imu_handle_id[HAL_SER_IMU_MODE_MANAGE_NUM];													//模式的IMU服务句柄ID
+	
+	ser_imu_config_param_t																ser_imu_param[HAL_SER_IMU_MODE_MANAGE_NUM][SER_IMU_DIR_NUM];						//模式的IMU配置参数
+	
+	ser_imu_data_t																				ser_imu_data[HAL_SER_IMU_MODE_MANAGE_NUM][SER_IMU_DIR_NUM];							//模式的IMU服务数据
+	
+} Ser_Imu_Mode_Manage_t;
+
+
+/*Local Variable ------------------------------------------------------------------------------------------------------------------------------------*/
+static Ser_Imu_Mode_Manage_t 		ob_ser_imu_mode_manage;		//模式管理服务对象
+	
+static ser_imu_config_param_t		imu_power_off_param;			//关机配置参数
+
+
+
+/*Local Functions ------------------------------------------------------------------------------------------------------------------------------------*/
+static void hal_ser_imu_mode_manage_imu_power_off_init(ser_imu_config_param_t *p_param)
+{
+	p_param->acc_power_mode 						= SER_IMU_ACC_POWER_MODE_NORMAL;						//前脚 - 加速度正常模式
+	p_param->gry_power_mode 						= SER_IMU_GRY_POWER_MODE_NORMAL;						//前脚 - 陀螺仪正常模式
+	p_param->timestamp_resolution 			= SER_IMU_TIMESTAMP_25US;										//前脚 - 时间戳25US精度
+	p_param->timestamp_switch 					= SER_IMU_TIMESTAMP_OFF;										//前脚 - 时间戳关闭
+	p_param->acc_fs 										= SER_IMU_ACC_FS_16G;												//前脚 - 加速度量程 - 16G
+	p_param->gry_fs 										= SER_IMU_GRY_FS_2000DPS;										//前脚 - 陀螺仪量程 - 2000DPS
+	p_param->mag_fs 										= SER_IMU_MAG_FS_30GS;											//前脚 - 地磁计量程 - 30GS
+	p_param->acc_odr 										= SER_IMU_ACC_ODR_OFF;											//后脚 - 加速度采样频率 - 关闭
+	p_param->gry_odr 										= SER_IMU_GRY_ODR_OFF;											//前脚 - 陀螺仪采样频率 - 关闭
+	p_param->mag_odr 										= SER_IMU_MAG_ODR_OFF;											//前脚 - 地磁计采样频率 - 关闭
+	p_param->fifo_odr 									= SER_IMU_FIFO_ODR_OFF;											//前脚 - FIFO采样频率 - 关闭
+}
+static void hal_ser_imu_mode_manage_imu_standby_power_init(HAL_SER_IMU_MODE_MANAGE_e mode)
+{
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_FRONT].acc_power_mode 						= SER_IMU_ACC_POWER_MODE_NORMAL;						//前脚 - 加速度正常模式
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_FRONT].gry_power_mode 						= SER_IMU_GRY_POWER_MODE_NORMAL;						//前脚 - 陀螺仪正常模式
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_FRONT].timestamp_resolution 			= SER_IMU_TIMESTAMP_25US;										//前脚 - 时间戳25US精度
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_FRONT].timestamp_switch 					= SER_IMU_TIMESTAMP_OFF;										//前脚 - 时间戳关闭
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_FRONT].acc_fs 										= SER_IMU_ACC_FS_16G;												//前脚 - 加速度量程 - 16G
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_FRONT].gry_fs 										= SER_IMU_GRY_FS_2000DPS;										//前脚 - 陀螺仪量程 - 2000DPS
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_FRONT].mag_fs 										= SER_IMU_MAG_FS_30GS;											//前脚 - 地磁计量程 - 30GS
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_FRONT].acc_odr 									= SER_IMU_ACC_ODR_12HZ5;										//前脚 - 加速度采样频率 - 12.5HZ
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_FRONT].gry_odr 									= SER_IMU_GRY_ODR_OFF;											//前脚 - 陀螺仪采样频率 - 关闭
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_FRONT].mag_odr 									= SER_IMU_MAG_ODR_OFF;											//前脚 - 地磁计采样频率 - 关闭
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_FRONT].fifo_odr 									= SER_IMU_FIFO_ODR_OFF;											//前脚 - FIFO采样频率 - 关闭
+	
+	
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_BACK].acc_power_mode 						= SER_IMU_ACC_POWER_MODE_NORMAL;						//后脚 - 加速度正常模式
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_BACK].gry_power_mode 						= SER_IMU_GRY_POWER_MODE_NORMAL;						//后脚 - 陀螺仪正常模式
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_BACK].timestamp_resolution 			= SER_IMU_TIMESTAMP_25US;										//后脚 - 时间戳25US精度
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_BACK].timestamp_switch 					= SER_IMU_TIMESTAMP_OFF;										//后脚 - 时间戳关闭
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_BACK].acc_fs 										= SER_IMU_ACC_FS_16G;												//后脚 - 加速度量程 - 16G
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_BACK].gry_fs 										= SER_IMU_GRY_FS_2000DPS;										//后脚 - 陀螺仪量程 - 2000DPS
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_BACK].mag_fs 										= SER_IMU_MAG_FS_30GS;											//后脚 - 地磁计量程 - 30GS
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_BACK].acc_odr 										= SER_IMU_ACC_ODR_OFF;											//后脚 - 加速度采样频率 - 关闭
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_BACK].gry_odr 										= SER_IMU_GRY_ODR_OFF;											//后脚 - 陀螺仪采样频率 - 关闭
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_BACK].mag_odr 										= SER_IMU_MAG_ODR_OFF;											//后脚 - 地磁计采样频率 - 关闭
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_BACK].fifo_odr 									= SER_IMU_FIFO_ODR_OFF;											//后脚 - FIFO采样频率 - 关闭
+}
+
+static void hal_ser_imu_mode_manage_imu_low_power_init(HAL_SER_IMU_MODE_MANAGE_e mode)
+{
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_FRONT].acc_power_mode 						= SER_IMU_ACC_POWER_MODE_NORMAL;						//前脚 - 加速度正常模式
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_FRONT].gry_power_mode 						= SER_IMU_GRY_POWER_MODE_NORMAL;						//前脚 - 陀螺仪正常模式
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_FRONT].timestamp_resolution 			= SER_IMU_TIMESTAMP_25US;										//前脚 - 时间戳25US精度
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_FRONT].timestamp_switch 					= SER_IMU_TIMESTAMP_OFF;										//前脚 - 时间戳关闭
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_FRONT].acc_fs 										= SER_IMU_ACC_FS_16G;												//前脚 - 加速度量程 - 16G
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_FRONT].gry_fs 										= SER_IMU_GRY_FS_2000DPS;										//前脚 - 陀螺仪量程 - 2000DPS
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_FRONT].mag_fs 										= SER_IMU_MAG_FS_30GS;											//前脚 - 地磁计量程 - 30GS
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_FRONT].acc_odr 									= SER_IMU_ACC_ODR_104HZ;										//前脚 - 加速度采样频率 - 104HZ
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_FRONT].gry_odr 									= SER_IMU_GRY_ODR_OFF;											//前脚 - 陀螺仪采样频率 - 关闭
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_FRONT].mag_odr 									= SER_IMU_MAG_ODR_100HZ;										//前脚 - 地磁计采样频率 - 100HZ
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_FRONT].fifo_odr 									= SER_IMU_FIFO_ODR_OFF;											//前脚 - FIFO采样频率 - 关闭
+	
+	
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_BACK].acc_power_mode 						= SER_IMU_ACC_POWER_MODE_NORMAL;						//后脚 - 加速度正常模式
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_BACK].gry_power_mode 						= SER_IMU_GRY_POWER_MODE_NORMAL;						//后脚 - 陀螺仪正常模式
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_BACK].timestamp_resolution 			= SER_IMU_TIMESTAMP_25US;										//后脚 - 时间戳25US精度
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_BACK].timestamp_switch 					= SER_IMU_TIMESTAMP_OFF;										//后脚 - 时间戳关闭
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_BACK].acc_fs 										= SER_IMU_ACC_FS_16G;												//后脚 - 加速度量程 - 16G
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_BACK].gry_fs 										= SER_IMU_GRY_FS_2000DPS;										//后脚 - 陀螺仪量程 - 2000DPS
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_BACK].mag_fs 										= SER_IMU_MAG_FS_30GS;											//后脚 - 地磁计量程 - 30GS
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_BACK].acc_odr 										= SER_IMU_ACC_ODR_OFF;											//后脚 - 加速度采样频率 - 关闭
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_BACK].gry_odr 										= SER_IMU_GRY_ODR_OFF;											//后脚 - 陀螺仪采样频率 - 关闭
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_BACK].mag_odr 										= SER_IMU_MAG_ODR_OFF;											//后脚 - 地磁计采样频率 - 关闭
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_BACK].fifo_odr 									= SER_IMU_FIFO_ODR_OFF;											//后脚 - FIFO采样频率 - 关闭
+}
+
+static void hal_ser_imu_mode_manage_imu_full_power_init(HAL_SER_IMU_MODE_MANAGE_e mode)
+{
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_FRONT].acc_power_mode 						= SER_IMU_ACC_POWER_MODE_NORMAL;						//前脚 - 加速度正常模式
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_FRONT].gry_power_mode 						= SER_IMU_GRY_POWER_MODE_NORMAL;						//前脚 - 陀螺仪正常模式
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_FRONT].timestamp_resolution 			= SER_IMU_TIMESTAMP_25US;										//前脚 - 时间戳25US精度
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_FRONT].timestamp_switch 					= SER_IMU_TIMESTAMP_ON;											//前脚 - 时间戳开启
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_FRONT].acc_fs 										= SER_IMU_ACC_FS_16G;												//前脚 - 加速度量程 - 16G
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_FRONT].gry_fs 										= SER_IMU_GRY_FS_2000DPS;										//前脚 - 陀螺仪量程 - 2000DPS
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_FRONT].mag_fs 										= SER_IMU_MAG_FS_30GS;											//前脚 - 地磁计量程 - 30GS
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_FRONT].acc_odr 									= SER_IMU_ACC_ODR_104HZ;										//前脚 - 加速度采样频率 - 104HZ
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_FRONT].gry_odr 									= SER_IMU_GRY_ODR_104HZ;										//前脚 - 陀螺仪采样频率 - 104HZ
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_FRONT].mag_odr 									= SER_IMU_MAG_ODR_200HZ;										//前脚 - 地磁计采样频率 - 200HZ
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_FRONT].fifo_odr 									= SER_IMU_FIFO_ODR_104HZ;										//前脚 - FIFO采样频率 - 104HZ
+	
+	
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_BACK].acc_power_mode 						= SER_IMU_ACC_POWER_MODE_NORMAL;						//后脚 - 加速度正常模式
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_BACK].gry_power_mode 						= SER_IMU_GRY_POWER_MODE_NORMAL;						//后脚 - 陀螺仪正常模式
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_BACK].timestamp_resolution 			= SER_IMU_TIMESTAMP_25US;										//后脚 - 时间戳25US精度
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_BACK].timestamp_switch 					= SER_IMU_TIMESTAMP_OFF;										//后脚 - 时间戳关闭
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_BACK].acc_fs 										= SER_IMU_ACC_FS_16G;												//后脚 - 加速度量程 - 16G
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_BACK].gry_fs 										= SER_IMU_GRY_FS_2000DPS;										//后脚 - 陀螺仪量程 - 2000DPS
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_BACK].mag_fs 										= SER_IMU_MAG_FS_30GS;											//后脚 - 地磁计量程 - 30GS
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_BACK].acc_odr 										= SER_IMU_ACC_ODR_OFF;											//后脚 - 加速度采样频率 - 关闭
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_BACK].gry_odr 										= SER_IMU_GRY_ODR_OFF;											//后脚 - 陀螺仪采样频率 - 关闭
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_BACK].mag_odr 										= SER_IMU_MAG_ODR_200HZ;										//后脚 - 地磁计采样频率 - 200HZ
+	ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_BACK].fifo_odr 									= SER_IMU_FIFO_ODR_OFF;											//后脚 - FIFO采样频率 - 关闭
+}
+
+/*API ------------------------------------------------------------------------------------------------------------------------------------*/
+/**
+	@brief 		初始化模式管理服务
+	@param 		无
+	@return 	错误代码					- [out]	-1失败,0成功
+*/
+int	hal_ser_imu_mode_manage_Init(void)
+{
+	//初始化imu服务
+	if(hal_ser_imu_Init() == -1)return -1;
+	
+	//重置模式管理服务结构体
+	memset(&ob_ser_imu_mode_manage, 0, sizeof(ob_ser_imu_mode_manage));
+	
+	/*初始化模式管理服务结构体*/
+	
+	//初始化-待机模式配置
+	ob_ser_imu_mode_manage.mode_switch[HAL_SER_IMU_MODE_MANAGE_STANDBY] = 0;																																			//模式关闭
+	hal_ser_imu_get_handle("HAL_SER_IMU_MODE_MANAGE_STANDBY", &ob_ser_imu_mode_manage.ser_imu_handle_id[HAL_SER_IMU_MODE_MANAGE_STANDBY]);				//获取操作IMU服务句柄ID
+	hal_ser_imu_mode_manage_imu_standby_power_init(HAL_SER_IMU_MODE_MANAGE_STANDBY);																															//设置IMU服务配置参数	-	待机配置
+	
+	//初始化-正常模式配置
+	ob_ser_imu_mode_manage.mode_switch[HAL_SER_IMU_MODE_MANAGE_NORMAL] = 0;																																				//模式关闭
+	hal_ser_imu_get_handle("HAL_SER_IMU_MODE_MANAGE_NORMAL", &ob_ser_imu_mode_manage.ser_imu_handle_id[HAL_SER_IMU_MODE_MANAGE_NORMAL]);					//获取操作IMU服务句柄ID
+	hal_ser_imu_mode_manage_imu_low_power_init(HAL_SER_IMU_MODE_MANAGE_NORMAL);																																		//设置IMU服务配置参数	-	低功耗配置
+	
+	//初始化-自检模式配置
+	ob_ser_imu_mode_manage.mode_switch[HAL_SER_IMU_MODE_MANAGE_SELF_CHECK] = 0;																																		//模式关闭
+	hal_ser_imu_get_handle("HAL_SER_IMU_MODE_MANAGE_SELF_CHECK", &ob_ser_imu_mode_manage.ser_imu_handle_id[HAL_SER_IMU_MODE_MANAGE_SELF_CHECK]);	//获取操作IMU服务句柄ID
+	hal_ser_imu_mode_manage_imu_full_power_init(HAL_SER_IMU_MODE_MANAGE_SELF_CHECK);																															//设置IMU服务配置参数	-	全功率配置
+	
+	//初始化-游戏模式配置
+	ob_ser_imu_mode_manage.mode_switch[HAL_SER_IMU_MODE_MANAGE_GAME] = 0;																																					//模式关闭
+	hal_ser_imu_get_handle("HAL_SER_IMU_MODE_MANAGE_GAME", &ob_ser_imu_mode_manage.ser_imu_handle_id[HAL_SER_IMU_MODE_MANAGE_GAME]);							//获取操作IMU服务句柄ID
+	hal_ser_imu_mode_manage_imu_full_power_init(HAL_SER_IMU_MODE_MANAGE_GAME);																																		//设置IMU服务配置参数	-	全功率配置
+	
+	//初始化-实时计步模式配置
+	ob_ser_imu_mode_manage.mode_switch[HAL_SER_IMU_MODE_MANAGE_REALSTEP] = 0;																																			//模式关闭
+	hal_ser_imu_get_handle("HAL_SER_IMU_MODE_MANAGE_REALSTEP", &ob_ser_imu_mode_manage.ser_imu_handle_id[HAL_SER_IMU_MODE_MANAGE_REALSTEP]);			//获取操作IMU服务句柄ID
+	hal_ser_imu_mode_manage_imu_full_power_init(HAL_SER_IMU_MODE_MANAGE_REALSTEP);																																//设置IMU服务配置参数	-	全功率配置
+	
+	//初始化关机配置参数
+	hal_ser_imu_mode_manage_imu_power_off_init(&imu_power_off_param);
+	
+	return 0;
+}
+/**
+	@brief 		请求需要的模式
+	@param 		mode							-	[in]	需要请求的模式
+	@param 		imu_mode_switch		-	[in]	请求的模式开关
+	@return 	错误代码					- [out]	-1失败,0成功
+*/
+int	hal_ser_imu_mode_manage_set_required(HAL_SER_IMU_MODE_MANAGE_e mode, HAL_SER_IMU_MODE_MANAGE_IMU_MODE_SWITCH_e imu_mode_switch)
+{
+	//操作模式不能超过模式数量
+	if(mode >= HAL_SER_IMU_MODE_MANAGE_NUM)return -1;
+	
+	//设置模式开关
+	switch(imu_mode_switch)
+	{
+		case HAL_SER_IMU_MODE_MANAGE_IMU_MODE_ON:
+			ob_ser_imu_mode_manage.mode_switch[mode]++;
+			break;
+		
+		case HAL_SER_IMU_MODE_MANAGE_IMU_MODE_OFF:
+			if(ob_ser_imu_mode_manage.mode_switch[mode] != 0)ob_ser_imu_mode_manage.mode_switch[mode]--;
+			break;
+	}
+	
+	//设置各个模式下的配置
+	for(int i = 0; i < HAL_SER_IMU_MODE_MANAGE_NUM; i++)
+	{
+		if(ob_ser_imu_mode_manage.mode_switch[i] > 0)//模式开启
+		{
+			//设置前脚IMU配置参数
+			if(hal_ser_imu_set_required_param(ob_ser_imu_mode_manage.ser_imu_handle_id[i], SER_IMU_DIR_FRONT, &ob_ser_imu_mode_manage.ser_imu_param[i][SER_IMU_DIR_FRONT]) == -1)return -1;
+			//设置后脚IMU配置参数
+			if(hal_ser_imu_set_required_param(ob_ser_imu_mode_manage.ser_imu_handle_id[i], SER_IMU_DIR_BACK, &ob_ser_imu_mode_manage.ser_imu_param[i][SER_IMU_DIR_BACK]) == -1)return -1;
+		}
+		else	//模式关闭
+		{
+			//设置前脚IMU配置参数
+			if(hal_ser_imu_set_required_param(ob_ser_imu_mode_manage.ser_imu_handle_id[i], SER_IMU_DIR_FRONT, &imu_power_off_param) == -1)return -1;
+			//设置后脚IMU配置参数
+			if(hal_ser_imu_set_required_param(ob_ser_imu_mode_manage.ser_imu_handle_id[i], SER_IMU_DIR_BACK, &imu_power_off_param) == -1)return -1;
+		}
+	}
+
+	return 0;
+}
+/**
+	@brief 		模式是否准备好
+	@param 		mode							-	[in]	需要的模式
+	@return 	错误代码					- [out]	-1失败,0成功
+*/
+int	hal_ser_imu_mode_manage_get_ready(HAL_SER_IMU_MODE_MANAGE_e mode)
+{
+	//操作模式不能超过模式数量
+	if(mode >= HAL_SER_IMU_MODE_MANAGE_NUM)return -1;
+	
+	if(ob_ser_imu_mode_manage.mode_switch[mode] == 0)
+	{
+		return -1;
+	}
+	else
+	{
+		//判断前脚IMU配置参数是否准备好
+		if(hal_ser_imu_is_param_get_ready(SER_IMU_DIR_FRONT, &ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_FRONT]) != -1)
+		{
+			//判断后脚IMU配置参数是否准备好
+			if(hal_ser_imu_is_param_get_ready(SER_IMU_DIR_BACK, &ob_ser_imu_mode_manage.ser_imu_param[mode][SER_IMU_DIR_BACK]) != -1)
+			{
+				return 0;
+			}
+		}
+	}
+	
+	return -1;
+}
+/**
+	@brief 		获取当前模式的IMU当前数据数量
+	@param 		mode							-	[in]	需要的模式
+	@param 		dir 							- [in]	IMU方向 - 前/后脚
+	@return 	错误代码					- [out]	返回数据数量
+*/
+int	hal_ser_imu_mode_manage_get_data_num(SER_IMU_DIR_e dir)
+{
+	return hal_ser_imu_get_data_num(dir);
+}
+/**
+	@brief 		获取当前模式的IMU数据
+	@param 		dir 							- [in]	IMU方向 - 前/后脚
+	@param 		index 						- [in]	第几组数据
+	@param 		pdata 						- [out]	IMU数据
+	@return 	错误代码					- [out]	-1失败,0成功
+*/
+int	hal_ser_imu_mode_manage_get_data(SER_IMU_DIR_e dir, int index, ser_imu_data_t *pdata)
+{
+	return hal_ser_imu_mode_manage_get_data(dir, index, pdata);
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+ 105 - 0
shoe_mcu_2022_2_22/hal/hal_ser_imu_mode_manage.h

@@ -0,0 +1,105 @@
+#ifndef __HAL_SER_IMU_MODE_MANAGE_H__
+#define __HAL_SER_IMU_MODE_MANAGE_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*Includes ------------------------------------------------------*/
+#include <stdbool.h>
+#include <stdint.h>
+#include <string.h>
+#include "sdk_common.h"
+#include "SEGGER_RTT.h"
+#include "usr_config.h"
+#include "hal_ser_imu.h"																
+
+/*STRUCTION ----------------------------------------------------*/
+typedef enum
+{
+	HAL_SER_IMU_MODE_MANAGE_IMU_MODE_ON 	= true,																												//模式开启
+	
+	HAL_SER_IMU_MODE_MANAGE_IMU_MODE_OFF 	= false,																											//模式关闭
+	
+} HAL_SER_IMU_MODE_MANAGE_IMU_MODE_SWITCH_e;
+typedef enum 
+{
+	HAL_SER_IMU_MODE_MANAGE_STANDBY = 0,																																//待机模式(不穿鞋)
+	
+	HAL_SER_IMU_MODE_MANAGE_NORMAL,																																			//正常模式(穿鞋)
+	
+	HAL_SER_IMU_MODE_MANAGE_SELF_CHECK,																																	//自检模式
+	
+	HAL_SER_IMU_MODE_MANAGE_GAME,																																				//游戏模式
+	
+	HAL_SER_IMU_MODE_MANAGE_REALSTEP,																																		//实时计步模式
+	
+	HAL_SER_IMU_MODE_MANAGE_NUM,																																				//模式数量
+	
+} HAL_SER_IMU_MODE_MANAGE_e;
+
+/*API -------------------------------------------------------*/
+/**
+	@brief 		初始化模式管理服务
+	@param 		无
+	@return 	错误代码					- [out]	-1失败,0成功
+*/
+int	hal_ser_imu_mode_manage_Init(void);
+/**
+	@brief 		请求需要的模式
+	@param 		mode							-	[in]	需要请求的模式
+	@param 		imu_mode_switch		-	[in]	请求的模式开关
+	@return 	错误代码					- [out]	-1失败,0成功
+*/
+int	hal_ser_imu_mode_manage_set_required(HAL_SER_IMU_MODE_MANAGE_e mode, HAL_SER_IMU_MODE_MANAGE_IMU_MODE_SWITCH_e imu_mode_switch);
+/**
+	@brief 		模式是否准备好
+	@return 	错误代码					- [out]	-1失败,0成功
+*/
+int	hal_ser_imu_mode_manage_get_ready(HAL_SER_IMU_MODE_MANAGE_e mode);
+/**
+	@brief 		获取当前模式的IMU当前数据数量
+	@param 		mode							-	[in]	需要的模式
+	@param 		dir 							- [in]	IMU方向 - 前/后脚
+	@return 	错误代码					- [out]	返回数据数量
+*/
+int	hal_ser_imu_mode_manage_get_data_num(SER_IMU_DIR_e dir);
+/**
+	@brief 		获取当前模式的IMU数据
+	@param 		dir 							- [in]	IMU方向 - 前/后脚
+	@param 		index 						- [in]	第几组数据
+	@param 		pdata 						- [out]	IMU数据
+	@return 	错误代码					- [out]	-1失败,0成功
+*/
+int	hal_ser_imu_mode_manage_get_data(SER_IMU_DIR_e dir, int index, ser_imu_data_t *pdata);
+
+
+
+
+
+
+
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

File diff suppressed because it is too large
+ 0 - 0
shoe_mcu_2022_2_22/pca10040/s132/arm5_no_packs/_build/app_data_transfer.__i


File diff suppressed because it is too large
+ 1 - 1
shoe_mcu_2022_2_22/pca10040/s132/arm5_no_packs/_build/ble_app_uart_c_pca10040_s132_Shoes_FW_APP.dep


File diff suppressed because it is too large
+ 0 - 0
shoe_mcu_2022_2_22/pca10040/s132/arm5_no_packs/_build/hal_ser_imu_mode_manage.__i


BIN
shoe_mcu_2022_2_22/pca10040/s132/arm5_no_packs/_build/nrf52832_xxaa.axf


+ 21 - 8
shoe_mcu_2022_2_22/pca10040/s132/arm5_no_packs/_build/nrf52832_xxaa.build_log.htm

@@ -22,17 +22,30 @@ Dialog DLL:      TCM.DLL V1.42.0.0
  
 <h2>Project:</h2>
 F:\exampleProject\test_sleep2\nRF5_SDK_17.0.0_9d13099\examples\long\shoe_mcu_2022_2_22\pca10040\s132\arm5_no_packs\ble_app_uart_c_pca10040_s132.uvprojx
-Project File Date:  02/24/2022
+Project File Date:  02/26/2022
 
 <h2>Output:</h2>
 *** Using Compiler 'V5.06 update 6 (build 750)', folder: 'E:\keil530\Keil_v5\ARM\ARMCC\Bin'
 Build target 'Shoes_FW_APP'
-compiling hal_ser_imu.c...
-..\..\..\hal\hal_ser_imu.c(246): warning:  #177-D: function "hal_ser_imu_macro_conversion_mag_fs"  was declared but never referenced
-  static int hal_ser_imu_macro_conversion_mag_fs(SER_IMU_DIR_e dir, SER_IMU_MAG_FS_e mag_fs)
-..\..\..\hal\hal_ser_imu.c: 1 warning, 0 errors
+compiling app_overturn.c...
+compiling exception.c...
+compiling usr.c...
+compiling app_step.c...
+compiling app_host.c...
+compiling app_client.c...
+compiling app_game.c...
+compiling app_connect_manage.c...
+compiling hal_mode_manage.c...
+..\..\..\hal\hal_mode_manage.c(232): warning:  #177-D: function "hal_mode_manage_test_Process"  was declared but never referenced
+  static void hal_mode_manage_test_Process(void)
+..\..\..\hal\hal_mode_manage.c: 1 warning, 0 errors
+compiling app_self_checking.c...
+compiling app_math.c...
+compiling hal_wearshoes.c...
+compiling hal_monitor.c...
+compiling hal_imu_lsm6ds3tr_qmc6310.c...
 linking...
-Program Size: Code=135936 RO-data=4164 RW-data=3504 ZI-data=25560  
+Program Size: Code=135936 RO-data=4164 RW-data=3496 ZI-data=25560  
 FromELF: creating hex file...
 ".\_build\nrf52832_xxaa.axf" - 0 Error(s), 1 Warning(s).
 
@@ -60,11 +73,11 @@ Package Vendor: NordicSemiconductor
    * Component: ARM::CMSIS:CORE:5.3.0
 
    * Component: NordicSemiconductor::Device:Startup:8.32.1
-      Source file:   Device\Source\arm\arm_startup_nrf52.s
       Source file:   Device\Source\system_nrf52.c
       Include file:  Device\Include\system_nrf52.h
       Include file:  Device\Include\system_nrf.h
-Build Time Elapsed:  00:00:07
+      Source file:   Device\Source\arm\arm_startup_nrf52.s
+Build Time Elapsed:  00:00:19
 </pre>
 </body>
 </html>

File diff suppressed because it is too large
+ 164 - 164
shoe_mcu_2022_2_22/pca10040/s132/arm5_no_packs/_build/nrf52832_xxaa.hex


+ 69 - 69
shoe_mcu_2022_2_22/pca10040/s132/arm5_no_packs/_build/nrf52832_xxaa.htm

@@ -3,7 +3,7 @@
 <title>Static Call Graph - [.\_build\nrf52832_xxaa.axf]</title></head>
 <body><HR>
 <H1>Static Call Graph for image .\_build\nrf52832_xxaa.axf</H1><HR>
-<BR><P>#&#060CALLGRAPH&#062# ARM Linker, 5060750: Last Updated: Fri Feb 25 15:56:10 2022
+<BR><P>#&#060CALLGRAPH&#062# ARM Linker, 5060750: Last Updated: Sat Feb 26 10:12:48 2022
 <BR><P>
 <H3>Maximum Stack Usage =       5112 bytes + Unknown(Cycles, Untraceable Function Pointers)</H3><H3>
 Call chain for Maximum Stack Depth:</H3>
@@ -309,7 +309,6 @@ Global Symbols
 <LI><a href="#[200]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;watchdog_init
 <LI><a href="#[21c]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;host_set_scan_name
 <LI><a href="#[12c]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Fstorage_FlashInit
-<LI><a href="#[e7]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ADC_Read
 <LI><a href="#[3c]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;adcCallbackFunc
 <LI><a href="#[e5]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ADC_Init
 <LI><a href="#[13f]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Fstorage_FlashRW
@@ -317,6 +316,7 @@ Global Symbols
 <LI><a href="#[118]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Fstorage_FlashOnlyErasePage
 <LI><a href="#[1b0]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Pwm_init
 <LI><a href="#[4f]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;rtc_tick_handler
+<LI><a href="#[e7]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ADC_Read
 <LI><a href="#[1d0]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;SPI0_Init
 <LI><a href="#[39b]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;scan_init
 <LI><a href="#[8d]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;scan_evt_handler
@@ -808,8 +808,8 @@ Global Symbols
 </UL>
 <BR>[Calls]<UL><LI><a href="#[d4]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;_double_epilogue
 </UL>
-<BR>[Called By]<UL><LI><a href="#[394]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;mode_switch
-<LI><a href="#[17b]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Lsm_Read_Data
+<BR>[Called By]<UL><LI><a href="#[17b]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Lsm_Read_Data
+<LI><a href="#[394]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;mode_switch
 <LI><a href="#[169]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;process_motion
 <LI><a href="#[236]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__ieee754_rem_pio2
 </UL>
@@ -850,10 +850,10 @@ Global Symbols
 <LI><a href="#[10e]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Ble_update_conn_interval
 <LI><a href="#[263]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;detect_step_by_mag
 <LI><a href="#[1b8]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;RealTimeStep
-<LI><a href="#[393]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;hal_wearshoes_determine
 <LI><a href="#[17a]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;lsm6ds3tr_c_init
 <LI><a href="#[114]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;CoefficientVariation
 <LI><a href="#[17b]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Lsm_Read_Data
+<LI><a href="#[393]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;hal_wearshoes_determine
 <LI><a href="#[313]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;dcm2angleTest
 <LI><a href="#[2f3]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;calKafmanGain9x4
 <LI><a href="#[182]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;init_attitude_matrix
@@ -974,8 +974,8 @@ Global Symbols
 </UL>
 <BR>[Calls]<UL><LI><a href="#[e7]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ADC_Read
 </UL>
-<BR>[Called By]<UL><LI><a href="#[391]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;monitor_battery_charge_data
-<LI><a href="#[84]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;hal_battery_Process
+<BR>[Called By]<UL><LI><a href="#[84]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;hal_battery_Process
+<LI><a href="#[391]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;monitor_battery_charge_data
 </UL>
 
 <P><STRONG><a name="[eb]"></a>ADC_Initialize</STRONG> (Thumb, 36 bytes, Stack size 8 bytes, bsp_adc.o(i.ADC_Initialize))
@@ -1215,8 +1215,8 @@ Global Symbols
 <LI><a href="#[d2]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__aeabi_dadd
 <LI><a href="#[de]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__aeabi_d2f
 </UL>
-<BR>[Called By]<UL><LI><a href="#[394]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;mode_switch
-<LI><a href="#[17b]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Lsm_Read_Data
+<BR>[Called By]<UL><LI><a href="#[17b]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Lsm_Read_Data
+<LI><a href="#[394]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;mode_switch
 </UL>
 
 <P><STRONG><a name="[116]"></a>Erase_OnePage</STRONG> (Thumb, 28 bytes, Stack size 16 bytes, bsp_flash.o(i.Erase_OnePage))
@@ -1494,8 +1494,8 @@ Global Symbols
 <LI><a href="#[44]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Exception_Led_Process
 <LI><a href="#[69]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;app_math_TimerCounter
 <LI><a href="#[68]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;app_math_DailyStep_Process
-<LI><a href="#[86]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;hal_monitor_process
 <LI><a href="#[111]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Change_Mode
+<LI><a href="#[86]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;hal_monitor_process
 <LI><a href="#[393]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;hal_wearshoes_determine
 </UL>
 
@@ -1511,8 +1511,8 @@ Global Symbols
 </UL>
 
 <P><STRONG><a name="[38f]"></a>IMU_IsNoSignal</STRONG> (Thumb, 40 bytes, Stack size 0 bytes, hal_imu_lsm6ds3tr_qmc6310.o(i.IMU_IsNoSignal))
-<BR><BR>[Called By]<UL><LI><a href="#[86]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;hal_monitor_process
-<LI><a href="#[43]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;hal_mode_manage_Process
+<BR><BR>[Called By]<UL><LI><a href="#[43]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;hal_mode_manage_Process
+<LI><a href="#[86]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;hal_monitor_process
 </UL>
 
 <P><STRONG><a name="[166]"></a>IMU_PowerOffProcess</STRONG> (Thumb, 14 bytes, Stack size 8 bytes, hal_imu_lsm6ds3tr_qmc6310.o(i.IMU_PowerOffProcess))
@@ -1758,13 +1758,13 @@ Global Symbols
 <LI><a href="#[4a]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;MT_TimerCounter
 <LI><a href="#[42]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;BLE_Host_Tx_Process
 <LI><a href="#[40]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;BLE_Client_Tx_Process
-<LI><a href="#[1de]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Send_Signal
-<LI><a href="#[111]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Change_Mode
 <LI><a href="#[52]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;UART0_Tx_Process
 <LI><a href="#[5]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;evtActFun_imuConfig_StandByPowerMode
 <LI><a href="#[4]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;evtActFun_imuConfig_SelfCheckMode
 <LI><a href="#[2]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;evtActFun_imuConfig_LowPowerMode
 <LI><a href="#[3]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;evtActFun_imuConfig_FullPowerMode
+<LI><a href="#[1de]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Send_Signal
+<LI><a href="#[111]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Change_Mode
 </UL>
 
 <P><STRONG><a name="[f6]"></a>Process_Start</STRONG> (Thumb, 200 bytes, Stack size 24 bytes, system.o(i.Process_Start))
@@ -1867,8 +1867,8 @@ Global Symbols
 <BR><BR>[Stack]<UL><LI>Max Depth = 448<LI>Call Chain = RealTimeStep &rArr; SEGGER_RTT_printf &rArr; SEGGER_RTT_vprintf &rArr; _PrintInt &rArr; _PrintUnsigned &rArr; _StoreChar &rArr; SEGGER_RTT_Write &rArr; SEGGER_RTT_WriteNoLock &rArr; _WriteNoCheck
 </UL>
 <BR>[Calls]<UL><LI><a href="#[fc]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;SEGGER_RTT_printf
-<LI><a href="#[dc]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__aeabi_d2iz
 <LI><a href="#[10f]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__aeabi_f2d
+<LI><a href="#[dc]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__aeabi_d2iz
 <LI><a href="#[1b9]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__hardfp_sqrt
 </UL>
 <BR>[Called By]<UL><LI><a href="#[69]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;app_math_TimerCounter
@@ -1948,13 +1948,11 @@ Global Symbols
 <LI><a href="#[263]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;detect_step_by_mag
 <LI><a href="#[1b8]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;RealTimeStep
 <LI><a href="#[68]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;app_math_DailyStep_Process
-<LI><a href="#[394]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;mode_switch
 <LI><a href="#[175]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;lsm6ds3tr_c_standby_power_acc_mode_config
 <LI><a href="#[167]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;lsm6ds3tr_c_powerdown_mode
 <LI><a href="#[17a]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;lsm6ds3tr_c_init
 <LI><a href="#[159]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;lsm6ds3tr_c_gry_acc_sensor_hub_qmc6310_fifo_with_timestamp_mode_config
 <LI><a href="#[163]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;lsm6ds3tr_c_acc_sensor_hub_qmc6310_fifo_with_timestamp_mode_config
-<LI><a href="#[172]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;IMU_SetSignal
 <LI><a href="#[5]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;evtActFun_imuConfig_StandByPowerMode
 <LI><a href="#[4]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;evtActFun_imuConfig_SelfCheckMode
 <LI><a href="#[2]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;evtActFun_imuConfig_LowPowerMode
@@ -1964,8 +1962,10 @@ Global Symbols
 <LI><a href="#[46]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;IMU_process
 <LI><a href="#[161]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;IMU_lsm6ds3tr_initialize
 <LI><a href="#[11f]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;FSM_EventHandle
+<LI><a href="#[172]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;IMU_SetSignal
 <LI><a href="#[8]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;fstorageCallbackFunc
 <LI><a href="#[9b]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;wdt_event_handler
+<LI><a href="#[394]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;mode_switch
 <LI><a href="#[4cd]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;qmc6310_get_chipid
 <LI><a href="#[4d3]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;qmc6310_get_chipid
 <LI><a href="#[169]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;process_motion
@@ -2161,9 +2161,9 @@ Global Symbols
 <LI><a href="#[42]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;BLE_Host_Tx_Process
 <LI><a href="#[40]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;BLE_Client_Tx_Process
 <LI><a href="#[fb]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;BLE_Client_Send
-<LI><a href="#[86]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;hal_monitor_process
 <LI><a href="#[46]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;IMU_process
 <LI><a href="#[9b]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;wdt_event_handler
+<LI><a href="#[86]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;hal_monitor_process
 </UL>
 
 <P><STRONG><a name="[1ee]"></a>TIME_Init</STRONG> (Thumb, 112 bytes, Stack size 24 bytes, bsp_time.o(i.TIME_Init))
@@ -2553,8 +2553,8 @@ Global Symbols
 <BR><BR>[Stack]<UL><LI>Max Depth = 208<LI>Call Chain = __ieee754_rem_pio2 &rArr; __aeabi_drsub &rArr; __aeabi_dadd &rArr; _double_epilogue &rArr; _double_round
 </UL>
 <BR>[Calls]<UL><LI><a href="#[db]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__aeabi_ui2d
-<LI><a href="#[dc]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__aeabi_d2iz
 <LI><a href="#[da]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__aeabi_i2d
+<LI><a href="#[dc]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__aeabi_d2iz
 <LI><a href="#[d7]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__aeabi_drsub
 <LI><a href="#[d8]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__aeabi_dmul
 <LI><a href="#[d2]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__aeabi_dadd
@@ -3978,8 +3978,8 @@ Global Symbols
 <BR><BR>[Stack]<UL><LI>Max Depth = 424<LI>Call Chain = detect_step_by_mag &rArr; SEGGER_RTT_printf &rArr; SEGGER_RTT_vprintf &rArr; _PrintInt &rArr; _PrintUnsigned &rArr; _StoreChar &rArr; SEGGER_RTT_Write &rArr; SEGGER_RTT_WriteNoLock &rArr; _WriteNoCheck
 </UL>
 <BR>[Calls]<UL><LI><a href="#[fc]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;SEGGER_RTT_printf
-<LI><a href="#[dc]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__aeabi_d2iz
 <LI><a href="#[10f]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__aeabi_f2d
+<LI><a href="#[dc]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__aeabi_d2iz
 <LI><a href="#[1b9]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__hardfp_sqrt
 </UL>
 <BR>[Called By]<UL><LI><a href="#[68]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;app_math_DailyStep_Process
@@ -4081,17 +4081,17 @@ Global Symbols
 </UL>
 
 <P><STRONG><a name="[335]"></a>drv_rtc_windowed_compare_set</STRONG> (Thumb, 252 bytes, Stack size 40 bytes, drv_rtc.o(i.drv_rtc_windowed_compare_set))
-<BR><BR>[Stack]<UL><LI>Max Depth = 56<LI>Call Chain = drv_rtc_windowed_compare_set &rArr; nrfx_coredep_delay_us
+<BR><BR>[Stack]<UL><LI>Max Depth = 56<LI>Call Chain = drv_rtc_windowed_compare_set &rArr; evt_enable
 </UL>
-<BR>[Calls]<UL><LI><a href="#[337]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ticks_sub
-<LI><a href="#[338]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;nrfx_coredep_delay_us
-<LI><a href="#[32d]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;nrf_rtc_event_enable
+<BR>[Calls]<UL><LI><a href="#[32d]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;nrf_rtc_event_enable
 <LI><a href="#[32b]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;nrf_rtc_event_clear
 <LI><a href="#[32f]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;nrf_rtc_counter_get
 <LI><a href="#[32c]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;nrf_rtc_cc_set
 <LI><a href="#[336]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;nrf_rtc_cc_get
 <LI><a href="#[330]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;evt_enable
 <LI><a href="#[326]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;evt_disable
+<LI><a href="#[337]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ticks_sub
+<LI><a href="#[338]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;nrfx_coredep_delay_us
 </UL>
 <BR>[Called By]<UL><LI><a href="#[4ec]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;rtc_schedule
 </UL>
@@ -6095,9 +6095,9 @@ Global Symbols
 <LI><a href="#[3ab]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;nrf_sdh_is_enabled
 </UL>
 <BR>[Called By]<UL><LI><a href="#[217]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;rtc_sleep
-<LI><a href="#[e7]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ADC_Read
 <LI><a href="#[1d6]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;SPI0_ReadWriteData
 <LI><a href="#[13c]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;waitForFlashReady
+<LI><a href="#[e7]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ADC_Read
 </UL>
 
 <P><STRONG><a name="[2c2]"></a>nrf_pwr_mgmt_shutdown</STRONG> (Thumb, 88 bytes, Stack size 16 bytes, nrf_pwr_mgmt.o(i.nrf_pwr_mgmt_shutdown))
@@ -7571,6 +7571,43 @@ Local Symbols
 <LI><a href="#[47]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;LED_Process
 </UL>
 
+<P><STRONG><a name="[111]"></a>Change_Mode</STRONG> (Thumb, 366 bytes, Stack size 8 bytes, hal_mode_manage.o(i.Change_Mode))
+<BR><BR>[Stack]<UL><LI>Max Depth = 20<LI>Call Chain = Change_Mode &rArr; Process_SetHoldOn
+</UL>
+<BR>[Calls]<UL><LI><a href="#[100]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Process_SetHoldOn
+<LI><a href="#[113]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;IMU_Get_Front_Data_Num
+<LI><a href="#[112]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;IMU_GetCurrentMode
+</UL>
+<BR>[Called By]<UL><LI><a href="#[43]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;hal_mode_manage_Process
+</UL>
+
+<P><STRONG><a name="[1de]"></a>Send_Signal</STRONG> (Thumb, 288 bytes, Stack size 8 bytes, hal_mode_manage.o(i.Send_Signal))
+<BR><BR>[Stack]<UL><LI>Max Depth = 392<LI>Call Chain = Send_Signal &rArr; IMU_SetSignal &rArr; SEGGER_RTT_printf &rArr; SEGGER_RTT_vprintf &rArr; _PrintInt &rArr; _PrintUnsigned &rArr; _StoreChar &rArr; SEGGER_RTT_Write &rArr; SEGGER_RTT_WriteNoLock &rArr; _WriteNoCheck
+</UL>
+<BR>[Calls]<UL><LI><a href="#[100]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Process_SetHoldOn
+<LI><a href="#[172]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;IMU_SetSignal
+<LI><a href="#[112]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;IMU_GetCurrentMode
+</UL>
+<BR>[Called By]<UL><LI><a href="#[43]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;hal_mode_manage_Process
+</UL>
+
+<P><STRONG><a name="[38e]"></a>hal_mode_manage_Discipline</STRONG> (Thumb, 68 bytes, Stack size 0 bytes, hal_mode_manage.o(i.hal_mode_manage_Discipline))
+<BR><BR>[Called By]<UL><LI><a href="#[24e]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;hal_mode_set
+<LI><a href="#[43]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;hal_mode_manage_Process
+</UL>
+
+<P><STRONG><a name="[43]"></a>hal_mode_manage_Process</STRONG> (Thumb, 56 bytes, Stack size 8 bytes, hal_mode_manage.o(i.hal_mode_manage_Process))
+<BR><BR>[Stack]<UL><LI>Max Depth = 400<LI>Call Chain = hal_mode_manage_Process &rArr; Send_Signal &rArr; IMU_SetSignal &rArr; SEGGER_RTT_printf &rArr; SEGGER_RTT_vprintf &rArr; _PrintInt &rArr; _PrintUnsigned &rArr; _StoreChar &rArr; SEGGER_RTT_Write &rArr; SEGGER_RTT_WriteNoLock &rArr; _WriteNoCheck
+</UL>
+<BR>[Calls]<UL><LI><a href="#[38f]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;IMU_IsNoSignal
+<LI><a href="#[38e]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;hal_mode_manage_Discipline
+<LI><a href="#[1de]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Send_Signal
+<LI><a href="#[111]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Change_Mode
+</UL>
+<BR>[Address Reference Count : 3]<UL><LI> hal_mode_manage.o(i.Change_Mode)
+<LI> hal_mode_manage.o(i.Send_Signal)
+<LI> hal_mode_manage.o(i.hal_mode_manage_Init)
+</UL>
 <P><STRONG><a name="[11f]"></a>FSM_EventHandle</STRONG> (Thumb, 126 bytes, Stack size 40 bytes, hal_imu_lsm6ds3tr_qmc6310.o(i.FSM_EventHandle))
 <BR><BR>[Stack]<UL><LI>Max Depth = 408<LI>Call Chain = FSM_EventHandle &rArr; SEGGER_RTT_printf &rArr; SEGGER_RTT_vprintf &rArr; _PrintInt &rArr; _PrintUnsigned &rArr; _StoreChar &rArr; SEGGER_RTT_Write &rArr; SEGGER_RTT_WriteNoLock &rArr; _WriteNoCheck
 </UL>
@@ -7822,8 +7859,8 @@ Local Symbols
 <P><STRONG><a name="[84]"></a>hal_battery_Process</STRONG> (Thumb, 120 bytes, Stack size 24 bytes, hal_battery_nopowerenpin.o(i.hal_battery_Process))
 <BR><BR>[Stack]<UL><LI>Max Depth = 4648<LI>Call Chain = hal_battery_Process &rArr; ADC_GetValue &rArr; ADC_Read &rArr; app_error_handler &rArr; app_error_fault_handler &rArr; Flash_SaveLog &rArr; Flash_SaveInfomation &rArr; Zone_Write &rArr; Write_N_4Byte_flash &rArr; __NeedErase &rArr; Fstorage_FlashRW &rArr;  app_error_handler (Cycle)
 </UL>
-<BR>[Calls]<UL><LI><a href="#[e6]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ADC_GetValue
-<LI><a href="#[1a6]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Power_management
+<BR>[Calls]<UL><LI><a href="#[1a6]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Power_management
+<LI><a href="#[e6]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ADC_GetValue
 </UL>
 <BR>[Called By]<UL><LI><a href="#[201]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;hal_battery_init
 </UL>
@@ -7851,9 +7888,9 @@ Local Symbols
 <LI><a href="#[113]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;IMU_Get_Front_Data_Num
 <LI><a href="#[11e]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;IMU_Get_Front_Data
 <LI><a href="#[264]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;IMU_Get_Back_Data
+<LI><a href="#[10f]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__aeabi_f2d
 <LI><a href="#[dc]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__aeabi_d2iz
 <LI><a href="#[394]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;mode_switch
-<LI><a href="#[10f]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__aeabi_f2d
 <LI><a href="#[1b9]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__hardfp_sqrt
 </UL>
 <BR>[Called By]<UL><LI><a href="#[87]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;hal_wearshoes_Process
@@ -7869,43 +7906,6 @@ Local Symbols
 <BR>[Called By]<UL><LI><a href="#[393]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;hal_wearshoes_determine
 </UL>
 
-<P><STRONG><a name="[111]"></a>Change_Mode</STRONG> (Thumb, 366 bytes, Stack size 8 bytes, hal_mode_manage.o(i.Change_Mode))
-<BR><BR>[Stack]<UL><LI>Max Depth = 20<LI>Call Chain = Change_Mode &rArr; Process_SetHoldOn
-</UL>
-<BR>[Calls]<UL><LI><a href="#[100]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Process_SetHoldOn
-<LI><a href="#[113]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;IMU_Get_Front_Data_Num
-<LI><a href="#[112]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;IMU_GetCurrentMode
-</UL>
-<BR>[Called By]<UL><LI><a href="#[43]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;hal_mode_manage_Process
-</UL>
-
-<P><STRONG><a name="[1de]"></a>Send_Signal</STRONG> (Thumb, 288 bytes, Stack size 8 bytes, hal_mode_manage.o(i.Send_Signal))
-<BR><BR>[Stack]<UL><LI>Max Depth = 392<LI>Call Chain = Send_Signal &rArr; IMU_SetSignal &rArr; SEGGER_RTT_printf &rArr; SEGGER_RTT_vprintf &rArr; _PrintInt &rArr; _PrintUnsigned &rArr; _StoreChar &rArr; SEGGER_RTT_Write &rArr; SEGGER_RTT_WriteNoLock &rArr; _WriteNoCheck
-</UL>
-<BR>[Calls]<UL><LI><a href="#[100]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Process_SetHoldOn
-<LI><a href="#[172]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;IMU_SetSignal
-<LI><a href="#[112]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;IMU_GetCurrentMode
-</UL>
-<BR>[Called By]<UL><LI><a href="#[43]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;hal_mode_manage_Process
-</UL>
-
-<P><STRONG><a name="[38e]"></a>hal_mode_manage_Discipline</STRONG> (Thumb, 68 bytes, Stack size 0 bytes, hal_mode_manage.o(i.hal_mode_manage_Discipline))
-<BR><BR>[Called By]<UL><LI><a href="#[24e]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;hal_mode_set
-<LI><a href="#[43]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;hal_mode_manage_Process
-</UL>
-
-<P><STRONG><a name="[43]"></a>hal_mode_manage_Process</STRONG> (Thumb, 56 bytes, Stack size 8 bytes, hal_mode_manage.o(i.hal_mode_manage_Process))
-<BR><BR>[Stack]<UL><LI>Max Depth = 400<LI>Call Chain = hal_mode_manage_Process &rArr; Send_Signal &rArr; IMU_SetSignal &rArr; SEGGER_RTT_printf &rArr; SEGGER_RTT_vprintf &rArr; _PrintInt &rArr; _PrintUnsigned &rArr; _StoreChar &rArr; SEGGER_RTT_Write &rArr; SEGGER_RTT_WriteNoLock &rArr; _WriteNoCheck
-</UL>
-<BR>[Calls]<UL><LI><a href="#[38e]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;hal_mode_manage_Discipline
-<LI><a href="#[1de]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Send_Signal
-<LI><a href="#[111]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Change_Mode
-<LI><a href="#[38f]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;IMU_IsNoSignal
-</UL>
-<BR>[Address Reference Count : 3]<UL><LI> hal_mode_manage.o(i.Change_Mode)
-<LI> hal_mode_manage.o(i.Send_Signal)
-<LI> hal_mode_manage.o(i.hal_mode_manage_Init)
-</UL>
 <P><STRONG><a name="[86]"></a>hal_monitor_process</STRONG> (Thumb, 282 bytes, Stack size 48 bytes, hal_monitor.o(i.hal_monitor_process))
 <BR><BR>[Stack]<UL><LI>Max Depth = 4696<LI>Call Chain = hal_monitor_process &rArr; monitor_battery_charge_data &rArr; ADC_GetValue &rArr; ADC_Read &rArr; app_error_handler &rArr; app_error_fault_handler &rArr; Flash_SaveLog &rArr; Flash_SaveInfomation &rArr; Zone_Write &rArr; Write_N_4Byte_flash &rArr; __NeedErase &rArr; Fstorage_FlashRW &rArr;  app_error_handler (Cycle)
 </UL>
@@ -7914,10 +7914,10 @@ Local Symbols
 <LI><a href="#[113]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;IMU_Get_Front_Data_Num
 <LI><a href="#[11e]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;IMU_Get_Front_Data
 <LI><a href="#[264]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;IMU_Get_Back_Data
+<LI><a href="#[38f]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;IMU_IsNoSignal
 <LI><a href="#[392]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;monitor_suspend_mode_overflow
 <LI><a href="#[390]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;monitor_sensor_data
 <LI><a href="#[391]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;monitor_battery_charge_data
-<LI><a href="#[38f]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;IMU_IsNoSignal
 </UL>
 <BR>[Address Reference Count : 1]<UL><LI> hal_monitor.o(i.hal_monitor_Init)
 </UL>
@@ -11481,7 +11481,7 @@ Local Symbols
 </UL>
 
 <P><STRONG><a name="[7b]"></a>rtc_irq</STRONG> (Thumb, 62 bytes, Stack size 8 bytes, app_timer2.o(i.rtc_irq))
-<BR><BR>[Stack]<UL><LI>Max Depth = 120<LI>Call Chain = rtc_irq &rArr; rtc_update &rArr; rtc_schedule &rArr; drv_rtc_windowed_compare_set &rArr; nrfx_coredep_delay_us
+<BR><BR>[Stack]<UL><LI>Max Depth = 120<LI>Call Chain = rtc_irq &rArr; rtc_update &rArr; rtc_schedule &rArr; drv_rtc_windowed_compare_set &rArr; evt_enable
 </UL>
 <BR>[Calls]<UL><LI><a href="#[331]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;drv_rtc_overflow_pending
 <LI><a href="#[327]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;drv_rtc_compare_pending
@@ -11494,7 +11494,7 @@ Local Symbols
 <BR>[Address Reference Count : 1]<UL><LI> app_timer2.o(i.app_timer_init)
 </UL>
 <P><STRONG><a name="[4ec]"></a>rtc_schedule</STRONG> (Thumb, 116 bytes, Stack size 32 bytes, app_timer2.o(i.rtc_schedule))
-<BR><BR>[Stack]<UL><LI>Max Depth = 88<LI>Call Chain = rtc_schedule &rArr; drv_rtc_windowed_compare_set &rArr; nrfx_coredep_delay_us
+<BR><BR>[Stack]<UL><LI>Max Depth = 88<LI>Call Chain = rtc_schedule &rArr; drv_rtc_windowed_compare_set &rArr; evt_enable
 </UL>
 <BR>[Calls]<UL><LI><a href="#[335]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;drv_rtc_windowed_compare_set
 <LI><a href="#[325]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;drv_rtc_compare_disable
@@ -11506,7 +11506,7 @@ Local Symbols
 </UL>
 
 <P><STRONG><a name="[4eb]"></a>rtc_update</STRONG> (Thumb, 154 bytes, Stack size 24 bytes, app_timer2.o(i.rtc_update))
-<BR><BR>[Stack]<UL><LI>Max Depth = 112<LI>Call Chain = rtc_update &rArr; rtc_schedule &rArr; drv_rtc_windowed_compare_set &rArr; nrfx_coredep_delay_us
+<BR><BR>[Stack]<UL><LI>Max Depth = 112<LI>Call Chain = rtc_update &rArr; rtc_schedule &rArr; drv_rtc_windowed_compare_set &rArr; evt_enable
 </UL>
 <BR>[Calls]<UL><LI><a href="#[4ee]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;nrf_sortlist_peek
 <LI><a href="#[4ef]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;nrf_sortlist_add

+ 2 - 2
shoe_mcu_2022_2_22/pca10040/s132/arm5_no_packs/_build/nrf52832_xxaa.lnp

@@ -27,14 +27,14 @@
 ".\_build\hal_mt.o"
 ".\_build\hal_flash.o"
 ".\_build\hal_led_ws2812.o"
+".\_build\hal_ser_imu.o"
+".\_build\hal_mode_manage.o"
 ".\_build\hal_imu_lsm6ds3tr_qmc6310.o"
 ".\_build\hal_ble_uart0_hastxdenpin.o"
 ".\_build\hal_battery_nopowerenpin.o"
 ".\_build\hal_dfu.o"
 ".\_build\hal_wearshoes.o"
-".\_build\hal_mode_manage.o"
 ".\_build\hal_monitor.o"
-".\_build\hal_ser_imu.o"
 ".\_build\bsp_time.o"
 ".\_build\bsp_pwm.o"
 ".\_build\bsp_wdt.o"

File diff suppressed because it is too large
+ 4 - 5
shoe_mcu_2022_2_22/pca10040/s132/arm5_no_packs/ble_app_uart_c_pca10040_s132.uvguix.Administrator


File diff suppressed because it is too large
+ 143 - 119
shoe_mcu_2022_2_22/pca10040/s132/arm5_no_packs/ble_app_uart_c_pca10040_s132.uvoptx


+ 34 - 14
shoe_mcu_2022_2_22/pca10040/s132/arm5_no_packs/ble_app_uart_c_pca10040_s132.uvprojx

@@ -564,6 +564,11 @@
               <FileType>1</FileType>
               <FilePath>..\..\..\app\app_flash.c</FilePath>
             </File>
+            <File>
+              <FileName>app_data_transfer.c</FileName>
+              <FileType>1</FileType>
+              <FilePath>..\..\..\app\app_data_transfer.c</FilePath>
+            </File>
           </Files>
         </Group>
         <Group>
@@ -595,6 +600,16 @@
               <FilePath>..\..\..\hal\hal_led\hal_led_ws2812.c</FilePath>
             </File>
             <File>
+              <FileName>hal_ser_imu.c</FileName>
+              <FileType>1</FileType>
+              <FilePath>..\..\..\hal\hal_ser_imu.c</FilePath>
+            </File>
+            <File>
+              <FileName>hal_mode_manage.c</FileName>
+              <FileType>1</FileType>
+              <FilePath>..\..\..\hal\hal_mode_manage.c</FilePath>
+            </File>
+            <File>
               <FileName>hal_imu_lsm6ds3tr_qmc6310.c</FileName>
               <FileType>1</FileType>
               <FilePath>..\..\..\hal\hal_imu\hal_imu_lsm6ds3tr_qmc6310.c</FilePath>
@@ -620,19 +635,14 @@
               <FilePath>..\..\..\hal\hal_wearshoes.c</FilePath>
             </File>
             <File>
-              <FileName>hal_mode_manage.c</FileName>
-              <FileType>1</FileType>
-              <FilePath>..\..\..\hal\hal_mode_manage.c</FilePath>
-            </File>
-            <File>
               <FileName>hal_monitor.c</FileName>
               <FileType>1</FileType>
               <FilePath>..\..\..\hal\hal_monitor.c</FilePath>
             </File>
             <File>
-              <FileName>hal_ser_imu.c</FileName>
+              <FileName>hal_ser_imu_mode_manage.c</FileName>
               <FileType>1</FileType>
-              <FilePath>..\..\..\hal\hal_ser_imu.c</FilePath>
+              <FilePath>..\..\..\hal\hal_ser_imu_mode_manage.c</FilePath>
             </File>
           </Files>
         </Group>
@@ -4389,6 +4399,11 @@
               <FileType>1</FileType>
               <FilePath>..\..\..\app\app_flash.c</FilePath>
             </File>
+            <File>
+              <FileName>app_data_transfer.c</FileName>
+              <FileType>1</FileType>
+              <FilePath>..\..\..\app\app_data_transfer.c</FilePath>
+            </File>
           </Files>
         </Group>
         <Group>
@@ -4420,6 +4435,16 @@
               <FilePath>..\..\..\hal\hal_led\hal_led_ws2812.c</FilePath>
             </File>
             <File>
+              <FileName>hal_ser_imu.c</FileName>
+              <FileType>1</FileType>
+              <FilePath>..\..\..\hal\hal_ser_imu.c</FilePath>
+            </File>
+            <File>
+              <FileName>hal_mode_manage.c</FileName>
+              <FileType>1</FileType>
+              <FilePath>..\..\..\hal\hal_mode_manage.c</FilePath>
+            </File>
+            <File>
               <FileName>hal_imu_lsm6ds3tr_qmc6310.c</FileName>
               <FileType>1</FileType>
               <FilePath>..\..\..\hal\hal_imu\hal_imu_lsm6ds3tr_qmc6310.c</FilePath>
@@ -4445,19 +4470,14 @@
               <FilePath>..\..\..\hal\hal_wearshoes.c</FilePath>
             </File>
             <File>
-              <FileName>hal_mode_manage.c</FileName>
-              <FileType>1</FileType>
-              <FilePath>..\..\..\hal\hal_mode_manage.c</FilePath>
-            </File>
-            <File>
               <FileName>hal_monitor.c</FileName>
               <FileType>1</FileType>
               <FilePath>..\..\..\hal\hal_monitor.c</FilePath>
             </File>
             <File>
-              <FileName>hal_ser_imu.c</FileName>
+              <FileName>hal_ser_imu_mode_manage.c</FileName>
               <FileType>1</FileType>
-              <FilePath>..\..\..\hal\hal_ser_imu.c</FilePath>
+              <FilePath>..\..\..\hal\hal_ser_imu_mode_manage.c</FilePath>
             </File>
           </Files>
         </Group>

Some files were not shown because too many files changed in this diff