| Author | SHA1 | Message | Date |
|---|---|---|---|
|
|
e8a1f364cd | 解决有卡顿的问题,添加正弦加减速功能 | 2 months ago |
|
|
f301f764ea | 曲线加速过程可以接受,但是减速过程效果很差 | 2 months ago |
| @@ -33,6 +33,7 @@ extern "C" { | |||||
| #include "app_cfg.h" | #include "app_cfg.h" | ||||
| #include "gpio.h" | #include "gpio.h" | ||||
| #include <intrinsics.h> | #include <intrinsics.h> | ||||
| #include <math.h> | |||||
| /* USER CODE BEGIN Includes */ | /* USER CODE BEGIN Includes */ | ||||
| /* USER CODE END Includes */ | /* USER CODE END Includes */ | ||||
| @@ -108,16 +109,6 @@ typedef enum { | |||||
| PLSR_DIR_REVERSE = 1 // 反向 | PLSR_DIR_REVERSE = 1 // 反向 | ||||
| } PLSR_Direction_t; | } PLSR_Direction_t; | ||||
| /** | |||||
| * @brief PLSR错误代码枚举 | |||||
| */ | |||||
| typedef enum { | |||||
| PLSR_ERROR_NONE = 0, ///< 无错误 | |||||
| PLSR_ERROR_FREQ_OUT_OF_RANGE = 1, ///< 频率超出范围 | |||||
| PLSR_ERROR_PARAM_CALC_FAILED = 2, ///< 参数计算失败 | |||||
| PLSR_ERROR_TIMER_CONFIG_FAILED = 3, ///< 定时器配置失败 | |||||
| PLSR_ERROR_HARDWARE_FAULT = 4 ///< 硬件故障 | |||||
| } PLSR_ErrorCode_t; | |||||
| /* USER CODE END Private defines */ | /* USER CODE END Private defines */ | ||||
| void MX_TIM2_Init(void); // TIM2恢复用于脉冲计数 | void MX_TIM2_Init(void); // TIM2恢复用于脉冲计数 | ||||
| @@ -176,6 +167,8 @@ typedef struct | |||||
| uint32_t part1_target_freq; ///< 第一部分目标频率 | uint32_t part1_target_freq; ///< 第一部分目标频率 | ||||
| uint32_t part2_target_freq; ///< 第二部分目标频率(匀速频率) | uint32_t part2_target_freq; ///< 第二部分目标频率(匀速频率) | ||||
| uint32_t part3_target_freq; ///< 第三部分目标频率(通常是0) | uint32_t part3_target_freq; ///< 第三部分目标频率(通常是0) | ||||
| uint32_t part1_time; | |||||
| uint32_t part3_time; | |||||
| uint32_t freq_step; ///< 频率步长 | uint32_t freq_step; ///< 频率步长 | ||||
| uint32_t default_freq; ///< 脉冲默认速度 | uint32_t default_freq; ///< 脉冲默认速度 | ||||
| @@ -214,7 +207,6 @@ typedef struct | |||||
| uint8_t ext_port; ///< 外部事件端口选择 | uint8_t ext_port; ///< 外部事件端口选择 | ||||
| uint8_t dir_port; ///< 方向端口选择 | uint8_t dir_port; ///< 方向端口选择 | ||||
| uint8_t current_part; ///< 当前执行部分:1-第一部分,2-第二部分,3-第三部分 | uint8_t current_part; ///< 当前执行部分:1-第一部分,2-第二部分,3-第三部分 | ||||
| PLSR_ErrorCode_t error_code; ///< 错误代码 | |||||
| } PLSR_RouteConfig_t; | } PLSR_RouteConfig_t; | ||||
| // 三部分执行状态枚举 | // 三部分执行状态枚举 | ||||
| @@ -260,6 +252,9 @@ void PLSR_Accel_Process(PLSR_RouteConfig_t* route); //<加减速执行函数(新 | |||||
| void PLSR_Accel_UpdateRates(PLSR_RouteConfig_t* route); //<更新加减速度 | void PLSR_Accel_UpdateRates(PLSR_RouteConfig_t* route); //<更新加减速度 | ||||
| void PLSR_Accel_SetDefaultParams(PLSR_RouteConfig_t* route, uint32_t accel_time_ms, uint32_t decel_time_ms); //<设置默认加减速参数 | void PLSR_Accel_SetDefaultParams(PLSR_RouteConfig_t* route, uint32_t accel_time_ms, uint32_t decel_time_ms); //<设置默认加减速参数 | ||||
| uint32_t PLSR_Calculate_FreqByPosition(PLSR_RouteConfig_t* route, uint8_t is_accel); //<根据当前脉冲位置计算频率 | uint32_t PLSR_Calculate_FreqByPosition(PLSR_RouteConfig_t* route, uint8_t is_accel); //<根据当前脉冲位置计算频率 | ||||
| uint32_t PLSR_Calculate_SCurve_FreqByPosition(PLSR_RouteConfig_t* route, uint8_t is_accel); | |||||
| uint32_t PLSR_SCurve_Control(PLSR_RouteConfig_t* route); | |||||
| void SCurve_InitializeParameters(PLSR_RouteConfig_t* route, uint32_t accel_time_ms, uint32_t decel_time_ms); | |||||
| // ==================== PLSR TIM6频率配置函数 ==================== | // ==================== PLSR TIM6频率配置函数 ==================== | ||||
| void PLSR_TIM6_SetUpdateFreq(uint32_t freq_us); | void PLSR_TIM6_SetUpdateFreq(uint32_t freq_us); | ||||
| @@ -949,7 +949,8 @@ void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim) | |||||
| { | { | ||||
| PLSR_Route_PWM_Stop(); | PLSR_Route_PWM_Stop(); | ||||
| } | } | ||||
| else PLSR_Section_PWM_Stop(); | |||||
| else if(PlsrRoute.current_part == PLSR_PART_2 || PlsrRoute.current_part == PLSR_PART_3) | |||||
| PLSR_Section_PWM_Stop(); | |||||
| // 精确累加当前段已发送的脉冲数 | // 精确累加当前段已发送的脉冲数 | ||||
| int64_t current_section_pulses = TIM2->ARR; | int64_t current_section_pulses = TIM2->ARR; | ||||
| @@ -975,14 +976,11 @@ void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim) | |||||
| PlsrRoute.run_state = PlsrRoute.part2_state; | PlsrRoute.run_state = PlsrRoute.part2_state; | ||||
| PlsrRoute.target_freq = PlsrRoute.part2_target_freq; | PlsrRoute.target_freq = PlsrRoute.part2_target_freq; | ||||
| PlsrRoute.initial_freq = PlsrRoute.part2_target_freq; // 更新加减速初始频率 | PlsrRoute.initial_freq = PlsrRoute.part2_target_freq; // 更新加减速初始频率 | ||||
| PlsrRoute.current_freq = PlsrRoute.target_freq; | |||||
| if(PlsrRoute.current_freq > 90000) | if(PlsrRoute.current_freq > 90000) | ||||
| ; | ; | ||||
| else | else | ||||
| PLSR_PWM_SetFrequency(PlsrRoute.current_freq); | PLSR_PWM_SetFrequency(PlsrRoute.current_freq); | ||||
| // if(PlsrRoute.current_freq >= 90000) | |||||
| // HAL_TIM_GenerateEvent(&htim10, TIM_EVENTSOURCE_UPDATE); | |||||
| PlsrRoute.current_freq = PlsrRoute.target_freq; | |||||
| __HAL_TIM_SetAutoreload(&htim2, PlsrRoute.const_pulse_count); | __HAL_TIM_SetAutoreload(&htim2, PlsrRoute.const_pulse_count); | ||||
| __HAL_TIM_SET_COUNTER(&htim2, 1); | __HAL_TIM_SET_COUNTER(&htim2, 1); | ||||
| PLSR_PWM_Start(); | PLSR_PWM_Start(); | ||||
| @@ -1595,7 +1593,7 @@ uint8_t PLSR_Section_StartNewSection(PLSR_RouteConfig_t* route) | |||||
| PLSR_ClearExtEvent(route); | PLSR_ClearExtEvent(route); | ||||
| if(PlsrRoute.accel_config.accel_algorithm == PLSR_ACCEL_CURVE) | if(PlsrRoute.accel_config.accel_algorithm == PLSR_ACCEL_CURVE) | ||||
| SCurve_InitializeParameters(&PlsrRoute); //计算曲线加减速需要的参数. | |||||
| SCurve_InitializeParameters(&PlsrRoute,route->part1_time,route->part3_time); //计算曲线加减速需要的参数. | |||||
| return 1; | return 1; | ||||
| } | } | ||||
| @@ -1950,9 +1948,17 @@ void PLSR_Accel_Process(PLSR_RouteConfig_t* route) | |||||
| // ==================== 加速处理 ==================== | // ==================== 加速处理 ==================== | ||||
| if (route->run_state == PLSR_STATE_ACCEL) | if (route->run_state == PLSR_STATE_ACCEL) | ||||
| { | { | ||||
| // 根据当前脉冲位置计算频率(传入1表示加速过程) | |||||
| uint32_t calculated_freq = PLSR_Calculate_FreqByPosition(route, 1); | |||||
| uint32_t calculated_freq = 0; | |||||
| if(route->accel_config.accel_algorithm == PLSR_ACCEL_LINEAR) | |||||
| { | |||||
| // 根据当前脉冲位置计算频率(传入1表示加速过程) | |||||
| calculated_freq = PLSR_Calculate_FreqByPosition(route, 1); | |||||
| } | |||||
| else | |||||
| { | |||||
| // 参数有效,可以开始使用S曲线控制 | |||||
| calculated_freq = PLSR_SCurve_Control(route); | |||||
| } | |||||
| // 检查是否达到目标频率 | // 检查是否达到目标频率 | ||||
| if (calculated_freq >= route->target_freq) | if (calculated_freq >= route->target_freq) | ||||
| { | { | ||||
| @@ -1999,8 +2005,17 @@ void PLSR_Accel_Process(PLSR_RouteConfig_t* route) | |||||
| { | { | ||||
| // 根据当前脉冲位置计算频率(传入0表示减速过程) | // 根据当前脉冲位置计算频率(传入0表示减速过程) | ||||
| // 使用速度位移公式 vt^2 = v0^2 - 2ax 计算当前脉冲的下一个脉冲频率 | // 使用速度位移公式 vt^2 = v0^2 - 2ax 计算当前脉冲的下一个脉冲频率 | ||||
| uint32_t calculated_freq = PLSR_Calculate_FreqByPosition(route, 0); | |||||
| uint32_t calculated_freq = 0; | |||||
| if(route->accel_config.accel_algorithm == PLSR_ACCEL_LINEAR) | |||||
| { | |||||
| // 根据当前脉冲位置计算频率(传入1表示加速过程) | |||||
| calculated_freq = PLSR_Calculate_FreqByPosition(route, 0); | |||||
| } | |||||
| else | |||||
| { | |||||
| // 参数有效,可以开始使用S曲线控制 | |||||
| calculated_freq = PLSR_SCurve_Control(route); | |||||
| } | |||||
| // 检查是否达到目标频率 | // 检查是否达到目标频率 | ||||
| if (calculated_freq <= route->target_freq) | if (calculated_freq <= route->target_freq) | ||||
| { | { | ||||
| @@ -225,9 +225,7 @@ void Calculate_PluseNum(PLSR_RouteConfig_t *route) | |||||
| // 获取当前段配置(段号从1开始,数组索引从0开始) | // 获取当前段配置(段号从1开始,数组索引从0开始) | ||||
| PLSR_SectionConfig_t* current_section = &route->section[route->current_section_num - 1]; | PLSR_SectionConfig_t* current_section = &route->section[route->current_section_num - 1]; | ||||
| // 只处理线性加减速算法 | |||||
| if (route->accel_config.accel_algorithm == PLSR_ACCEL_LINEAR) | |||||
| { | |||||
| uint32_t v0 = route->current_freq; // 起始频率 | uint32_t v0 = route->current_freq; // 起始频率 | ||||
| uint32_t vt_desired = current_section->target_freq; // 期望目标频率 | uint32_t vt_desired = current_section->target_freq; // 期望目标频率 | ||||
| uint32_t vt = vt_desired; // 实际目标频率(可能会被调整) | uint32_t vt = vt_desired; // 实际目标频率(可能会被调整) | ||||
| @@ -424,6 +422,8 @@ void Calculate_PluseNum(PLSR_RouteConfig_t *route) | |||||
| route->part1_state = part1_state; | route->part1_state = part1_state; | ||||
| route->part2_state = part2_state; | route->part2_state = part2_state; | ||||
| route->part3_state = part3_state; | route->part3_state = part3_state; | ||||
| route->part1_time = part1_time; | |||||
| route->part3_time = part3_time; | |||||
| route->part1_target_freq = vt; | route->part1_target_freq = vt; | ||||
| route->part2_target_freq = vt; | route->part2_target_freq = vt; | ||||
| route->part3_target_freq = 0; | route->part3_target_freq = 0; | ||||
| @@ -446,7 +446,6 @@ void Calculate_PluseNum(PLSR_RouteConfig_t *route) | |||||
| route->run_state = PLSR_STATE_CONST; | route->run_state = PLSR_STATE_CONST; | ||||
| route->target_freq = v0; | route->target_freq = v0; | ||||
| } | } | ||||
| } | |||||
| } | } | ||||
| @@ -618,363 +617,355 @@ void PLSR_Accel_UpdateRates(PLSR_RouteConfig_t* route) | |||||
| } | } | ||||
| } | } | ||||
| /* ==================== 快速立方根近似 ==================== */ | |||||
| static uint32_t cbrt_approx(uint64_t x) | |||||
| { | |||||
| if (x == 0) return 0; | |||||
| /* 使用位操作快速初始估算 */ | |||||
| uint32_t guess; | |||||
| if (x >= 1000000000ULL) guess = 1000; | |||||
| else if (x >= 1000000ULL) guess = 100; | |||||
| else if (x >= 1000ULL) guess = 10; | |||||
| else guess = 1; | |||||
| /* 牛顿法迭代:x_{n+1} = (2*x_n + a/x_n²) / 3 */ | |||||
| for (int i = 0; i < 3; i++) { | |||||
| uint64_t guess_sq = (uint64_t)guess * guess; | |||||
| if (guess_sq == 0) break; | |||||
| guess = (uint32_t)((2ULL * guess + x / guess_sq) / 3); | |||||
| } | |||||
| return guess; | |||||
| } | |||||
| /* ==================== S曲线参数初始化函数 ==================== */ | |||||
| void SCurve_InitializeParameters(PLSR_RouteConfig_t* route) | |||||
| /** | |||||
| * @brief S曲线加减速参数初始化 | |||||
| * @param route 路径配置结构体指针 | |||||
| * @param accel_time_ms 加速时间(毫秒) | |||||
| * @param decel_time_ms 减速时间(毫秒) | |||||
| */ | |||||
| void SCurve_InitializeParameters(PLSR_RouteConfig_t* route, uint32_t accel_time_ms, uint32_t decel_time_ms) | |||||
| { | { | ||||
| if (route == NULL) return; | if (route == NULL) return; | ||||
| /* 输入参数验证和预处理 */ | |||||
| const uint32_t accel_rate = (route->accel_rate == 0) ? 1 : route->accel_rate; // Hz/ms | |||||
| const uint32_t decel_rate = (route->decel_rate == 0) ? 1 : route->decel_rate; // Hz/ms | |||||
| /* ============ 加速段参数计算 ============ */ | /* ============ 加速段参数计算 ============ */ | ||||
| uint32_t vel_start_accel = route->initial_freq; | |||||
| uint32_t vel_target_accel = route->part1_target_freq; | |||||
| if (vel_target_accel > PLSR_PWM_FREQ_MAX) { | |||||
| vel_target_accel = PLSR_PWM_FREQ_MAX; | |||||
| } | |||||
| uint32_t delta_vel_accel = (vel_target_accel > vel_start_accel) ? | |||||
| (vel_target_accel - vel_start_accel) : 0; | |||||
| if (delta_vel_accel > 0) | |||||
| if (accel_time_ms > 0) | |||||
| { | { | ||||
| /* 计算加速时间参数 */ | |||||
| uint32_t total_accel_time_ms = CLAMP_MIN(delta_vel_accel / accel_rate, 1); | |||||
| uint32_t jerk_time_ms = CLAMP_MIN(total_accel_time_ms / 2, 1); | |||||
| /* 关键公式:Δv = J·Tj²,因此 J = Δv / Tj² */ | |||||
| uint32_t jerk = (uint32_t)DIV_ROUND((uint64_t)delta_vel_accel * 1000ULL, | |||||
| (uint64_t)jerk_time_ms * jerk_time_ms); | |||||
| uint32_t max_accel = (jerk * jerk_time_ms) / 1000; // 转换单位 | |||||
| /* 脉冲数计算 - 使用精确积分公式 */ | |||||
| uint64_t T = jerk_time_ms; | |||||
| uint64_t T_sq = T * T; | |||||
| uint64_t T_cu = T_sq * T; | |||||
| /* 第一阶段: s₁ = v₀·T + (1/6)·J·T³ */ | |||||
| uint64_t phase1_displacement = (uint64_t)vel_start_accel * T + | |||||
| ((uint64_t)jerk * T_cu) / 6000; // 除以6000而不是6是因为单位换算 | |||||
| uint32_t phase1_pulses = (uint32_t)DIV_ROUND(phase1_displacement, 1000); | |||||
| /* 第二阶段:中间速度计算 */ | |||||
| uint32_t vel_mid = vel_start_accel + (uint32_t)((jerk * T_sq) / 2000); | |||||
| uint32_t vel_start = route->initial_freq; // V0 | |||||
| uint32_t vel_target = route->part1_target_freq; // Vt | |||||
| /* 第二阶段位移:s₂ = v_mid·T - (1/6)·J·T³ (注意减号,因为是减jerk阶段)*/ | |||||
| uint64_t phase2_displacement = (uint64_t)vel_mid * T - | |||||
| ((uint64_t)jerk * T_cu) / 6000; | |||||
| uint32_t phase2_pulses = (uint32_t)DIV_ROUND(phase2_displacement, 1000); | |||||
| /* 归一化到实际脉冲总数,防止舍入误差 */ | |||||
| uint32_t calculated_total = phase1_pulses + phase2_pulses; | |||||
| uint32_t actual_total = route->accel_pulse_count; | |||||
| if (calculated_total != actual_total && calculated_total > 0) { | |||||
| if (actual_total > calculated_total) | |||||
| { | |||||
| phase2_pulses += (actual_total - calculated_total); | |||||
| } | |||||
| else | |||||
| { | |||||
| phase1_pulses = (uint32_t)(((uint64_t)phase1_pulses * actual_total) / calculated_total); | |||||
| phase2_pulses = actual_total - phase1_pulses; | |||||
| } | |||||
| if (vel_target > vel_start) | |||||
| { | |||||
| uint32_t delta_v = vel_target - vel_start; | |||||
| uint32_t Tj = accel_time_ms / 2; // 到达最大加速度的时间(加速时间的一半) | |||||
| // 加加速度计算:J = 4*Vt/(Tt^2) = 4*delta_v/(accel_time_ms^2) | |||||
| uint64_t jerk_numerator = 4ULL * delta_v * 1000ULL; // 乘1000进行单位换算 | |||||
| uint64_t jerk_denominator = (uint64_t)accel_time_ms * accel_time_ms; | |||||
| uint32_t jerk = (uint32_t)(jerk_numerator / jerk_denominator); // Hz/ms² | |||||
| // 最大加速度:Amax = J * Tj | |||||
| uint32_t max_accel = (jerk * Tj) / 1000; // Hz/ms | |||||
| // 加加速过程的脉冲数:N1 = (1/6) * J * Tj^3 | |||||
| uint64_t Tj_cubed = (uint64_t)Tj * Tj * Tj; | |||||
| uint64_t phase1_pulses_calc = (jerk * Tj_cubed) / (6ULL * 1000ULL * 1000ULL); // 单位换算 | |||||
| // 减加速过程的脉冲数:N2 = V0*Tj + (5/6)*J*Tj^3 | |||||
| uint64_t phase2_term2 = (5ULL * jerk * Tj_cubed) / (6ULL * 1000ULL * 1000ULL); | |||||
| uint64_t phase2_pulses_calc = phase2_term2; | |||||
| // 存储加速段参数 | |||||
| route->scurve.accel_jerk = jerk; | |||||
| route->scurve.accel_max = max_accel; | |||||
| route->scurve.accel_jerk_time_ms = Tj; | |||||
| route->scurve.accel_phase1_pulses = (uint32_t)phase1_pulses_calc; | |||||
| route->scurve.accel_phase2_pulses = (uint32_t)phase2_pulses_calc; | |||||
| } | |||||
| else | |||||
| { | |||||
| // 无需加速,清零参数 | |||||
| route->scurve.accel_jerk = 0; | |||||
| route->scurve.accel_max = 0; | |||||
| route->scurve.accel_jerk_time_ms = 0; | |||||
| route->scurve.accel_phase1_pulses = 0; | |||||
| route->scurve.accel_phase2_pulses = 0; | |||||
| } | } | ||||
| /* 存储加速段参数 */ | |||||
| route->scurve.accel_jerk = jerk; | |||||
| route->scurve.accel_max = max_accel; | |||||
| route->scurve.accel_jerk_time_ms = jerk_time_ms; | |||||
| route->scurve.accel_phase1_pulses = phase1_pulses; | |||||
| route->scurve.accel_phase2_pulses = phase2_pulses; | |||||
| } | |||||
| else | |||||
| { | |||||
| /* 无加速段,清零参数 */ | |||||
| route->scurve.accel_jerk = 0; | |||||
| route->scurve.accel_max = 0; | |||||
| route->scurve.accel_jerk_time_ms = 0; | |||||
| route->scurve.accel_phase1_pulses = 0; | |||||
| route->scurve.accel_phase2_pulses = 0; | |||||
| } | } | ||||
| /* ============ 减速段参数计算 ============ */ | /* ============ 减速段参数计算 ============ */ | ||||
| uint32_t vel_start_decel = route->initial_freq; | |||||
| uint32_t vel_target_decel = route->part3_target_freq; | |||||
| if (vel_start_decel > PLSR_PWM_FREQ_MAX) { | |||||
| vel_start_decel = PLSR_PWM_FREQ_MAX; | |||||
| } | |||||
| uint32_t delta_vel_decel = (vel_start_decel > vel_target_decel) ? | |||||
| (vel_start_decel - vel_target_decel) : 0; | |||||
| if (delta_vel_decel > 0) { | |||||
| /* 计算减速时间参数 */ | |||||
| uint32_t total_decel_time_ms = CLAMP_MIN(delta_vel_decel / decel_rate, 1); | |||||
| uint32_t jerk_time_ms = CLAMP_MIN(total_decel_time_ms / 2, 1); | |||||
| /* 减速jerk计算 */ | |||||
| uint32_t jerk = (uint32_t)DIV_ROUND((uint64_t)delta_vel_decel * 1000ULL, | |||||
| (uint64_t)jerk_time_ms * jerk_time_ms); | |||||
| uint32_t max_decel = (jerk * jerk_time_ms) / 1000; | |||||
| /* 减速段脉冲数计算 */ | |||||
| uint64_t T = jerk_time_ms; | |||||
| uint64_t T_sq = T * T; | |||||
| uint64_t T_cu = T_sq * T; | |||||
| /* 第一阶段(减速开始): s₁ = v₀·T - (1/6)·J·T³ (减号,因为是减速)*/ | |||||
| uint64_t phase1_displacement = (uint64_t)vel_start_decel * T - | |||||
| ((uint64_t)jerk * T_cu) / 6000; | |||||
| /* 防止负数 */ | |||||
| if ((int64_t)phase1_displacement < 0) phase1_displacement = 0; | |||||
| uint32_t phase1_pulses = (uint32_t)DIV_ROUND(phase1_displacement, 1000); | |||||
| /* 第二阶段:中间速度 */ | |||||
| uint32_t vel_mid = (vel_start_decel > (jerk * T_sq) / 2000) ? | |||||
| vel_start_decel - (jerk * T_sq) / 2000 : 0; | |||||
| /* 第二阶段位移:s₂ = v_mid·T + (1/6)·J·T³ (加号,因为是减jerk阶段)*/ | |||||
| uint64_t phase2_displacement = (uint64_t)vel_mid * T + | |||||
| ((uint64_t)jerk * T_cu) / 6000; | |||||
| uint32_t phase2_pulses = (uint32_t)DIV_ROUND(phase2_displacement, 1000); | |||||
| if (decel_time_ms > 0) | |||||
| { | |||||
| uint32_t vel_start_decel = route->part2_target_freq; // 减速起始速度 | |||||
| uint32_t vel_target_decel = route->part3_target_freq; // 减速目标速度 | |||||
| /* 归一化到实际脉冲总数 */ | |||||
| uint32_t calculated_total = phase1_pulses + phase2_pulses; | |||||
| uint32_t actual_total = route->decel_pulse_count; | |||||
| if (calculated_total != actual_total && calculated_total > 0) { | |||||
| if (actual_total > calculated_total) { | |||||
| phase2_pulses += (actual_total - calculated_total); | |||||
| } else { | |||||
| phase1_pulses = (uint32_t)(((uint64_t)phase1_pulses * actual_total) / calculated_total); | |||||
| phase2_pulses = actual_total - phase1_pulses; | |||||
| } | |||||
| if (vel_start_decel > vel_target_decel) | |||||
| { | |||||
| uint32_t delta_v = vel_start_decel - vel_target_decel; | |||||
| uint32_t Tj = decel_time_ms / 2; // 到达最大减速度的时间 | |||||
| // 减加速度计算:J = 4*delta_v/(decel_time_ms^2) | |||||
| uint64_t jerk_numerator = 4ULL * delta_v * 1000ULL; | |||||
| uint64_t jerk_denominator = (uint64_t)decel_time_ms * decel_time_ms; | |||||
| uint32_t jerk = (uint32_t)(jerk_numerator / jerk_denominator); | |||||
| // 最大减速度 | |||||
| uint32_t max_decel = (jerk * Tj) / 1000; | |||||
| // 减减速过程的脉冲数:N1 = (1/6) * J * Tj^3 | |||||
| uint64_t Tj_cubed = (uint64_t)Tj * Tj * Tj; | |||||
| uint64_t phase1_pulses_calc = (jerk * Tj_cubed) / (6ULL * 1000ULL * 1000ULL); | |||||
| // 加减速过程的脉冲数:N2 = V0*Tj + (5/6)*J*Tj^3 | |||||
| uint64_t phase2_term2 = (5ULL * jerk * Tj_cubed) / (6ULL * 1000ULL * 1000ULL); | |||||
| uint64_t phase2_pulses_calc = phase2_term2; | |||||
| // 存储减速段参数 | |||||
| route->scurve.decel_jerk = jerk; | |||||
| route->scurve.decel_max = max_decel; | |||||
| route->scurve.decel_jerk_time_ms = Tj; | |||||
| route->scurve.decel_phase1_pulses = (uint32_t)phase2_pulses_calc; | |||||
| route->scurve.decel_phase2_pulses = (uint32_t)phase1_pulses_calc; | |||||
| } | |||||
| else | |||||
| { | |||||
| // 无需减速,清零参数 | |||||
| route->scurve.decel_jerk = 0; | |||||
| route->scurve.decel_max = 0; | |||||
| route->scurve.decel_jerk_time_ms = 0; | |||||
| route->scurve.decel_phase1_pulses = 0; | |||||
| route->scurve.decel_phase2_pulses = 0; | |||||
| } | } | ||||
| /* 存储减速段参数 */ | |||||
| route->scurve.decel_jerk = jerk; | |||||
| route->scurve.decel_max = max_decel; | |||||
| route->scurve.decel_jerk_time_ms = jerk_time_ms; | |||||
| route->scurve.decel_phase1_pulses = phase1_pulses; | |||||
| route->scurve.decel_phase2_pulses = phase2_pulses; | |||||
| } | |||||
| else | |||||
| { | |||||
| /* 无减速段,清零参数 */ | |||||
| route->scurve.decel_jerk = 0; | |||||
| route->scurve.decel_max = 0; | |||||
| route->scurve.decel_jerk_time_ms = 0; | |||||
| route->scurve.decel_phase1_pulses = 0; | |||||
| route->scurve.decel_phase2_pulses = 0; | |||||
| } | } | ||||
| } | |||||
| /** | |||||
| * @brief 重置S曲线计算状态(用于段切换) | |||||
| */ | |||||
| void PLSR_Reset_SCurve_State(void) { | |||||
| // 通过调用函数并传入无效参数来触发状态重置 | |||||
| // 实际使用中,在段切换时调用此函数 | |||||
| } | } | ||||
| /* ==================== 第一阶段多项式求解(加速或减速开始阶段)==================== */ | |||||
| static uint32_t SCurve_SolvePhase1_Polynomial(uint32_t vel_start, uint32_t jerk, | |||||
| uint64_t displacement, uint8_t is_deceleration) | |||||
| { | |||||
| if (jerk == 0) return vel_start; | |||||
| /* 方程: s = v₀·t ± (1/6)·J·t³ | |||||
| 对于加速: s = v₀·t + (1/6)·J·t³ (正号) | |||||
| 对于减速: s = v₀·t - (1/6)·J·t³ (负号) | |||||
| */ | |||||
| if (vel_start == 0) | |||||
| { | |||||
| /* 特殊情况:从零速开始 */ | |||||
| if (is_deceleration) return 0; /* 减速从0开始不合理 */ | |||||
| /* 纯立方方程: s = (1/6)·J·t³ => t = ∛(6s/J) */ | |||||
| uint64_t t_cubed = (6000ULL * displacement) / jerk; /* 乘1000是单位换算 */ | |||||
| uint32_t time_ms = cbrt_approx(t_cubed); | |||||
| /* v = (1/2)·J·t² */ | |||||
| uint64_t velocity = ((uint64_t)jerk * time_ms * time_ms) / 2000; | |||||
| return CLAMP_FREQUENCY(velocity); | |||||
| static double cbrt_approx(double x) { | |||||
| if (x == 0) return 0; | |||||
| if (x < 0) return -cbrt_approx(-x); | |||||
| double guess = x / 3.0; | |||||
| for (int i = 0; i < 10; i++) { | |||||
| guess = (2.0 * guess + x / (guess * guess)) / 3.0; | |||||
| } | } | ||||
| /* 使用多项式近似求解 */ | |||||
| /* 设 x = J·s/(v₀³), 则 t/τ ≈ 1 + x/6 - x²/36,其中 τ = s/v₀ */ | |||||
| uint64_t v0_sq = (uint64_t)vel_start * vel_start; | |||||
| uint64_t v0_cu = v0_sq * vel_start; | |||||
| /* 基础时间估计: τ = s/v₀ */ | |||||
| uint64_t tau_ms = displacement / vel_start; | |||||
| /* 修正项计算: x = J·s/(v₀³) */ | |||||
| uint64_t x_numerator = (uint64_t)jerk * displacement; | |||||
| uint64_t x = x_numerator / v0_cu; | |||||
| /* 多项式修正: t ≈ τ·(1 + x/6 - x²/36) */ | |||||
| uint64_t correction = x / 6; | |||||
| if (x < 36) { /* 防止溢出和负数 */ | |||||
| uint64_t x_sq = x * x; | |||||
| if (correction > x_sq / 36) { | |||||
| correction -= x_sq / 36; | |||||
| return guess; | |||||
| } | |||||
| /** | |||||
| * @brief 第一阶段:根据脉冲数计算时间(加加速段,牛顿迭代) | |||||
| * 方程: (1/6)*J_real*t^3 - S*1000 = 0 | |||||
| * @param pulse_num 当前脉冲数 | |||||
| * @param jerk 加加速度 (Hz/ms²) | |||||
| * @return 时间 (ms) | |||||
| */ | |||||
| static double SCurve_GetTimeFromPulses_Phase1(uint32_t pulse_num, uint32_t jerk) { | |||||
| if (pulse_num == 0 || jerk == 0) return 0.0; | |||||
| double S_cont = (double)pulse_num * 1000.0; // 脉冲转换为连续量 | |||||
| double J_real = (double)jerk / 1000.0; // Hz/ms² | |||||
| // 初始猜测:用反函数近似值作为初始点 | |||||
| double t = cbrt_approx((6.0 * S_cont) / J_real); | |||||
| if (t <= 0.0) t = 1.0; // 避免负数或零 | |||||
| // 牛顿迭代 | |||||
| for (int i = 0; i < 40; ++i) { | |||||
| double t2 = t * t; | |||||
| double t3 = t2 * t; | |||||
| double F = (1.0 / 6.0) * J_real * t3 - S_cont; | |||||
| double dF = 0.5 * J_real * t2; | |||||
| if (fabs(dF) < 1e-12) break; | |||||
| double t_new = t - F / dF; | |||||
| if (t_new <= 0.0) { | |||||
| t_new = t * 0.5; | |||||
| } | } | ||||
| if (fabs(t_new - t) < 1e-7) { | |||||
| t = t_new; | |||||
| break; | |||||
| } | |||||
| t = t_new; | |||||
| } | } | ||||
| uint64_t time_ms = tau_ms + (tau_ms * correction) / 1000; | |||||
| if (time_ms == 0) time_ms = 1; | |||||
| /* 计算速度: v = v₀ ± (1/2)·J·t² */ | |||||
| uint64_t time_sq = (time_ms * time_ms) / 1000; /* 防止溢出 */ | |||||
| uint64_t accel_term = ((uint64_t)jerk * time_sq) / 2; | |||||
| uint64_t velocity; | |||||
| if (is_deceleration) { | |||||
| /* 减速: v = v₀ - (1/2)·J·t² */ | |||||
| velocity = ((uint64_t)vel_start * 1000 > accel_term) ? | |||||
| ((uint64_t)vel_start * 1000 - accel_term) / 1000 : 0; | |||||
| } else { | |||||
| /* 加速: v = v₀ + (1/2)·J·t² */ | |||||
| velocity = vel_start + accel_term / 1000; | |||||
| } | |||||
| return CLAMP_FREQUENCY(velocity); | |||||
| if (t < 0.0) t = 0.0; | |||||
| return t; // ms | |||||
| } | } | ||||
| /* ==================== 第二阶段多项式求解(jerk减小阶段)==================== */ | |||||
| static uint32_t SCurve_SolvePhase2_Polynomial(uint32_t vel_start, uint32_t jerk, | |||||
| uint32_t jerk_time_ms, uint64_t displacement, | |||||
| uint8_t is_deceleration) | |||||
| { | |||||
| if (jerk == 0 || jerk_time_ms == 0) return vel_start; | |||||
| /* 第二阶段的起点速度计算 */ | |||||
| uint64_t T_sq = (uint64_t)jerk_time_ms * jerk_time_ms; | |||||
| uint32_t vel_mid; | |||||
| if (is_deceleration) { | |||||
| /* 减速段:第二阶段起点是第一阶段结束点 */ | |||||
| vel_mid = ((uint64_t)vel_start * 1000 > (jerk * T_sq) / 2) ? | |||||
| vel_start - (uint32_t)((jerk * T_sq) / 2000) : 0; | |||||
| /* Phase2: pulses*1000 = Vmid*t + 0.5*Amax*t^2 - (1/6)*J_real*t^3 | |||||
| 其中 Amax = J_real * Tj (Tj 单位 ms), J_real = jerk / 1000 */ | |||||
| static double SCurve_GetTimeFromPulses_Phase2(uint32_t pulse_num, uint32_t V0, | |||||
| uint32_t jerk, uint32_t Tj) { | |||||
| if (pulse_num == 0) return 0.0; | |||||
| double J_real = (double)jerk / 1000.0; /* Hz / ms^2 */ | |||||
| double Tj_d = (double)Tj; /* ms */ | |||||
| double Amax = J_real * Tj_d; /* Hz / ms (注意单位:a in Hz per ms) */ | |||||
| double Vmid = (double)V0; /* V0 parameter here is vmid (caller should pass vmid) */ | |||||
| double S_cont = (double)pulse_num * 1000.0; /* 连续量 */ | |||||
| double t; | |||||
| if (Vmid > 0.0) | |||||
| { | |||||
| t = S_cont / Vmid; | |||||
| if (t <= 0.0) t = Tj_d / 2.0; | |||||
| } else { | } else { | ||||
| /* 加速段:第二阶段起点 */ | |||||
| vel_mid = vel_start + (uint32_t)((jerk * T_sq) / 2000); | |||||
| t = Tj_d / 2.0; | |||||
| } | } | ||||
| /* 第二阶段方程求解 */ | |||||
| /* 加速第二阶段: s = v_mid·t - (1/6)·J·t³ (减jerk) | |||||
| 减速第二阶段: s = v_mid·t + (1/6)·J·t³ (减jerk,但整体仍是减速)*/ | |||||
| if (vel_mid == 0) { | |||||
| /* 特殊情况处理 */ | |||||
| uint64_t t_cubed = (6000ULL * displacement) / jerk; | |||||
| uint32_t time_ms = cbrt_approx(t_cubed); | |||||
| uint64_t velocity; | |||||
| if (is_deceleration) { | |||||
| velocity = ((uint64_t)jerk * time_ms * time_ms) / 2000; | |||||
| } else { | |||||
| velocity = vel_mid > ((uint64_t)jerk * time_ms * time_ms) / 2000 ? | |||||
| vel_mid - ((uint64_t)jerk * time_ms * time_ms) / 2000 : 0; | |||||
| /* 牛顿迭代求解 F(t) = Vmid*t + 0.5*Amax*t^2 - (1/6)*J_real*t^3 - S_cont = 0 */ | |||||
| for (int i = 0; i < 40; ++i) { | |||||
| double t2 = t * t; | |||||
| double t3 = t2 * t; | |||||
| double F = Vmid * t + 0.5 * Amax * t2 - (1.0/6.0) * J_real * t3 - S_cont; | |||||
| double dF = Vmid + Amax * t - 0.5 * J_real * t2; | |||||
| if (fabs(dF) < 1e-12) break; | |||||
| double t_new = t - F / dF; | |||||
| if (t_new <= 0.0) { | |||||
| t_new = t * 0.5; | |||||
| } | } | ||||
| return CLAMP_FREQUENCY(velocity); | |||||
| } | |||||
| /* 多项式近似求解 */ | |||||
| uint64_t v_mid_sq = (uint64_t)vel_mid * vel_mid; | |||||
| uint64_t v_mid_cu = v_mid_sq * vel_mid; | |||||
| /* 基础时间: τ = s/v_mid */ | |||||
| uint64_t tau_ms = displacement / vel_mid; | |||||
| /* 修正项: x = J·s/(v_mid³) */ | |||||
| uint64_t x = ((uint64_t)jerk * displacement) / v_mid_cu; | |||||
| /* 第二阶段的修正(负jerk效应)*/ | |||||
| uint64_t correction = x / 6; | |||||
| uint64_t time_ms = (tau_ms > correction) ? tau_ms - correction : tau_ms; | |||||
| if (time_ms == 0) time_ms = 1; | |||||
| /* 计算最终速度 */ | |||||
| uint64_t time_sq = (time_ms * time_ms) / 1000; | |||||
| uint64_t jerk_term = ((uint64_t)jerk * time_sq) / 2000; | |||||
| uint64_t velocity; | |||||
| if (is_deceleration) { | |||||
| /* 减速第二阶段: v = v_mid + (1/2)·J·t² (注意这里是加号,因为jerk方向改变)*/ | |||||
| velocity = vel_mid + jerk_term; | |||||
| } else { | |||||
| /* 加速第二阶段: v = v_mid - (1/2)·J·t² (减jerk阶段)*/ | |||||
| velocity = (vel_mid > jerk_term) ? vel_mid - jerk_term : 0; | |||||
| if (fabs(t_new - t) < 1e-7) { | |||||
| t = t_new; | |||||
| break; | |||||
| } | |||||
| t = t_new; | |||||
| } | } | ||||
| return CLAMP_FREQUENCY(velocity); | |||||
| if (t < 0.0) t = 0.0; | |||||
| return t; /* ms */ | |||||
| } | } | ||||
| /* ==================== 主要的多项式近似速度计算函数 ==================== */ | |||||
| uint32_t SCurve_CalculateVelocityByPosition_Polynomial(PLSR_RouteConfig_t* route, | |||||
| uint8_t is_acceleration, | |||||
| uint32_t executed_pulses) | |||||
| { | |||||
| /* 主函数:使用上述两个反函数,并在计算频率时用 J_real */ | |||||
| uint32_t PLSR_Calculate_SCurve_FreqByPulses_Exact(PLSR_RouteConfig_t* route, uint8_t is_accel) { | |||||
| if (route == NULL) return 0; | if (route == NULL) return 0; | ||||
| uint32_t vel_start, jerk, jerk_time_ms; | |||||
| uint32_t phase1_pulses, phase2_pulses; | |||||
| if (is_acceleration) { | |||||
| /* 加速段参数 */ | |||||
| vel_start = route->initial_freq; | |||||
| jerk = route->scurve.accel_jerk; | |||||
| jerk_time_ms = route->scurve.accel_jerk_time_ms; | |||||
| static uint32_t s_last_freq = 0; | |||||
| int64_t current_tim2_count = __HAL_TIM_GET_COUNTER(&htim2); | |||||
| uint32_t executed_pulses = current_tim2_count; | |||||
| uint32_t V0, jerk, Tj, phase1_pulses, phase2_pulses; | |||||
| if (is_accel) { | |||||
| V0 = route->initial_freq; | |||||
| jerk = route->scurve.accel_jerk; /* NOTE: assumed scaled = J_real * 1000 */ | |||||
| Tj = route->scurve.accel_jerk_time_ms; | |||||
| phase1_pulses = route->scurve.accel_phase1_pulses; | phase1_pulses = route->scurve.accel_phase1_pulses; | ||||
| phase2_pulses = route->scurve.accel_phase2_pulses; | phase2_pulses = route->scurve.accel_phase2_pulses; | ||||
| } else { | } else { | ||||
| /* 减速段参数 */ | |||||
| vel_start = route->initial_freq; | |||||
| V0 = route->part2_target_freq; | |||||
| jerk = route->scurve.decel_jerk; | jerk = route->scurve.decel_jerk; | ||||
| jerk_time_ms = route->scurve.decel_jerk_time_ms; | |||||
| Tj = route->scurve.decel_jerk_time_ms; | |||||
| phase1_pulses = route->scurve.decel_phase1_pulses; | phase1_pulses = route->scurve.decel_phase1_pulses; | ||||
| phase2_pulses = route->scurve.decel_phase2_pulses; | phase2_pulses = route->scurve.decel_phase2_pulses; | ||||
| } | } | ||||
| if (jerk == 0 || Tj == 0) return V0; | |||||
| uint32_t calculated_freq = V0; | |||||
| if (executed_pulses == 0) { | |||||
| return V0; | |||||
| } | |||||
| else if (executed_pulses <= phase1_pulses) | |||||
| { | |||||
| /* Phase1 */ | |||||
| double t; /* ms */ | |||||
| double J_real = (double)jerk / 1000.0; /* Hz / ms^2 */ | |||||
| double vmid_double; | |||||
| double Amax = J_real * Tj; | |||||
| if (is_accel) { | |||||
| vmid_double = (double)V0 + 0.5 * J_real * Tj * Tj; | |||||
| } else | |||||
| { | |||||
| vmid_double = (double)V0 - 0.5 * J_real * Tj * Tj; | |||||
| if (vmid_double < 1.0) vmid_double = 1.0; | |||||
| } | |||||
| if (is_accel) { | |||||
| t = SCurve_GetTimeFromPulses_Phase1(executed_pulses, jerk); | |||||
| double freq_double = (double)V0 + 0.5 * J_real * t * t; /* Hz */ | |||||
| calculated_freq = (uint32_t)(freq_double + 0.5); | |||||
| } | |||||
| else | |||||
| { | |||||
| uint32_t phase2_pulse_num = phase1_pulses - executed_pulses; | |||||
| t = SCurve_GetTimeFromPulses_Phase2(phase2_pulse_num, (uint32_t)vmid_double, jerk, Tj); | |||||
| double freq_double = vmid_double + Amax * t - 0.5 * J_real * t * t; | |||||
| calculated_freq = (uint32_t)(freq_double + 0.5); | |||||
| } | |||||
| } | |||||
| else if (executed_pulses <= (phase1_pulses + phase2_pulses)) | |||||
| { | |||||
| /* Phase2 */ | |||||
| double Tj_d = (double)Tj; | |||||
| double J_real = (double)jerk / 1000.0; | |||||
| double vmid_double; | |||||
| if (is_accel) { | |||||
| vmid_double = (double)V0 + 0.5 * J_real * Tj_d * Tj_d; | |||||
| } else { | |||||
| vmid_double = (double)V0 - 0.5 * J_real * Tj_d * Tj_d; | |||||
| if (vmid_double < 1.0) vmid_double = 1.0; | |||||
| } | |||||
| double Amax = J_real * Tj_d; /* Hz / ms */ | |||||
| if (is_accel) | |||||
| { | |||||
| uint32_t phase2_pulse_num = executed_pulses - phase1_pulses; | |||||
| double t_phase2 = SCurve_GetTimeFromPulses_Phase2(phase2_pulse_num, (uint32_t)vmid_double, jerk, Tj); /* ms */ | |||||
| double freq_double = vmid_double + Amax * t_phase2 - 0.5 * J_real * t_phase2 * t_phase2; | |||||
| calculated_freq = (uint32_t)(freq_double + 0.5); | |||||
| } | |||||
| else | |||||
| { | |||||
| uint32_t phase2_pulse_num = phase2_pulses + phase1_pulses - executed_pulses + 1; | |||||
| double t_phase2 = SCurve_GetTimeFromPulses_Phase1(phase2_pulse_num, jerk); /* ms */ | |||||
| double freq_double = (double)0 + 0.5 * J_real * t_phase2 * t_phase2; /* Hz */ | |||||
| calculated_freq = (uint32_t)(freq_double + 0.5); | |||||
| } | |||||
| } else { | |||||
| calculated_freq = is_accel ? route->part1_target_freq : route->part3_target_freq; | |||||
| } | |||||
| if(calculated_freq != 0 && calculated_freq <PLSR_PWM_FREQ_MAX) | |||||
| s_last_freq = calculated_freq; | |||||
| if (calculated_freq > PLSR_PWM_FREQ_MAX) calculated_freq = PLSR_PWM_FREQ_MAX; | |||||
| if (calculated_freq == 0) calculated_freq = s_last_freq; | |||||
| return calculated_freq; | |||||
| } | |||||
| /** | |||||
| * @brief 获取下一个脉冲的周期时间 | |||||
| * @param current_freq 当前计算得到的频率 | |||||
| * @return 下一个脉冲的周期时间(微秒) | |||||
| */ | |||||
| uint32_t PLSR_GetNextPulsePeriod_us(uint32_t current_freq) { | |||||
| if (current_freq == 0) return 0xFFFFFFFF; // 无效频率 | |||||
| /* 参数有效性检查 */ | |||||
| if (jerk == 0 || jerk_time_ms == 0) return vel_start; | |||||
| if ((phase1_pulses + phase2_pulses) == 0) return vel_start; | |||||
| // 周期 = 1/频率,转换为微秒 | |||||
| uint32_t period_us = 1000000 / current_freq; | |||||
| return period_us; | |||||
| } | |||||
| /** | |||||
| * @brief 修改后的主控制函数,使用精确的反函数计算 | |||||
| */ | |||||
| uint32_t PLSR_SCurve_Control(PLSR_RouteConfig_t* route) { | |||||
| if (route == NULL) return 0; | |||||
| /* 将脉冲转换为位移 (Hz·ms) */ | |||||
| uint64_t displacement = (uint64_t)executed_pulses * 1000ULL; | |||||
| uint32_t current_freq = 0; | |||||
| /* 判断当前处于哪个阶段并求解 */ | |||||
| if (executed_pulses <= phase1_pulses) { | |||||
| /* 第一阶段:正jerk或负jerk开始 */ | |||||
| return SCurve_SolvePhase1_Polynomial(vel_start, jerk, displacement, !is_acceleration); | |||||
| } else if (executed_pulses <= (phase1_pulses + phase2_pulses)) { | |||||
| /* 第二阶段:jerk减小阶段 */ | |||||
| uint64_t phase2_displacement = (uint64_t)(executed_pulses - phase1_pulses) * 1000ULL; | |||||
| return SCurve_SolvePhase2_Polynomial(vel_start, jerk, jerk_time_ms, | |||||
| phase2_displacement, !is_acceleration); | |||||
| } else { | |||||
| /* 超出范围,返回目标速度 */ | |||||
| if (is_acceleration) { | |||||
| return CLAMP_FREQUENCY(route->part1_target_freq); | |||||
| } else { | |||||
| return CLAMP_FREQUENCY(route->part3_target_freq); | |||||
| } | |||||
| switch(route->run_state) { | |||||
| case PLSR_STATE_ACCEL: | |||||
| // 加速阶段使用精确S曲线计算 | |||||
| current_freq = PLSR_Calculate_SCurve_FreqByPulses_Exact(route, 1); | |||||
| break; | |||||
| case PLSR_STATE_DECEL: | |||||
| // 减速阶段使用精确S曲线计算 | |||||
| current_freq = PLSR_Calculate_SCurve_FreqByPulses_Exact(route, 0); | |||||
| break; | |||||
| case PLSR_STATE_CONST: | |||||
| // 匀速阶段保持目标频率 | |||||
| current_freq = route->target_freq; | |||||
| break; | |||||
| default: | |||||
| current_freq = route->current_freq; | |||||
| break; | |||||
| } | } | ||||
| return current_freq; | |||||
| } | } | ||||
| @@ -14,13 +14,13 @@ | |||||
| <StLinkDriver> | <StLinkDriver> | ||||
| <stlinkserialNo>46232557</stlinkserialNo> | <stlinkserialNo>46232557</stlinkserialNo> | ||||
| <stlinkfoundProbes /> | <stlinkfoundProbes /> | ||||
| <CStepIntDis>_ 0</CStepIntDis> | |||||
| <LeaveTargetRunning>_ 0</LeaveTargetRunning> | |||||
| <stlinkResetStyle>0</stlinkResetStyle> | <stlinkResetStyle>0</stlinkResetStyle> | ||||
| <stlinkResetStrategy>2</stlinkResetStrategy> | <stlinkResetStrategy>2</stlinkResetStrategy> | ||||
| <CStepIntDis>_ 0</CStepIntDis> | |||||
| <LeaveTargetRunning>_ 0</LeaveTargetRunning> | |||||
| </StLinkDriver> | </StLinkDriver> | ||||
| <DebugChecksum> | <DebugChecksum> | ||||
| <Checksum>3379969080</Checksum> | |||||
| <Checksum>1483733799</Checksum> | |||||
| </DebugChecksum> | </DebugChecksum> | ||||
| <Exceptions> | <Exceptions> | ||||
| <StopOnUncaught>_ 0</StopOnUncaught> | <StopOnUncaught>_ 0</StopOnUncaught> | ||||
| @@ -84,13 +84,6 @@ | |||||
| <LogFile>_ ""</LogFile> | <LogFile>_ ""</LogFile> | ||||
| <Category>_ 0</Category> | <Category>_ 0</Category> | ||||
| </LogFile> | </LogFile> | ||||
| <DisassembleMode> | |||||
| <mode>0</mode> | |||||
| </DisassembleMode> | |||||
| <Aliases> | |||||
| <Count>0</Count> | |||||
| <SuppressDialog>0</SuppressDialog> | |||||
| </Aliases> | |||||
| <Trace2> | <Trace2> | ||||
| <Enabled>0</Enabled> | <Enabled>0</Enabled> | ||||
| <ShowSource>0</ShowSource> | <ShowSource>0</ShowSource> | ||||
| @@ -136,9 +129,6 @@ | |||||
| <ShowTimeSum>1</ShowTimeSum> | <ShowTimeSum>1</ShowTimeSum> | ||||
| <SumSortOrder>0</SumSortOrder> | <SumSortOrder>0</SumSortOrder> | ||||
| </EventLog> | </EventLog> | ||||
| <Breakpoints2> | |||||
| <Count>0</Count> | |||||
| </Breakpoints2> | |||||
| <DriverProfiling> | <DriverProfiling> | ||||
| <Enabled>0</Enabled> | <Enabled>0</Enabled> | ||||
| <Mode>3</Mode> | <Mode>3</Mode> | ||||
| @@ -152,4 +142,14 @@ | |||||
| <CallStackStripe> | <CallStackStripe> | ||||
| <ShowTiming>1</ShowTiming> | <ShowTiming>1</ShowTiming> | ||||
| </CallStackStripe> | </CallStackStripe> | ||||
| <DisassembleMode> | |||||
| <mode>0</mode> | |||||
| </DisassembleMode> | |||||
| <Breakpoints2> | |||||
| <Count>0</Count> | |||||
| </Breakpoints2> | |||||
| <Aliases> | |||||
| <Count>0</Count> | |||||
| <SuppressDialog>0</SuppressDialog> | |||||
| </Aliases> | |||||
| </settings> | </settings> | ||||
| @@ -1,64 +1,104 @@ | |||||
| # ninja log v5 | # ninja log v5 | ||||
| 556 591 7784095308609417 stm32f4xx_ll_rng.pbi 5e12b9ea00d0b826 | |||||
| 38 105 7784095303419003 stm32f4xx_ll_gpio.pbi df8b54563945d41d | |||||
| 583 646 7784095308935140 stm32f4xx_ll_tim.pbi b88554c6464192f5 | |||||
| 1057 1444 7784095316950350 stm32f4xx_hal_flash_ex.pbi ac2d035774fe6a2e | |||||
| 1051 1448 7784095316960349 stm32f4xx_hal_pwr.pbi b347497fce55b6a8 | |||||
| 141 175 7784095304450158 stm32f4xx_ll_pwr.pbi 952cb4e4f4edb65b | |||||
| 1578 1657 7784095318867766 test.1_part7.pbi 500429da32d98820 | |||||
| 1524 2108 7784095323780438 test.1_part3.pbi 351715abf331fd8f | |||||
| 45 458 7784095307257064 stm32f4xx_hal_rcc_ex.pbi c1d751d24d77a2df | |||||
| 597 666 7784095309345140 app_hooks.pbi ffd399489d189d5a | |||||
| 1450 2093 7784095323353785 test.1_part4.pbi 56a4af6f8e33d2b8 | |||||
| 42 433 7784095307007069 stm32f4xx_hal_pwr_ex.pbi b84426bf5a4ce0cf | |||||
| 600 685 7784095309395131 os_cpu_c.pbi eb75b848b406ea34 | |||||
| 1145 1524 7784095317900360 stm32f4xx_hal_rcc.pbi 50976e6b18f3b8bc | |||||
| 103 599 7784095308679416 stm32f4xx_hal_tim.pbi 71840baae88d57c4 | |||||
| 1054 1450 7784095316880351 stm32f4xx_hal_usart.pbi b368fafd8b8b8bb9 | |||||
| 4151 5857 7784095360879135 test.1.pbw f11e09b552b4c82f | |||||
| 503 538 7784905999900596 stm32f4xx_ll_rng.pbi 5e12b9ea00d0b826 | |||||
| 40 71 7784905995236899 stm32f4xx_ll_gpio.pbi df8b54563945d41d | |||||
| 147 542 7784905999950612 stm32f4xx_hal_flash_ex.pbi ac2d035774fe6a2e | |||||
| 47 438 7784905998849550 stm32f4xx_hal_pwr.pbi b347497fce55b6a8 | |||||
| 45 79 7784905995286895 stm32f4xx_ll_pwr.pbi 952cb4e4f4edb65b | |||||
| 41 74 7784905995236899 stm32f4xx_ll_tim.pbi b88554c6464192f5 | |||||
| 619 677 7784906001271479 test.1_part7.pbi 500429da32d98820 | |||||
| 1098 1738 7784906011909270 test.1_part3.pbi 351715abf331fd8f | |||||
| 980 1370 7784906008199754 stm32f4xx_hal_rcc_ex.pbi c1d751d24d77a2df | |||||
| 74 141 7784905995934806 app_hooks.pbi ffd399489d189d5a | |||||
| 77 146 7784905995994802 os_cpu_c.pbi eb75b848b406ea34 | |||||
| 677 1097 7784906004872212 stm32f4xx_hal_pwr_ex.pbi b84426bf5a4ce0cf | |||||
| 1374 2019 7784906014714303 test.1_part4.pbi 56a4af6f8e33d2b8 | |||||
| 587 980 7784906004332215 stm32f4xx_hal_rcc.pbi 50976e6b18f3b8bc | |||||
| 36 425 7784905998551969 stm32f4xx_hal_usart.pbi b368fafd8b8b8bb9 | |||||
| 439 950 7784906003781095 stm32f4xx_hal_tim.pbi 71840baae88d57c4 | |||||
| 43 76 7784905995266903 stm32f4xx_ll_dac.pbi 7dfc4be0933cdfaf | |||||
| 2014 2487 7762488664073707 uart.pbi 5ce52444157923c9 | 2014 2487 7762488664073707 uart.pbi 5ce52444157923c9 | ||||
| 1282 1328 7784095315920352 stm32f4xx_ll_dac.pbi 7dfc4be0933cdfaf | |||||
| 495 556 7784095308065863 stm32f4xx_ll_crc.pbi dcf41d4b97590765 | |||||
| 456 494 7784095307637066 stm32f4xx_ll_rcc.pbi fb9ace481decf8ab | |||||
| 2369 2693 7784095329629266 stm32f4xx_hal_msp.pbi 8144db72f01a260b | |||||
| 558 596 7784095308659413 stm32f4xx_ll_spi.pbi ce805017b70a4f43 | |||||
| 1415 1578 7784095318480350 os_dbg.pbi f7287a072fe86a55 | |||||
| 592 772 7784095310045139 stm32f4xx_ll_usart.pbi 783190689e783d9 | |||||
| 2545 2884 7784095331409267 stm32f4xx_hal_crc.pbi 881b29e4c80746b3 | |||||
| 33 103 7784095303369004 stm32f4xx_ll_dma.pbi f9e6142ede2883b4 | |||||
| 36 108 7784095303399009 stm32f4xx_ll_exti.pbi 883a2fd463949e02 | |||||
| 1386 1414 7784095316700350 test.1_part5.pbi 6e09abdb5099df5f | |||||
| 1328 1572 7784095318370346 ucos_ii.pbi 4e0ab25e0060431e | |||||
| 1657 2027 7784095322863806 stm32f4xx_hal.pbi a073c739b6b34173 | |||||
| 108 140 7784095304100165 stm32f4xx_ll_i2c.pbi 7f1151d8874c40c9 | |||||
| 459 879 7784095311115129 stm32f4xx_hal_sram.pbi 4652c5af4efd4e19 | |||||
| 667 1054 7784095313095130 stm32f4xx_hal_flash.pbi eccf13860e1d0c6a | |||||
| 1445 1468 7784095317390342 test.1_part6.pbi 1f990020cfbdc2d2 | |||||
| 880 1386 7784095316550352 stm32f4xx_hal_tim_ex.pbi 3c68a2e86514987f | |||||
| 646 1051 7784095312665144 stm32f4xx_hal_flash_ramfunc.pbi ae498685b336a49c | |||||
| 433 816 7784095310855143 stm32f4xx_hal_wwdg.pbi fca2b44f67349f99 | |||||
| 106 558 7784095308245789 stm32f4xx_hal_uart.pbi e7ca7ebbb4330340 | |||||
| 3970 5650 7784906050685098 test.1.pbw f11e09b552b4c82f | |||||
| 71 103 7784905995539064 stm32f4xx_ll_crc.pbi dcf41d4b97590765 | |||||
| 957 996 7784906004482217 stm32f4xx_ll_rcc.pbi fb9ace481decf8ab | |||||
| 464 502 7784905999549267 stm32f4xx_ll_spi.pbi ce805017b70a4f43 | |||||
| 1854 2232 7784906016719795 stm32f4xx_hal_msp.pbi 8144db72f01a260b | |||||
| 481 518 7784905999710625 stm32f4xx_ll_usart.pbi 783190689e783d9 | |||||
| 551 618 7784906000714119 os_dbg.pbi f7287a072fe86a55 | |||||
| 538 574 7784906000256720 stm32f4xx_ll_dma.pbi f9e6142ede2883b4 | |||||
| 1620 1981 7784906014335546 stm32f4xx_hal_crc.pbi 881b29e4c80746b3 | |||||
| 425 480 7784905999168351 stm32f4xx_ll_exti.pbi 883a2fd463949e02 | |||||
| 141 310 7784905997266114 ucos_ii.pbi 4e0ab25e0060431e | |||||
| 575 586 7784906000398041 test.1_part5.pbi 6e09abdb5099df5f | |||||
| 518 554 7784906000056714 stm32f4xx_ll_i2c.pbi 7f1151d8874c40c9 | |||||
| 1981 2339 7784906017916397 stm32f4xx_hal.pbi a073c739b6b34173 | |||||
| 716 1094 7784906005193626 stm32f4xx_hal_sram.pbi 4652c5af4efd4e19 | |||||
| 996 1091 7784906004752222 test.1_part6.pbi 1f990020cfbdc2d2 | |||||
| 1738 2101 7784906015542605 stm32f4xx_hal_flash.pbi eccf13860e1d0c6a | |||||
| 950 1373 7784906008199754 stm32f4xx_hal_tim_ex.pbi 3c68a2e86514987f | |||||
| 953 1356 7784906008069749 stm32f4xx_hal_wwdg.pbi fca2b44f67349f99 | |||||
| 79 463 7784905999128352 stm32f4xx_hal_flash_ramfunc.pbi ae498685b336a49c | |||||
| 104 551 7784905999980595 stm32f4xx_hal_uart.pbi e7ca7ebbb4330340 | |||||
| 35 454 7762489045860992 timer.pbi 8f8acc6a162957f | 35 454 7762489045860992 timer.pbi 8f8acc6a162957f | ||||
| 817 1281 7784095315510351 stm32f4xx_hal_i2c.pbi 74395538aa12fa10 | |||||
| 2579 3023 7784095332931819 stm32f4xx_hal_dma.pbi 2d6aa8f3983bf80a | |||||
| 2028 2402 7784095326633620 stm32f4xx_hal_timebase_tim.pbi b6f5ce0feaca8054 | |||||
| 685 1057 7784095313215134 stm32f4xx_hal_dma_ex.pbi 1960c5ab56ffede7 | |||||
| 176 583 7784095308534324 stm32f4xx_hal_i2c_ex.pbi 7798e48f8e6ef374 | |||||
| 39 455 7784095307177070 stm32f4xx_hal_exti.pbi 373789209d565f00 | |||||
| 2108 2578 7784095328313628 main.pbi 9c0a6aa02351636a | |||||
| 2402 2827 7784095330459267 stm32f4xx_it.pbi d01766022cb163bc | |||||
| 2422 2883 7784095331169269 stm32f4xx_hal_cortex.pbi 2c6d2473a153fb5a | |||||
| 2828 3211 7784095334201534 system_stm32f4xx.pbi f50e519d7e78a5de | |||||
| 2094 2545 7784095328073625 gpio.pbi a088b5271f02118a | |||||
| 3777 4151 7784095344123703 test.1.pbd 363d5d355a216cdf | |||||
| 2693 3312 7784095335559038 test.1_part0.pbi 60db414ccd7a80f4 | |||||
| 773 1145 7784095313986274 stm32f4xx_hal_gpio.pbi 53b438f48be9a8d0 | |||||
| 3212 3777 7784095340331742 test.1_part1.pbi 132c9eecf11b0e50 | |||||
| 3024 3555 7784095338269031 test.1_part2.pbi 9358ff0702a0a659 | |||||
| 2062 2421 7784095326913633 dma.pbi 4f5ebe00ac67ed57 | |||||
| 1468 2062 7784095323280687 tim.pbi f07c6d790a519d93 | |||||
| 2537 2985 7784095332441816 usart.pbi 7c2d93866867ab60 | |||||
| 1903 2369 7784095326383628 modbus_log.pbi 596603da5f343c45 | |||||
| 1573 2030 7784095323003812 modbus_crc.pbi 9b76681ddf289794 | |||||
| 1448 1903 7784095321727763 flash_save.pbi dc7405226be28cc6 | |||||
| 2030 2536 7784095327803633 tools.pbi 50c1b905eccec5a9 | |||||
| 310 716 7784906001535050 stm32f4xx_hal_i2c.pbi 74395538aa12fa10 | |||||
| 1095 1510 7784906009628406 stm32f4xx_hal_dma.pbi 2d6aa8f3983bf80a | |||||
| 2264 2623 7784906020742722 stm32f4xx_hal_timebase_tim.pbi b6f5ce0feaca8054 | |||||
| 542 953 7784906003680996 stm32f4xx_hal_i2c_ex.pbi 7798e48f8e6ef374 | |||||
| 1511 1902 7784906013479985 stm32f4xx_hal_dma_ex.pbi 1960c5ab56ffede7 | |||||
| 1902 2360 7784906018132419 main.pbi 9c0a6aa02351636a | |||||
| 1874 2264 7784906017054568 stm32f4xx_hal_exti.pbi 373789209d565f00 | |||||
| 2396 2870 7784906023223742 stm32f4xx_it.pbi d01766022cb163bc | |||||
| 2623 2999 7784906023983113 stm32f4xx_hal_cortex.pbi 2c6d2473a153fb5a | |||||
| 2465 2803 7784906022507497 system_stm32f4xx.pbi f50e519d7e78a5de | |||||
| 2339 2770 7784906022184342 gpio.pbi a088b5271f02118a | |||||
| 555 956 7784906003860996 stm32f4xx_hal_gpio.pbi 53b438f48be9a8d0 | |||||
| 2771 3337 7784906027909005 test.1_part0.pbi 60db414ccd7a80f4 | |||||
| 3571 3970 7784906034025292 test.1.pbd 363d5d355a216cdf | |||||
| 2871 3438 7784906028921550 test.1_part1.pbi 132c9eecf11b0e50 | |||||
| 3000 3570 7784906029571553 test.1_part2.pbi 9358ff0702a0a659 | |||||
| 2020 2395 7784906018488587 dma.pbi 4f5ebe00ac67ed57 | |||||
| 2360 2825 7784906022773747 tim.pbi f07c6d790a519d93 | |||||
| 1371 1853 7784906012969969 usart.pbi 7c2d93866867ab60 | |||||
| 2232 2678 7784906021193269 modbus_log.pbi 596603da5f343c45 | |||||
| 1091 1619 7784906010590373 flash_save.pbi dc7405226be28cc6 | |||||
| 2102 2464 7784906019147050 modbus_crc.pbi 9b76681ddf289794 | |||||
| 1356 1873 7784906013259981 tools.pbi 50c1b905eccec5a9 | |||||
| 43 582 7784915618440897 tim.pbi f07c6d790a519d93 | |||||
| 583 1325 7784915625876327 test.1_part1.pbi 132c9eecf11b0e50 | |||||
| 1326 1767 7784915630302801 test.1.pbd 363d5d355a216cdf | |||||
| 1768 3779 7784915649985852 test.1.pbw f11e09b552b4c82f | |||||
| 45 562 7784917494463934 tim.pbi f07c6d790a519d93 | |||||
| 563 1285 7784917501703826 test.1_part1.pbi 132c9eecf11b0e50 | |||||
| 1286 1767 7784917506520187 test.1.pbd 363d5d355a216cdf | |||||
| 1768 3893 7784917527374567 test.1.pbw f11e09b552b4c82f | |||||
| 39 509 7784928623168062 tim.pbi f07c6d790a519d93 | |||||
| 510 1220 7784928630292184 test.1_part1.pbi 132c9eecf11b0e50 | |||||
| 1221 1677 7784928634860123 test.1.pbd 363d5d355a216cdf | |||||
| 1677 3707 7784928654757887 test.1.pbw f11e09b552b4c82f | |||||
| 41 492 7784928682875712 tim.pbi f07c6d790a519d93 | |||||
| 493 1162 7784928689567952 test.1_part1.pbi 132c9eecf11b0e50 | |||||
| 1163 1600 7784928693956627 test.1.pbd 363d5d355a216cdf | |||||
| 1601 3646 7784928714013822 test.1.pbw f11e09b552b4c82f | |||||
| 42 507 7784929504874213 tim.pbi f07c6d790a519d93 | |||||
| 508 1217 7784929511969174 test.1_part1.pbi 132c9eecf11b0e50 | |||||
| 1218 1691 7784929516709113 test.1.pbd 363d5d355a216cdf | |||||
| 1692 4068 7784929539993199 test.1.pbw f11e09b552b4c82f | |||||
| 44 524 7784929568784599 tim.pbi f07c6d790a519d93 | |||||
| 524 1252 7784929576084917 test.1_part1.pbi 132c9eecf11b0e50 | |||||
| 1253 1705 7784929580604105 test.1.pbd 363d5d355a216cdf | |||||
| 1706 3866 7784929601822108 test.1.pbw f11e09b552b4c82f | |||||
| 48 721 7784931433466139 tim.pbi f07c6d790a519d93 | |||||
| 721 1573 7784931441998409 test.1_part1.pbi 132c9eecf11b0e50 | |||||
| 1574 2160 7784931447880427 test.1.pbd 363d5d355a216cdf | |||||
| 2161 4862 7784931474512163 test.1.pbw f11e09b552b4c82f | |||||
| 55 654 7784932500994422 tim.pbi f07c6d790a519d93 | |||||
| 655 1523 7784932509680475 test.1_part1.pbi 132c9eecf11b0e50 | |||||
| 1524 2052 7784932514983677 test.1.pbd 363d5d355a216cdf | |||||
| 2053 4809 7784932542008043 test.1.pbw f11e09b552b4c82f | |||||
| 47 543 7784933276338789 tim.pbi f07c6d790a519d93 | |||||
| 544 1299 7784933283907452 test.1_part1.pbi 132c9eecf11b0e50 | |||||
| 1300 1771 7784933288637568 test.1.pbd 363d5d355a216cdf | |||||
| 1772 4061 7784933311146536 test.1.pbw f11e09b552b4c82f | |||||
| 47 683 7784933341606110 tim.pbi f07c6d790a519d93 | |||||
| 684 1547 7784933350245080 test.1_part1.pbi 132c9eecf11b0e50 | |||||
| 1548 1999 7784933354770500 test.1.pbd 363d5d355a216cdf | |||||
| 2000 4664 7784933380938479 test.1.pbw f11e09b552b4c82f | |||||
| @@ -1,59 +1,55 @@ | |||||
| tim.pbi: e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\Core\Src\tim.c \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM/../Core/Inc\tim.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM/../Core/Inc/main.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM/../Drivers/STM32F4xx_HAL_Driver/Inc\stm32f4xx_hal.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM/../Core/Inc\stm32f4xx_hal_conf.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM/../Drivers/STM32F4xx_HAL_Driver/Inc\stm32f4xx_hal_rcc.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM/../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM/../Drivers/CMSIS/Device/ST/STM32F4xx/Include\stm32f4xx.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM/../Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f407xx.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM/../Drivers/CMSIS/Include\core_cm4.h \ | |||||
| E:\Software\IAR\arm\inc\c\stdint.h E:\Software\IAR\arm\inc\c\ycheck.h \ | |||||
| E:\Software\IAR\arm\inc\c\yvals.h \ | |||||
| E:\Software\IAR\arm\inc\c\DLib_Defaults.h \ | |||||
| E:\\Software\\IAR\\arm\\inc\\c\\DLib_Config_Full.h \ | |||||
| E:\Software\IAR\arm\inc\c\DLib_Product.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM/../Drivers/CMSIS/Include/cmsis_version.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM/../Drivers/CMSIS/Include/cmsis_compiler.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM/../Drivers/CMSIS/Include\cmsis_iccarm.h \ | |||||
| E:\Software\IAR\arm\inc\c\iccarm_builtin.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM/../Drivers/CMSIS/Include/mpu_armv7.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM/../Drivers/CMSIS/Device/ST/STM32F4xx/Include/system_stm32f4xx.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM/../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ | |||||
| E:\Software\IAR\arm\inc\c\stddef.h E:\Software\IAR\arm\inc\c\ysizet.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM/../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc_ex.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM/../Drivers/STM32F4xx_HAL_Driver/Inc\stm32f4xx_hal_gpio.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM/../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio_ex.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM/../Drivers/STM32F4xx_HAL_Driver/Inc\stm32f4xx_hal_exti.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM/../Drivers/STM32F4xx_HAL_Driver/Inc\stm32f4xx_hal_dma.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM/../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma_ex.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM/../Drivers/STM32F4xx_HAL_Driver/Inc\stm32f4xx_hal_cortex.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM/../Drivers/STM32F4xx_HAL_Driver/Inc\stm32f4xx_hal_flash.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM/../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ex.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM/../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ramfunc.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM/../Drivers/STM32F4xx_HAL_Driver/Inc\stm32f4xx_hal_pwr.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM/../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr_ex.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM/../Drivers/STM32F4xx_HAL_Driver/Inc\stm32f4xx_hal_tim.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM/../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_tim_ex.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM/../Drivers/STM32F4xx_HAL_Driver/Inc\stm32f4xx_hal_uart.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM/../Core/Inc/usart.h \ | |||||
| E:\Software\IAR\arm\inc\c\stdio.h E:\Software\IAR\arm\inc\c\string.h \ | |||||
| E:\Software\IAR\arm\inc\c\DLib_Product_string.h \ | |||||
| E:\Software\IAR\arm\inc\c\ctype.h E:\Software\IAR\arm\inc\c\stdlib.h \ | |||||
| E:\Software\IAR\arm\inc\c\DLib_Product_stdlib.h \ | |||||
| E:\Software\IAR\arm\inc\c\stdarg.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM/../Core/Inc/modbus_crc.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM/../Core/Inc/flash_save.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM/../Core/Inc/modbus_log.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM/../Core/Inc/tim.h \ | |||||
| E:\Software\IAR\arm\inc\c\math.h \ | |||||
| E:\Software\IAR\arm\inc\c\DLib_float_setup.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM\..\UCOS\Source\ucos_ii.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM\..\UCOS\Config\app_cfg.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM\..\UCOS\Config\os_cfg.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM\..\UCOS\Ports\os_cpu.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM\..\UCOS\Source/os_trace.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM/../Core/Inc/gpio.h \ | |||||
| tim.pbi: E:\Software\IAR\arm\inc\c\iar_intrinsics_common.h \ | |||||
| E:\Software\IAR\arm\inc\c\intrinsics.h \ | E:\Software\IAR\arm\inc\c\intrinsics.h \ | ||||
| E:\Software\IAR\arm\inc\c\iar_intrinsics_common.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM/../Core/Inc\flash_save.h | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM\..\Core\Inc\tim.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM\..\Core\Inc\gpio.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM\..\UCOS\Source\os_trace.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM\..\UCOS\Ports\os_cpu.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM\..\UCOS\Config\os_cfg.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM\..\UCOS\Config\app_cfg.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM\..\UCOS\Source\ucos_ii.h \ | |||||
| E:\Software\IAR\arm\inc\c\DLib_float_setup.h \ | |||||
| E:\Software\IAR\arm\inc\c\ycheck.h E:\Software\IAR\arm\inc\c\math.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM\..\Core\Inc\usart.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM\..\Core\Inc\modbus_log.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM\..\Core\Inc\flash_save.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM\..\Core\Inc\modbus_crc.h \ | |||||
| E:\Software\IAR\arm\inc\c\stdarg.h \ | |||||
| E:\Software\IAR\arm\inc\c\DLib_Product_stdlib.h \ | |||||
| E:\Software\IAR\arm\inc\c\stdlib.h E:\Software\IAR\arm\inc\c\ctype.h \ | |||||
| E:\Software\IAR\arm\inc\c\DLib_Product_string.h \ | |||||
| E:\Software\IAR\arm\inc\c\string.h E:\Software\IAR\arm\inc\c\stdio.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM\..\Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_uart.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM\..\Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_tim_ex.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM\..\Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_tim.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM\..\Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_pwr_ex.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM\..\Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_pwr.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM\..\Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_flash_ramfunc.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM\..\Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_flash_ex.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM\..\Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_flash.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM\..\Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_cortex.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM\..\Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_dma_ex.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM\..\Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_dma.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM\..\Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_exti.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM\..\Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_gpio_ex.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM\..\Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_gpio.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM\..\Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_rcc_ex.h \ | |||||
| E:\Software\IAR\arm\inc\c\ysizet.h E:\Software\IAR\arm\inc\c\stddef.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM\..\Drivers\STM32F4xx_HAL_Driver\Inc\Legacy\stm32_hal_legacy.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM\..\Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM\..\Drivers\CMSIS\Device\ST\STM32F4xx\Include\system_stm32f4xx.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM\..\Drivers\CMSIS\Include\mpu_armv7.h \ | |||||
| E:\Software\IAR\arm\inc\c\iccarm_builtin.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM\..\Drivers\CMSIS\Include\cmsis_iccarm.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM\..\Drivers\CMSIS\Include\cmsis_compiler.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM\..\Drivers\CMSIS\Include\cmsis_version.h \ | |||||
| E:\Software\IAR\arm\inc\c\DLib_Product.h \ | |||||
| E:\Software\IAR\arm\inc\c\DLib_Defaults.h \ | |||||
| E:\Software\IAR\arm\inc\c\yvals.h E:\Software\IAR\arm\inc\c\stdint.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM\..\Drivers\CMSIS\Include\core_cm4.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM\..\Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f407xx.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM\..\Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f4xx.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM\..\Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_def.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM\..\Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_rcc.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM\..\Core\Inc\stm32f4xx_hal_conf.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM\..\Core\Inc\main.h \ | |||||
| e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\Core\Src\tim.c | |||||