@@ -149,11 +149,11 @@ typedef struct { | |||||
uint32_t current_freq; // 当前频率 | uint32_t current_freq; // 当前频率 | ||||
uint32_t target_freq; // 目标频率 | uint32_t target_freq; // 目标频率 | ||||
uint32_t pulse_count; // 当前脉冲计数 | uint32_t pulse_count; // 当前脉冲计数 | ||||
uint32_t prevPulseCount; // 上阶段目标脉冲 | |||||
uint32_t prevPulseCount; // 上阶段目标脉冲 | |||||
uint32_t start_freq; // 起始频率 | uint32_t start_freq; // 起始频率 | ||||
uint32_t end_freq; // 结束频率 | uint32_t end_freq; // 结束频率 | ||||
uint8_t output_port; // 输出端口选择 | uint8_t output_port; // 输出端口选择 | ||||
uint8_t dir_port; //<方向端口选择 | |||||
uint8_t dir_port; ///< 方向端口选择:0-正逻辑(脉冲递增),1-负逻辑(脉冲递减) | |||||
PLSR_Mode_t mode; // 模式(相对/绝对) | PLSR_Mode_t mode; // 模式(相对/绝对) | ||||
PLSR_Direction_t direction; // 方向 | PLSR_Direction_t direction; // 方向 | ||||
PLSR_AccelConfig_t accel_config; // 加减速配置 | PLSR_AccelConfig_t accel_config; // 加减速配置 | ||||
@@ -190,10 +190,6 @@ typedef struct { | |||||
#define PLSR_DEFAULT_START_SECTION 0 // 默认起始段编号 | #define PLSR_DEFAULT_START_SECTION 0 // 默认起始段编号 | ||||
#define PLSR_TASK_CHECK_INTERVAL 100 // 每100个脉冲通知任务一次 | #define PLSR_TASK_CHECK_INTERVAL 100 // 每100个脉冲通知任务一次 | ||||
extern uint32_t g_plsr_total_pulse_count; | |||||
// 基础PWM函数 | // 基础PWM函数 | ||||
// ==================== PWM控制函数 ==================== | // ==================== PWM控制函数 ==================== | ||||
void PLSR_PWM_Init(void); | void PLSR_PWM_Init(void); | ||||
@@ -211,12 +207,11 @@ void PLSR_Section_Process(PLSR_RouteConfig_t* route); //<段处理 | |||||
// ==================== PLSR段控制函数 ==================== | // ==================== PLSR段控制函数 ==================== | ||||
void PLSR_Section_SwitchNext(PLSR_RouteConfig_t* route); //<切换段 | void PLSR_Section_SwitchNext(PLSR_RouteConfig_t* route); //<切换段 | ||||
uint8_t PLSR_Section_CheckWaitCondition(PLSR_RouteConfig_t* route); //<检查等待条件是否满足 | uint8_t PLSR_Section_CheckWaitCondition(PLSR_RouteConfig_t* route); //<检查等待条件是否满足 | ||||
void PLSR_Section_CalculateConstPulse(PLSR_RouteConfig_t* route); //<计算匀速可发脉冲数 | |||||
void PLSR_Section_StartNewSection(PLSR_RouteConfig_t* route); //<启动新段,段更新后调用 | void PLSR_Section_StartNewSection(PLSR_RouteConfig_t* route); //<启动新段,段更新后调用 | ||||
void Calculate_PluseNum(PLSR_RouteConfig_t *route); //<计算段脉冲数,根据加减速率和目标频率计算每段的加速、匀速、减速脉冲数 | |||||
void Calculate_PluseNum_Simplified(PLSR_RouteConfig_t *route); //<简化的脉冲数计算,用于快速计算每段的脉冲数,不考虑加减速 | |||||
// ==================== PLSR加减速算法函数 ==================== | // ==================== PLSR加减速算法函数 ==================== | ||||
float PLSR_Accel_CalculateCurve(float progress); //<曲线加速算法 | |||||
float PLSR_Accel_CalculateSine(float progress); //<正弦加速算法 | |||||
void PLSR_Accel_Process(PLSR_RouteConfig_t* route); //<加减速执行函数(新的直线加减速) | void PLSR_Accel_Process(PLSR_RouteConfig_t* route); //<加减速执行函数(新的直线加减速) | ||||
void PLSR_Accel_UpdateRates(PLSR_RouteConfig_t* route); //<更新加减速度 | void PLSR_Accel_UpdateRates(PLSR_RouteConfig_t* route); //<更新加减速度 | ||||
@@ -229,13 +224,6 @@ void PLSR_ClearExtEvent(void); //<清除外部 | |||||
void PLSR_SetSectionCondition(PLSR_RouteConfig_t* route, uint8_t section_num, uint8_t flag); //<设置段等待条件标志,暂不考虑 | void PLSR_SetSectionCondition(PLSR_RouteConfig_t* route, uint8_t section_num, uint8_t flag); //<设置段等待条件标志,暂不考虑 | ||||
uint32_t PLSR_GetWaitTick(void); //<暂时无用 | uint32_t PLSR_GetWaitTick(void); //<暂时无用 | ||||
// ==================== PLSR计数器控制函数 ==================== //定时器2相关 | |||||
void PLSR_Counter_Start(void); | |||||
void PLSR_Counter_Stop(void); | |||||
void PLSR_Counter_Reset(void); | |||||
uint32_t PLSR_Counter_GetCount(void); | |||||
// ==================== PLSR TIM6频率配置函数 ==================== | // ==================== PLSR TIM6频率配置函数 ==================== | ||||
void PLSR_TIM6_SetUpdateFreq(uint32_t freq_us); | void PLSR_TIM6_SetUpdateFreq(uint32_t freq_us); | ||||
uint32_t PLSR_TIM6_GetUpdateFreq(void); | uint32_t PLSR_TIM6_GetUpdateFreq(void); | ||||
@@ -251,7 +239,7 @@ void PLSR_TIM6_Stop(void); | |||||
// ==================== PLSR全局变量声明 ==================== | // ==================== PLSR全局变量声明 ==================== | ||||
extern PLSR_RouteConfig_t g_plsr_route; // 全局PLSR路径控制结构体 | extern PLSR_RouteConfig_t g_plsr_route; // 全局PLSR路径控制结构体 | ||||
extern uint8_t g_plsr_ext_event_flag; // 外部事件标志 | extern uint8_t g_plsr_ext_event_flag; // 外部事件标志 | ||||
extern uint32_t g_plsr_total_pulse_count; // 全局累加脉冲计数器(程序运行期间持续累加,不清零) | |||||
extern int32_t g_plsr_total_pulse_count; // 全局累加脉冲计数器(程序运行期间持续累加,支持负数) | |||||
/* USER CODE END Prototypes */ | /* USER CODE END Prototypes */ | ||||
#ifdef __cplusplus | #ifdef __cplusplus | ||||
@@ -243,6 +243,7 @@ static void KeyTask(void *p_arg) | |||||
uint8_t startflag = 0; | uint8_t startflag = 0; | ||||
OSTimeDly(2000); //<等待硬件完全初始化. | OSTimeDly(2000); //<等待硬件完全初始化. | ||||
PLSR_Route_Init(&g_plsr_route); | PLSR_Route_Init(&g_plsr_route); | ||||
//PLSR_Route_Start(&g_plsr_route); | |||||
while (1) | while (1) | ||||
{ | { | ||||
if(ModbusSlave.holding_regs[0x2000] == 1) //按下发送脉冲按钮后,向0x3000地址写1,松手写2,设置地址偏移为0x1000,所以这里值为0x2000 | if(ModbusSlave.holding_regs[0x2000] == 1) //按下发送脉冲按钮后,向0x3000地址写1,松手写2,设置地址偏移为0x1000,所以这里值为0x2000 | ||||
@@ -256,11 +257,11 @@ static void KeyTask(void *p_arg) | |||||
{ | { | ||||
PLSR_Route_Start(&g_plsr_route); | PLSR_Route_Start(&g_plsr_route); | ||||
startflag = 0; | startflag = 0; | ||||
//PLSR_Section_Process(&g_plsr_route); | |||||
} | } | ||||
} | } | ||||
OSTimeDlyHMSM(0, 0, 0, 10); /* 延时10ms */ | OSTimeDlyHMSM(0, 0, 0, 10); /* 延时10ms */ | ||||
} | } | ||||
//OSTimeDlyHMSM(0, 0, 0, 10); /* 延时10ms */ | |||||
} | } | ||||
@@ -98,6 +98,13 @@ void HardFault_Handler(void) | |||||
while (1) | while (1) | ||||
{ | { | ||||
/* USER CODE BEGIN W1_HardFault_IRQn 0 */ | /* USER CODE BEGIN W1_HardFault_IRQn 0 */ | ||||
volatile uint32_t *sp = (uint32_t*)__get_MSP(); // 获取主堆栈指针 | |||||
uint32_t pc = sp[6]; // PC位于栈帧偏移24字节处 | |||||
uint32_t cfsr = SCB->CFSR; // 可配置错误状态寄存器 | |||||
uint32_t hfsr = SCB->HFSR; // 硬件错误状态寄存器 | |||||
printf("PC: 0x%08X, CFSR: 0x%08X, HFSR: 0x%08X\n", pc, cfsr, hfsr); | |||||
while(1); | |||||
/* USER CODE END W1_HardFault_IRQn 0 */ | /* USER CODE END W1_HardFault_IRQn 0 */ | ||||
} | } | ||||
} | } | ||||
@@ -26,7 +26,7 @@ | |||||
PLSR_RouteConfig_t g_plsr_route; // 全局PLSR路径控制结构体 | PLSR_RouteConfig_t g_plsr_route; // 全局PLSR路径控制结构体 | ||||
// g_plsr_system_tick已删除 - 不再使用UCOSII时间基准 | // g_plsr_system_tick已删除 - 不再使用UCOSII时间基准 | ||||
uint8_t g_plsr_ext_event_flag = 0; // 外部事件标志 | uint8_t g_plsr_ext_event_flag = 0; // 外部事件标志 | ||||
uint32_t g_plsr_total_pulse_count = 0; // 全局累加脉冲计数器(程序运行期间持续累加,不清零) | |||||
int32_t g_plsr_total_pulse_count = 0; // 全局累加脉冲计数器(程序运行期间持续累加,支持负数) | |||||
// ==================== PLSR内部变量 ==================== | // ==================== PLSR内部变量 ==================== | ||||
static uint32_t s_tim6_update_freq_us = 1000; // TIM6更新频率(微秒) | static uint32_t s_tim6_update_freq_us = 1000; // TIM6更新频率(微秒) | ||||
@@ -728,12 +728,38 @@ void PLSR_PWM_Init(void) | |||||
* @retval None | * @retval None | ||||
* @note 启动TIM10 PWM输出和更新中断 | * @note 启动TIM10 PWM输出和更新中断 | ||||
*/ | */ | ||||
/** | |||||
* @brief 启动PWM输出 | |||||
* @retval None | |||||
* @note 根据g_plsr_route.output_port选择目标定时器:0-TIM10, 1-TIM11, 2-TIM13, 3-TIM14 | |||||
*/ | |||||
void PLSR_PWM_Start(void) | void PLSR_PWM_Start(void) | ||||
{ | { | ||||
if (g_plsr_route.route_state == PLSR_ROUTE_RUNNING) //<只有在路径运行状态下才可以进行pwm输出 | if (g_plsr_route.route_state == PLSR_ROUTE_RUNNING) //<只有在路径运行状态下才可以进行pwm输出 | ||||
{ | { | ||||
// 启动PWM输出和更新中断 | |||||
HAL_TIM_PWM_Start_IT(&htim10, TIM_CHANNEL_1); | |||||
// 根据output_port选择目标定时器并启动PWM输出 | |||||
switch(g_plsr_route.output_port) | |||||
{ | |||||
case 0: // TIM10 | |||||
HAL_TIM_PWM_Start_IT(&htim10, TIM_CHANNEL_1); | |||||
break; | |||||
case 1: // TIM11 | |||||
HAL_TIM_PWM_Start_IT(&htim11, TIM_CHANNEL_1); | |||||
break; | |||||
case 2: // TIM13 | |||||
HAL_TIM_PWM_Start_IT(&htim13, TIM_CHANNEL_1); | |||||
break; | |||||
case 3: // TIM14 | |||||
HAL_TIM_PWM_Start_IT(&htim14, TIM_CHANNEL_1); | |||||
break; | |||||
default: // 默认使用TIM10 | |||||
HAL_TIM_PWM_Start_IT(&htim10, TIM_CHANNEL_1); | |||||
break; | |||||
} | |||||
} | } | ||||
} | } | ||||
@@ -743,10 +769,36 @@ void PLSR_PWM_Start(void) | |||||
* @retval None | * @retval None | ||||
* @note 停止TIM10 PWM输出和TIM2计数器 | * @note 停止TIM10 PWM输出和TIM2计数器 | ||||
*/ | */ | ||||
/** | |||||
* @brief 停止PWM输出 | |||||
* @retval None | |||||
* @note 根据g_plsr_route.output_port选择目标定时器:0-TIM10, 1-TIM11, 2-TIM13, 3-TIM14 | |||||
*/ | |||||
void PLSR_PWM_Stop(void) | void PLSR_PWM_Stop(void) | ||||
{ | { | ||||
// 停止PWM输出 | |||||
HAL_TIM_PWM_Stop(&htim10, TIM_CHANNEL_1); | |||||
// 根据output_port选择目标定时器并停止PWM输出 | |||||
switch(g_plsr_route.output_port) | |||||
{ | |||||
case 0: // TIM10 | |||||
HAL_TIM_PWM_Stop(&htim10, TIM_CHANNEL_1); | |||||
break; | |||||
case 1: // TIM11 | |||||
HAL_TIM_PWM_Stop(&htim11, TIM_CHANNEL_1); | |||||
break; | |||||
case 2: // TIM13 | |||||
HAL_TIM_PWM_Stop(&htim13, TIM_CHANNEL_1); | |||||
break; | |||||
case 3: // TIM14 | |||||
HAL_TIM_PWM_Stop(&htim14, TIM_CHANNEL_1); | |||||
break; | |||||
default: // 默认使用TIM10 | |||||
HAL_TIM_PWM_Stop(&htim10, TIM_CHANNEL_1); | |||||
break; | |||||
} | |||||
} | } | ||||
@@ -849,6 +901,7 @@ static void PLSR_CalculateTimerParams(uint32_t frequency, uint16_t* prescaler, u | |||||
/** | /** | ||||
* @brief 设置PWM频率 | * @brief 设置PWM频率 | ||||
* @param frequency: PWM频率 (1Hz-100kHz) | * @param frequency: PWM频率 (1Hz-100kHz) | ||||
* @note 根据g_plsr_route.output_port选择目标定时器:0-TIM10, 1-TIM11, 2-TIM13, 3-TIM14 | |||||
*/ | */ | ||||
void PLSR_PWM_SetFrequency(uint32_t frequency) | void PLSR_PWM_SetFrequency(uint32_t frequency) | ||||
{ | { | ||||
@@ -864,13 +917,45 @@ void PLSR_PWM_SetFrequency(uint32_t frequency) | |||||
// 计算最佳定时器参数 - 根据目标频率计算预分频器和周期值 | // 计算最佳定时器参数 - 根据目标频率计算预分频器和周期值 | ||||
PLSR_CalculateTimerParams(frequency, &prescaler, &period); | PLSR_CalculateTimerParams(frequency, &prescaler, &period); | ||||
// 参数有效性检查 - 防止period为0导致除零错误 | |||||
if(period == 0) | |||||
{ | |||||
return; // period无效,直接返回,避免HardFault异常 | |||||
} | |||||
// 更新定时器核心参数 | |||||
__HAL_TIM_SET_PRESCALER(&htim10, prescaler); //< 放置波形出现问题对参数直接进行更新 | |||||
__HAL_TIM_SET_AUTORELOAD(&htim10, period); | |||||
// 设置占空比为50% - 比较值设为周期的一半,产生对称的PWM波形 | |||||
__HAL_TIM_SET_COMPARE(&htim10, TIM_CHANNEL_1, period / 2); | |||||
// 根据output_port选择目标定时器并更新参数 | |||||
switch(g_plsr_route.output_port) | |||||
{ | |||||
case 0: // TIM10 | |||||
__HAL_TIM_SET_PRESCALER(&htim10, prescaler); | |||||
__HAL_TIM_SET_AUTORELOAD(&htim10, period); | |||||
__HAL_TIM_SET_COMPARE(&htim10, TIM_CHANNEL_1, period / 2); | |||||
break; | |||||
case 1: // TIM11 | |||||
__HAL_TIM_SET_PRESCALER(&htim11, prescaler); | |||||
__HAL_TIM_SET_AUTORELOAD(&htim11, period); | |||||
__HAL_TIM_SET_COMPARE(&htim11, TIM_CHANNEL_1, period / 2); | |||||
break; | |||||
case 2: // TIM13 | |||||
__HAL_TIM_SET_PRESCALER(&htim13, prescaler); | |||||
__HAL_TIM_SET_AUTORELOAD(&htim13, period); | |||||
__HAL_TIM_SET_COMPARE(&htim13, TIM_CHANNEL_1, period / 2); | |||||
break; | |||||
case 3: // TIM14 | |||||
__HAL_TIM_SET_PRESCALER(&htim14, prescaler); | |||||
__HAL_TIM_SET_AUTORELOAD(&htim14, period); | |||||
__HAL_TIM_SET_COMPARE(&htim14, TIM_CHANNEL_1, period / 2); | |||||
break; | |||||
default: // 默认使用TIM10 | |||||
__HAL_TIM_SET_PRESCALER(&htim10, prescaler); | |||||
__HAL_TIM_SET_AUTORELOAD(&htim10, period); | |||||
__HAL_TIM_SET_COMPARE(&htim10, TIM_CHANNEL_1, period / 2); | |||||
break; | |||||
} | |||||
} | } | ||||
// ==================== PLSR TIM6频率配置函数实现 ==================== | // ==================== PLSR TIM6频率配置函数实现 ==================== | ||||
@@ -946,178 +1031,236 @@ void PLSR_TIM6_Stop(void) | |||||
static uint32_t AllPluse = 0; //总脉冲个数 | static uint32_t AllPluse = 0; //总脉冲个数 | ||||
static uint32_t s_last_total_pulse = 0; //上次记录的总脉冲数,用于实时累加 | static uint32_t s_last_total_pulse = 0; //上次记录的总脉冲数,用于实时累加 | ||||
/** | /** | ||||
* @brief 更新Modbus寄存器中的脉冲计数 | |||||
* @param pulse_count: 全局累加脉冲计数值 | |||||
* @retval None | |||||
* @note 将32位全局累加脉冲计数分解为两个16位寄存器供上位机读取 | |||||
* @brief 使用指定脉冲值更新全局脉冲计数器 | |||||
* @param current_pulse_count 当前脉冲计数值 | |||||
* @note 根据方向逻辑决定脉冲计数方向,支持TIM2和TIM6中断的不同计算方式 | |||||
*/ | */ | ||||
static void PLSR_UpdateModbusPulseCount(uint32_t pulse_count) | |||||
static void PLSR_UpdateGlobalPulseCount(uint32_t current_pulse_count) | |||||
{ | { | ||||
// 将32位全局累加脉冲计数分解为两个16位寄存器 | |||||
ModbusSlave.holding_regs[0x1000] = pulse_count & 0xFFFF; // 低16位 | |||||
ModbusSlave.holding_regs[0x1001] = (pulse_count >> 16) & 0xFFFF; // 高16位 | |||||
} | |||||
// /** | |||||
// * @brief 计算加减速匀速各自可发的脉冲数 | |||||
// * @param route: 路径控制结构体指针 | |||||
// * @retval None | |||||
// * @note 根据当前段的目标脉冲数,计算加速、匀速、减速各阶段的脉冲分配 | |||||
// * 优先保证能减速到0,然后考虑加速过程,最后分配匀速脉冲 | |||||
// */ | |||||
// void Calculate_PluseNum(PLSR_RouteConfig_t *route) | |||||
// { | |||||
// uint32_t accel_pulse_num = 0; // 加速过程脉冲数 | |||||
// uint32_t decel_pulse_num = 0; // 减速过程脉冲数 | |||||
// uint32_t total_pulse_num = 0; // 加减速总脉冲数 | |||||
// uint32_t const_pulse_num = 0; // 匀速过程脉冲数 | |||||
// float accel_time = 0; // 加速时间(ms) | |||||
// float decel_time = 0; // 减速时间(ms) | |||||
// // 参数有效性检查 | |||||
// if (route == NULL || route->current_section_num == 0) return; | |||||
// // 获取当前段配置(段号从1开始,数组索引从0开始) | |||||
// PLSR_SectionConfig_t* current_section = &route->section[route->current_section_num - 1]; | |||||
// // 只处理线性加减速算法 | |||||
// if (route->accel_config.accel_algorithm == PLSR_ACCEL_LINEAR) | |||||
// { | |||||
// // 检查加减速率是否有效,避免除零错误 | |||||
// if (route->accel_rate == 0 || route->decel_rate == 0) | |||||
// { | |||||
// // 如果加减速率无效,直接设置为匀速或停止 | |||||
// if (route->current_freq > 0) | |||||
// { | |||||
// route->run_state = PLSR_STATE_CONST; | |||||
// } | |||||
// else | |||||
// { | |||||
// route->run_state = PLSR_STATE_IDLE; | |||||
// } | |||||
// return; | |||||
// } | |||||
// // 计算理想情况下的加减速时间和脉冲数 | |||||
// if (current_section->target_freq > route->current_freq) | |||||
// { | |||||
// // 需要加速:从当前频率加速到目标频率 | |||||
// accel_time = (float)(current_section->target_freq - route->current_freq) / route->accel_rate; // ms | |||||
// // 加速过程脉冲数 = 平均速度 × 时间 = (v0 + v1)/2 × t | |||||
// accel_pulse_num = (uint32_t)((route->current_freq + current_section->target_freq) * accel_time / 2000.0f); | |||||
// } | |||||
// // 计算从目标频率减速到0的时间和脉冲数 | |||||
// decel_time = (float)current_section->target_freq / route->decel_rate; // ms | |||||
// // 减速过程脉冲数 = 平均速度 × 时间 = (v1 + 0)/2 × t | |||||
// decel_pulse_num = (uint32_t)(current_section->target_freq * decel_time / 2000.0f); | |||||
if (current_pulse_count > s_last_total_pulse) { | |||||
uint32_t pulse_increment = current_pulse_count - s_last_total_pulse; | |||||
// // 理想情况下加减速需要的总脉冲数 | |||||
// total_pulse_num = accel_pulse_num + decel_pulse_num; | |||||
if (g_plsr_route.dir_logic == 0) { | |||||
// 方向逻辑为0:正逻辑,脉冲数递增 | |||||
g_plsr_total_pulse_count += pulse_increment; | |||||
} | |||||
else | |||||
{ | |||||
// 方向逻辑为1:负逻辑,脉冲数递减(支持负数显示) | |||||
g_plsr_total_pulse_count -= pulse_increment; | |||||
} | |||||
// // 判断实际脉冲数是否满足理想的加减速过程 | |||||
// if (current_section->target_pulse < total_pulse_num) | |||||
// { | |||||
// // 脉冲数不足,需要重新分配 | |||||
// if (route->current_freq != 0) | |||||
// { | |||||
// // 起始频率不为0的情况 | |||||
// // 首先计算从当前频率减速到0所需的最少脉冲数 | |||||
// float min_decel_time = (float)route->current_freq / route->decel_rate; // ms | |||||
// uint32_t min_decel_pulse = (uint32_t)(route->current_freq * min_decel_time / 2000.0f); | |||||
// if (current_section->target_pulse <= min_decel_pulse) | |||||
// { | |||||
// // 脉冲数只够减速,直接进入减速模式 | |||||
// route->run_state = PLSR_STATE_DECEL; | |||||
// accel_pulse_num = 0; | |||||
// decel_pulse_num = current_section->target_pulse; | |||||
// const_pulse_num = 0; | |||||
// } | |||||
// else | |||||
// { | |||||
// // 脉冲数够减速,剩余脉冲按加减速时间比例分配 | |||||
// uint32_t remaining_pulse = current_section->target_pulse - min_decel_pulse; | |||||
// accel_pulse_num = remaining_pulse * route->decel_rate | |||||
// / (route->accel_rate + route->decel_rate); | |||||
// decel_pulse_num = min_decel_pulse + (remaining_pulse * route->accel_rate | |||||
// / (route->accel_rate + route->decel_rate)); | |||||
// const_pulse_num = 0; | |||||
// } | |||||
// } | |||||
// else | |||||
// { | |||||
// accel_pulse_num = current_section->target_pulse * route->decel_rate | |||||
// / (route->accel_rate + route->decel_rate); | |||||
// decel_pulse_num = current_section->target_pulse * route->accel_rate | |||||
// / (route->accel_rate + route->decel_rate); | |||||
// const_pulse_num = 0; | |||||
// } | |||||
// } else | |||||
// { | |||||
// // 脉冲数充足,有匀速过程 | |||||
// const_pulse_num = current_section->target_pulse - total_pulse_num; | |||||
// // 设置初始运行状态 | |||||
// if (current_section->target_freq > route->current_freq) | |||||
// { | |||||
// route->run_state = PLSR_STATE_ACCEL; // 需要先加速 | |||||
// } | |||||
// else if (current_section->target_freq < route->current_freq) | |||||
// { | |||||
// route->run_state = PLSR_STATE_DECEL; // 需要先减速 | |||||
// } else | |||||
// { | |||||
// route->run_state = PLSR_STATE_CONST; // 直接匀速 | |||||
// } | |||||
// } | |||||
// route->accel_pulse_count = accel_pulse_num; | |||||
// route->const_pulse_count = const_pulse_num; | |||||
// route->decel_pulse_count = decel_pulse_num; | |||||
// } | |||||
// } | |||||
s_last_total_pulse = current_pulse_count; | |||||
} | |||||
// 将32位全局累加脉冲计数分解为两个16位寄存器(支持负数) | |||||
uint32_t unsigned_count = (uint32_t)g_plsr_total_pulse_count; // 转换为无符号数进行位操作 | |||||
ModbusSlave.holding_regs[0x1000] = unsigned_count & 0xFFFF; // 低16位 | |||||
ModbusSlave.holding_regs[0x1001] = (unsigned_count >> 16) & 0xFFFF; // 高16位 | |||||
} | |||||
void Calculate_PluseNum(PLSR_RouteConfig_t *route) | |||||
// 简单的整数开方函数 (使用二分法) | |||||
uint32_t integer_sqrt(uint32_t x) | |||||
{ | |||||
if (x == 0) return 0; | |||||
if (x == 1) return 1; | |||||
uint32_t left = 0; | |||||
uint32_t right = x; | |||||
uint32_t result = 0; | |||||
while (left <= right) { | |||||
uint32_t mid = left + (right - left) / 2; | |||||
// 防止溢出:检查 mid * mid | |||||
if (mid <= x / mid) { // 等价于 mid * mid <= x,但避免溢出 | |||||
result = mid; | |||||
left = mid + 1; | |||||
} else { | |||||
right = mid - 1; | |||||
} | |||||
} | |||||
return result; | |||||
} | |||||
void Calculate_PluseNum_Simplified(PLSR_RouteConfig_t *route) | |||||
{ | { | ||||
uint32_t accel_pulse_num = 0; // 加速过程脉冲数 | uint32_t accel_pulse_num = 0; // 加速过程脉冲数 | ||||
uint32_t decel_pulse_num = 0; // 减速过程脉冲数 | uint32_t decel_pulse_num = 0; // 减速过程脉冲数 | ||||
uint32_t total_pulse_num = 0; // 加减速总脉冲数 | |||||
uint32_t const_pulse_num = 0; // 匀速过程脉冲数 | uint32_t const_pulse_num = 0; // 匀速过程脉冲数 | ||||
float accel_time = 0; // 加速时间(ms) | |||||
float decel_time = 0; // 减速时间(ms) | |||||
float actual_target_freq = 0; // 实际能达到的目标频率 | |||||
uint32_t accel_time = 0; // 加速时间(ms) | |||||
uint32_t decel_time = 0; // 减速时间(ms) | |||||
// 参数有效性检查 | // 参数有效性检查 | ||||
if (route == NULL || route->current_section_num == 0) return; | if (route == NULL || route->current_section_num == 0) return; | ||||
// 边界检查 | |||||
if (route->current_section_num > PLSR_MAX_SECTIONS) return; | |||||
// 获取当前段配置(段号从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) | if (route->accel_config.accel_algorithm == PLSR_ACCEL_LINEAR) | ||||
{ | { | ||||
// 检查加减速率是否有效,避免除零错误 | |||||
if (route->accel_rate == 0 || route->decel_rate == 0) | |||||
uint32_t v0 = route->current_freq; // 起始频率 | |||||
uint32_t vt = current_section->target_freq; // 目标频率 | |||||
uint32_t a = route->accel_rate; // 加速度 | |||||
uint32_t d = route->decel_rate; // 减速度 | |||||
uint32_t total_pulses = current_section->target_pulse; // 总脉冲数 | |||||
// 防止除零错误 | |||||
if (a == 0) a = 1; | |||||
if (d == 0) d = 1; | |||||
if (vt > v0) | |||||
{ | { | ||||
if (route->current_freq > 0) | |||||
// 情况1:目标频率大于当前频率,需要加速 | |||||
route->run_state = PLSR_STATE_ACCEL; | |||||
// 计算从v0加速到vt所需的时间和脉冲数 | |||||
accel_time = (vt - v0) / a; // 加速时间(ms) | |||||
if (accel_time == 0) accel_time = 1; // 至少1ms | |||||
// 加速阶段脉冲数 = (起始频率 + 目标频率) * 时间 / 2000 | |||||
// 使用梯形积分公式:面积 = (上底 + 下底) * 高 / 2 | |||||
uint64_t temp_accel = (uint64_t)(v0 + vt) * accel_time; | |||||
uint32_t required_accel_pulses = (uint32_t)(temp_accel / 2000); | |||||
if (required_accel_pulses <= total_pulses) | |||||
{ | { | ||||
route->run_state = PLSR_STATE_CONST; | |||||
} | |||||
// 脉冲数足够完成加速,剩余脉冲用于匀速 | |||||
accel_pulse_num = required_accel_pulses; | |||||
const_pulse_num = total_pulses - required_accel_pulses; | |||||
decel_pulse_num = 0; | |||||
} | |||||
else | else | ||||
{ | { | ||||
route->run_state = PLSR_STATE_IDLE; | |||||
// 脉冲数不够完成完整加速,全部用于加速 | |||||
accel_pulse_num = total_pulses; | |||||
const_pulse_num = 0; | |||||
decel_pulse_num = 0; | |||||
// 重新计算实际能达到的最大频率 | |||||
// 根据:pulses = (v0 + v_actual) * t / 2000,且 t = (v_actual - v0) / a | |||||
// 代入得:pulses = (v0 + v_actual) * (v_actual - v0) / (2000 * a) | |||||
// 整理得:pulses * 2000 * a = v_actual^2 - v0^2 | |||||
// 所以:v_actual^2 = pulses * 2000 * a + v0^2 | |||||
uint64_t v_actual_squared = (uint64_t)total_pulses * 2000ULL * a + (uint64_t)v0 * v0; | |||||
// 检查是否溢出 | |||||
if (v_actual_squared <= 0xFFFFFFFFULL) | |||||
{ | |||||
uint32_t v_actual = integer_sqrt((uint32_t)v_actual_squared); | |||||
// 确保不超过目标频率 | |||||
if (v_actual > vt) | |||||
v_actual = vt; | |||||
} | |||||
} | } | ||||
return; | |||||
} | |||||
else if (vt < v0) | |||||
{ | |||||
// 情况2:目标频率小于当前频率,需要减速 | |||||
route->run_state = PLSR_STATE_DECEL; | |||||
// 计算从v0减速到vt所需的时间和脉冲数 | |||||
decel_time = (v0 - vt) / d; // 减速时间(ms) | |||||
if (decel_time == 0) decel_time = 1; // 至少1ms | |||||
// 减速阶段脉冲数 = (起始频率 + 目标频率) * 时间 / 2000 | |||||
uint64_t temp_decel = (uint64_t)(v0 + vt) * decel_time; | |||||
uint32_t required_decel_pulses = (uint32_t)(temp_decel / 2000); | |||||
if (required_decel_pulses <= total_pulses) | |||||
{ | |||||
// 脉冲数足够完成减速,剩余脉冲用于匀速 | |||||
decel_pulse_num = required_decel_pulses; | |||||
const_pulse_num = total_pulses - required_decel_pulses; | |||||
accel_pulse_num = 0; | |||||
} | |||||
else | |||||
{ | |||||
// 脉冲数不够完成完整减速,全部用于减速 | |||||
decel_pulse_num = total_pulses; | |||||
const_pulse_num = 0; | |||||
accel_pulse_num = 0; | |||||
// 重新计算实际能减速到的最低频率 | |||||
// 根据:pulses = (v0 + v_actual) * t / 2000,且 t = (v0 - v_actual) / d | |||||
// 代入得:pulses = (v0 + v_actual) * (v0 - v_actual) / (2000 * d) | |||||
// 整理得:pulses * 2000 * d = v0^2 - v_actual^2 | |||||
// 所以:v_actual^2 = v0^2 - pulses * 2000 * d | |||||
uint64_t v0_squared = (uint64_t)v0 * v0; // 起始频率的平方 | |||||
uint64_t reduction = (uint64_t)total_pulses * 2000ULL * d; // 减速所需的脉冲数 | |||||
if (v0_squared > reduction) | |||||
{ | |||||
uint32_t v_actual_squared = (uint32_t)(v0_squared - reduction); | |||||
uint32_t v_actual = integer_sqrt(v_actual_squared); | |||||
// 确保不低于目标频率(理论上不应该,但防御性编程) | |||||
if (v_actual < vt) | |||||
v_actual = vt; | |||||
} | |||||
// else | |||||
// { | |||||
// // 数学上会减速到0或负值,设为0 | |||||
// printf("减速到停止:全部%lu脉冲用于减速\n", total_pulses); | |||||
// } | |||||
} | |||||
} | |||||
else | |||||
{ | |||||
// 情况3:目标频率等于当前频率,全部为匀速 | |||||
route->run_state = PLSR_STATE_CONST; | |||||
accel_pulse_num = 0; | |||||
const_pulse_num = total_pulses; | |||||
decel_pulse_num = 0; | |||||
} | } | ||||
float v0 = route->current_freq; // 起始频率 | |||||
float vt = current_section->target_freq; // 期望目标频率 | |||||
float a = route->accel_rate; // 加速度 | |||||
float d = route->decel_rate; // 减速度 | |||||
// 保存计算结果 | |||||
route->accel_pulse_count = accel_pulse_num; | |||||
route->const_pulse_count = const_pulse_num; | |||||
route->decel_pulse_count = decel_pulse_num; | |||||
} | |||||
} | |||||
void Calculate_PluseNum(PLSR_RouteConfig_t *route) | |||||
{ | |||||
uint32_t accel_pulse_num = 0; // 加速过程脉冲数 | |||||
uint32_t decel_pulse_num = 0; // 减速过程脉冲数 | |||||
uint32_t total_pulse_num = 0; // 加减速总脉冲数 | |||||
uint32_t const_pulse_num = 0; // 匀速过程脉冲数 | |||||
uint32_t accel_time = 0; // 加速时间(ms) | |||||
uint32_t decel_time = 0; // 减速时间(ms) | |||||
uint32_t actual_target_freq = 0; // 实际能达到的目标频率 | |||||
// 参数有效性检查 | |||||
if (route == NULL || route->current_section_num == 0) return; | |||||
// 边界检查 | |||||
if (route->current_section_num > PLSR_MAX_SECTIONS) return; | |||||
// 获取当前段配置(段号从1开始,数组索引从0开始) | |||||
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 vt = current_section->target_freq; // 期望目标频率 | |||||
uint32_t a = route->accel_rate; // 加速度 | |||||
uint32_t d = route->decel_rate; // 减速度 | |||||
uint32_t total_pulses = current_section->target_pulse; // 总脉冲数 | uint32_t total_pulses = current_section->target_pulse; // 总脉冲数 | ||||
// 防止除零错误 | |||||
if (a == 0) a = 1; | |||||
if (d == 0) d = 1; | |||||
// 情况1:检查是否只需要减速 | // 情况1:检查是否只需要减速 | ||||
if (vt <= v0) | if (vt <= v0) | ||||
{ | { | ||||
@@ -1134,8 +1277,15 @@ void Calculate_PluseNum(PLSR_RouteConfig_t *route) | |||||
{ | { | ||||
// 需要减速 | // 需要减速 | ||||
route->run_state = PLSR_STATE_DECEL; | route->run_state = PLSR_STATE_DECEL; | ||||
decel_time = (v0 - vt) / d; // ms | |||||
decel_pulse_num = (uint32_t)((v0 + vt) * decel_time / 2000.0f); | |||||
// decel_time = (v0 - vt) / d; // 整数除法,结果取整 | |||||
decel_time = (v0 - vt) / d; | |||||
if (decel_time == 0) decel_time = 1; // 至少1ms | |||||
// decel_pulse_num = (v0 + vt) * decel_time / 2000 | |||||
// 使用64位避免中间计算溢出 | |||||
uint64_t temp_calc = (uint64_t)(v0 + vt) * decel_time; | |||||
decel_pulse_num = (uint32_t)(temp_calc / 2000); | |||||
if (decel_pulse_num <= total_pulses) | if (decel_pulse_num <= total_pulses) | ||||
{ | { | ||||
@@ -1147,14 +1297,19 @@ void Calculate_PluseNum(PLSR_RouteConfig_t *route) | |||||
else | else | ||||
{ | { | ||||
// 脉冲数不够,重新计算实际能减速到的频率 | // 脉冲数不够,重新计算实际能减速到的频率 | ||||
// 解方程:total_pulses = (v0 + vf) * t / 2000,其中 t = (v0 - vf) / d | |||||
// 化简得:total_pulses * 2000 * d = (v0 + vf) * (v0 - vf) = v0^2 - vf^2 | |||||
// 所以:vf^2 = v0^2 - total_pulses * 2000 * d | |||||
float vf_squared = v0 * v0 - total_pulses * 2000.0f * d; | |||||
if (vf_squared >= 0) | |||||
// vf^2 = v0^2 - total_pulses * 2000 * d | |||||
uint64_t v0_squared = (uint64_t)v0 * v0; | |||||
uint64_t reduction = (uint64_t)total_pulses * 2000ULL * d; | |||||
if (v0_squared > reduction) | |||||
{ | { | ||||
actual_target_freq = sqrt(vf_squared); | |||||
decel_time = (v0 - actual_target_freq) / d; | |||||
uint32_t vf_squared = (uint32_t)(v0_squared - reduction); | |||||
actual_target_freq = integer_sqrt(vf_squared); | |||||
if (actual_target_freq < v0 && d > 0) { | |||||
decel_time = (v0 - actual_target_freq) / d; | |||||
if (decel_time == 0) decel_time = 1; | |||||
} | |||||
accel_pulse_num = 0; | accel_pulse_num = 0; | ||||
const_pulse_num = 0; | const_pulse_num = 0; | ||||
decel_pulse_num = total_pulses; | decel_pulse_num = total_pulses; | ||||
@@ -1173,13 +1328,25 @@ void Calculate_PluseNum(PLSR_RouteConfig_t *route) | |||||
} | } | ||||
else | else | ||||
{ | { | ||||
// 需要加速:从v0加速到vt,然后减速到0 | |||||
// 需要加速:从v0加速到vt | |||||
// 先检查理想情况下是否可行 | // 先检查理想情况下是否可行 | ||||
accel_time = (vt - v0) / a; // ms | |||||
decel_time = vt / d; // ms | |||||
accel_pulse_num = (uint32_t)((v0 + vt) * accel_time / 2000.0f); | |||||
decel_pulse_num = (uint32_t)(vt * decel_time / 2000.0f); | |||||
// accel_time = (vt - v0) / a | |||||
accel_time = (vt - v0) / a; | |||||
if (accel_time == 0) accel_time = 1; // 至少1ms | |||||
// decel_time = vt / d (假设最终减速到0) | |||||
decel_time = vt / d; | |||||
if (decel_time == 0) decel_time = 1; // 至少1ms | |||||
// accel_pulse_num = (v0 + vt) * accel_time / 2000 | |||||
uint64_t temp_accel = (uint64_t)(v0 + vt) * accel_time; | |||||
accel_pulse_num = (uint32_t)(temp_accel / 2000); | |||||
// decel_pulse_num = vt * decel_time / 2000 | |||||
uint64_t temp_decel = (uint64_t)vt * decel_time; | |||||
decel_pulse_num = (uint32_t)(temp_decel / 2000); | |||||
total_pulse_num = accel_pulse_num + decel_pulse_num; | total_pulse_num = accel_pulse_num + decel_pulse_num; | ||||
if (total_pulse_num <= total_pulses) | if (total_pulse_num <= total_pulses) | ||||
@@ -1192,67 +1359,85 @@ void Calculate_PluseNum(PLSR_RouteConfig_t *route) | |||||
else | else | ||||
{ | { | ||||
// 脉冲数不足,需要求解实际能达到的最大频率 | // 脉冲数不足,需要求解实际能达到的最大频率 | ||||
// 设实际最大频率为vm | |||||
// 约束条件:加速脉冲数 + 减速脉冲数 = 总脉冲数 | |||||
// 加速脉冲数 = (v0 + vm) * (vm - v0) / (2000 * a) | |||||
// 减速脉冲数 = vm^2 / (2000 * d) | |||||
// | |||||
// 联立方程:(v0 + vm) * (vm - v0) / (2000 * a) + vm^2 / (2000 * d) = total_pulses | |||||
// 化简:(vm^2 - v0^2) / (2000 * a) + vm^2 / (2000 * d) = total_pulses | |||||
// 整理:vm^2 * (1/(2000*a) + 1/(2000*d)) - v0^2/(2000*a) = total_pulses | |||||
// 即:vm^2 * (a + d)/(2000*a*d) = total_pulses + v0^2/(2000*a) | |||||
// 这是最复杂的部分,需要求解二次方程 | |||||
// vm^2 * (a + d)/(2000*a*d) = total_pulses + v0^2/(2000*a) | |||||
float coefficient = (a + d) / (2000.0f * a * d); | |||||
float constant = total_pulses + (v0 * v0) / (2000.0f * a); | |||||
float vm_squared = constant / coefficient; | |||||
// 重新整理避免浮点运算: | |||||
// vm^2 * (a + d) = (total_pulses * 2000*a*d + v0^2*d) | |||||
if (vm_squared > 0) | |||||
{ | |||||
actual_target_freq = sqrt(vm_squared); | |||||
// 确保不超过期望目标频率 | |||||
if (actual_target_freq > vt) | |||||
{ | |||||
actual_target_freq = vt; | |||||
} | |||||
uint64_t right_side = (uint64_t)total_pulses * 2000ULL * a * d; | |||||
right_side += (uint64_t)v0 * v0 * d; | |||||
uint32_t left_coefficient = a + d; | |||||
if (left_coefficient > 0) { | |||||
uint64_t vm_squared = right_side / left_coefficient; | |||||
// 重新计算各阶段时间和脉冲数 | |||||
if (actual_target_freq > v0) | |||||
// 检查是否会溢出uint32_t | |||||
if (vm_squared <= 0xFFFFFFFFULL) | |||||
{ | { | ||||
accel_time = (actual_target_freq - v0) / a; | |||||
decel_time = actual_target_freq / d; | |||||
accel_pulse_num = (uint32_t)((v0 + actual_target_freq) * accel_time / 2000.0f); | |||||
decel_pulse_num = (uint32_t)(actual_target_freq * decel_time / 2000.0f); | |||||
uint32_t vm = integer_sqrt((uint32_t)vm_squared); | |||||
actual_target_freq = vm; | |||||
// 由于浮点计算误差,调整脉冲数确保总和正确 | |||||
uint32_t calculated_total = accel_pulse_num + decel_pulse_num; | |||||
if (calculated_total < total_pulses) | |||||
// 确保不超过期望目标频率 | |||||
if (actual_target_freq > vt) | |||||
{ | { | ||||
// 余数分配给加速阶段 | |||||
accel_pulse_num += (total_pulses - calculated_total); | |||||
actual_target_freq = vt; | |||||
vm = vt; | |||||
} | } | ||||
else if (calculated_total > total_pulses) | |||||
// 重新计算各阶段时间和脉冲数 | |||||
if (vm > v0) | |||||
{ | { | ||||
// 从减速阶段减去多余的脉冲 | |||||
uint32_t excess = calculated_total - total_pulses; | |||||
if (decel_pulse_num > excess) | |||||
accel_time = (vm - v0) / a; | |||||
if (accel_time == 0) accel_time = 1; | |||||
decel_time = vm / d; | |||||
if (decel_time == 0) decel_time = 1; | |||||
uint64_t temp_accel_calc = (uint64_t)(v0 + vm) * accel_time; | |||||
accel_pulse_num = (uint32_t)(temp_accel_calc / 2000); | |||||
uint64_t temp_decel_calc = (uint64_t)vm * decel_time; | |||||
decel_pulse_num = (uint32_t)(temp_decel_calc / 2000); | |||||
// 调整脉冲数确保总和正确 | |||||
uint32_t calculated_total = accel_pulse_num + decel_pulse_num; | |||||
if (calculated_total < total_pulses) | |||||
{ | { | ||||
decel_pulse_num -= excess; | |||||
// 余数分配给加速阶段 | |||||
accel_pulse_num += (total_pulses - calculated_total); | |||||
} | } | ||||
else | |||||
else if (calculated_total > total_pulses) | |||||
{ | { | ||||
decel_pulse_num = 0; | |||||
accel_pulse_num = total_pulses; | |||||
// 从减速阶段减去多余的脉冲 | |||||
uint32_t excess = calculated_total - total_pulses; | |||||
if (decel_pulse_num > excess) | |||||
{ | |||||
decel_pulse_num -= excess; | |||||
} | |||||
else | |||||
{ | |||||
decel_pulse_num = 0; | |||||
accel_pulse_num = total_pulses; | |||||
} | |||||
} | } | ||||
const_pulse_num = 0; | |||||
route->run_state = PLSR_STATE_ACCEL; | |||||
} | |||||
else | |||||
{ | |||||
// 实际频率不高于起始频率,直接设为匀速 | |||||
actual_target_freq = v0; | |||||
accel_pulse_num = 0; | |||||
const_pulse_num = total_pulses; | |||||
decel_pulse_num = 0; | |||||
route->run_state = PLSR_STATE_CONST; | |||||
} | } | ||||
const_pulse_num = 0; | |||||
route->run_state = PLSR_STATE_ACCEL; | |||||
} | } | ||||
else | else | ||||
{ | { | ||||
// 实际频率不高于起始频率,直接设为匀速 | |||||
// vm_squared太大,溢出了,保持当前频率 | |||||
actual_target_freq = v0; | actual_target_freq = v0; | ||||
accel_pulse_num = 0; | accel_pulse_num = 0; | ||||
const_pulse_num = total_pulses; | const_pulse_num = total_pulses; | ||||
@@ -1262,7 +1447,7 @@ void Calculate_PluseNum(PLSR_RouteConfig_t *route) | |||||
} | } | ||||
else | else | ||||
{ | { | ||||
// 数学上不可行,保持当前频率 | |||||
// 系数为0,保持当前频率 | |||||
actual_target_freq = v0; | actual_target_freq = v0; | ||||
accel_pulse_num = 0; | accel_pulse_num = 0; | ||||
const_pulse_num = total_pulses; | const_pulse_num = total_pulses; | ||||
@@ -1276,31 +1461,24 @@ void Calculate_PluseNum(PLSR_RouteConfig_t *route) | |||||
route->accel_pulse_count = accel_pulse_num; | route->accel_pulse_count = accel_pulse_num; | ||||
route->const_pulse_count = const_pulse_num; | route->const_pulse_count = const_pulse_num; | ||||
route->decel_pulse_count = decel_pulse_num; | route->decel_pulse_count = decel_pulse_num; | ||||
// 如果需要,可以将实际目标频率保存到某个字段 | |||||
// route->actual_target_freq = actual_target_freq; | |||||
} | } | ||||
} | } | ||||
void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim) | void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim) | ||||
{ | { | ||||
// TIM2中断:负责段切换逻辑 | // TIM2中断:负责段切换逻辑 | ||||
if(htim->Instance == TIM2) | if(htim->Instance == TIM2) | ||||
{ | { | ||||
// 立即停止PWM输出,防止多发脉冲 | |||||
PLSR_PWM_Stop(); | |||||
// 精确累加当前段已发送的脉冲数 | // 精确累加当前段已发送的脉冲数 | ||||
uint32_t current_section_pulses = __HAL_TIM_GetAutoreload(&htim2); | uint32_t current_section_pulses = __HAL_TIM_GetAutoreload(&htim2); | ||||
AllPluse += current_section_pulses; | AllPluse += current_section_pulses; | ||||
g_plsr_route.pulse_count = AllPluse; | g_plsr_route.pulse_count = AllPluse; | ||||
// 立即停止PWM输出,防止多发脉冲 | |||||
PLSR_PWM_Stop(); | |||||
// 更新Modbus寄存器(TIM6中断会实时累加全局计数器) | |||||
PLSR_UpdateModbusPulseCount(g_plsr_total_pulse_count); | |||||
// 当前段脉冲发送完毕,进入等待状态 | |||||
g_plsr_route.run_state = PLSR_STATE_WAIT; | |||||
PLSR_UpdateGlobalPulseCount(AllPluse); | |||||
// 当前段脉冲发送完毕,进入等待状态 | |||||
g_plsr_route.run_state = PLSR_STATE_WAIT; | |||||
// 检查等待条件是否满足 | // 检查等待条件是否满足 | ||||
if (PLSR_Section_CheckWaitCondition(&g_plsr_route)) | if (PLSR_Section_CheckWaitCondition(&g_plsr_route)) | ||||
@@ -1402,17 +1580,11 @@ void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim) | |||||
// 计算当前段已发送的总脉冲数 | // 计算当前段已发送的总脉冲数 | ||||
uint32_t current_pulse_count = AllPluse + current_tim2_count; | uint32_t current_pulse_count = AllPluse + current_tim2_count; | ||||
// 实时累加脉冲增量到全局计数器 | |||||
if (current_pulse_count > s_last_total_pulse) { | |||||
uint32_t pulse_increment = current_pulse_count - s_last_total_pulse; | |||||
g_plsr_total_pulse_count += pulse_increment; | |||||
s_last_total_pulse = current_pulse_count; | |||||
} | |||||
// 实时累加脉冲增量到全局计数器(根据方向逻辑决定递增或递减) | |||||
PLSR_UpdateGlobalPulseCount(current_pulse_count); | |||||
// 更新路由结构体的脉冲计数(使用原子操作保证一致性) | // 更新路由结构体的脉冲计数(使用原子操作保证一致性) | ||||
g_plsr_route.pulse_count = current_pulse_count; | g_plsr_route.pulse_count = current_pulse_count; | ||||
// 实时更新Modbus寄存器,供上位机读取(发送全局累加脉冲计数) | |||||
PLSR_UpdateModbusPulseCount(g_plsr_total_pulse_count); | |||||
// 处理加减速过程中的频率更新(使用新的直线加减速算法) | // 处理加减速过程中的频率更新(使用新的直线加减速算法) | ||||
if(g_plsr_route.run_state == PLSR_STATE_ACCEL || g_plsr_route.run_state == PLSR_STATE_DECEL) | if(g_plsr_route.run_state == PLSR_STATE_ACCEL || g_plsr_route.run_state == PLSR_STATE_DECEL) | ||||
{ | { | ||||
@@ -1517,7 +1689,7 @@ void PLSR_Route_Start(PLSR_RouteConfig_t* route) | |||||
s_last_total_pulse = g_plsr_route.pulse_count; | s_last_total_pulse = g_plsr_route.pulse_count; | ||||
// 启动第一段 | // 启动第一段 | ||||
PLSR_Section_StartNewSection(route); | |||||
PLSR_Section_StartNewSection(route); | |||||
// 计算第一段需要发送的脉冲数 | // 计算第一段需要发送的脉冲数 | ||||
PLSR_SectionConfig_t* first_section = &route->section[route->current_section_num - 1]; | PLSR_SectionConfig_t* first_section = &route->section[route->current_section_num - 1]; | ||||
@@ -1637,25 +1809,27 @@ void PLSR_Section_StartNewSection(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]; | ||||
// 设置本段的目标频率到路径控制结构体中 | |||||
route->target_freq = current_section->target_freq; | |||||
// 根据目标频率与当前频率的关系,确定段的初始运行状态 | |||||
if (route->target_freq > route->current_freq) | |||||
if(current_section->section_num == route->section_num) | |||||
{ | { | ||||
// 目标频率大于当前频率:需要加速到目标频率 | |||||
route->run_state = PLSR_STATE_ACCEL; | |||||
} | |||||
else if (route->target_freq < route->current_freq) | |||||
{ | |||||
// 目标频率小于当前频率:需要减速到目标频率 | |||||
route->run_state = PLSR_STATE_DECEL; | |||||
} | |||||
else | |||||
Calculate_PluseNum(route); | |||||
} | |||||
else if(current_section->section_num < route->section_num) //不是最后一段 | |||||
{ | { | ||||
// 目标频率等于当前频率:无需加减速,直接进入匀速状态 | |||||
route->run_state = PLSR_STATE_CONST; | |||||
// 对于非最后一段,根据等待条件决定脉冲分配策略 | |||||
if(current_section->wait_condition.wait_type == PLSR_WAIT_PLUSEEND) | |||||
{ | |||||
// 脉冲结束等待:只进行加速匀速或减速匀速,不进行完整的三段式分配,更新初始段状态 | |||||
Calculate_PluseNum_Simplified(route); | |||||
} | |||||
else | |||||
{ | |||||
// 外部事件等待:进行完整的加速、匀速、减速三段式分配 | |||||
Calculate_PluseNum(route); | |||||
} | |||||
} | } | ||||
// 设置本段的目标频率到路径控制结构体中 | |||||
route->target_freq = current_section->target_freq; | |||||
//为等待时间计数赋值 | //为等待时间计数赋值 | ||||
PLSR_Wait_StartTimer(route); | PLSR_Wait_StartTimer(route); | ||||
} | } | ||||
@@ -1691,57 +1865,45 @@ void PLSR_Section_SwitchNext(PLSR_RouteConfig_t* route) | |||||
route->current_freq = current_section->target_freq; | route->current_freq = current_section->target_freq; | ||||
} | } | ||||
/** | |||||
* @brief 计算匀速段可发送的脉冲数 | |||||
* @param route: 路径控制结构体指针 | |||||
* @retval None | |||||
* @note 计算除加减速外匀速段可发送的脉冲数 | |||||
*/ | |||||
void PLSR_Section_CalculateConstPulse(PLSR_RouteConfig_t* route) | |||||
{ | |||||
// 参数有效性检查:路径指针不能为空 | |||||
if (route == NULL) return; | |||||
} | |||||
// ==================== PLSR加减速算法函数实现 ==================== | // ==================== PLSR加减速算法函数实现 ==================== | ||||
/** | |||||
* @brief 曲线加减速算法 | |||||
* @param progress: 进度值(0.0-1.0) | |||||
* @retval 频率比例(0.0-1.0) | |||||
* @note S型曲线加减速算法,提供平滑的加减速过程 | |||||
*/ | |||||
float PLSR_Accel_CalculateCurve(float progress) | |||||
{ | |||||
// 曲线加减速算法 (S型曲线) | |||||
// 使用三次函数实现平滑的加减速曲线 | |||||
// /** | |||||
// * @brief 曲线加减速算法 | |||||
// * @param progress: 进度值(0.0-1.0) | |||||
// * @retval 频率比例(0.0-1.0) | |||||
// * @note S型曲线加减速算法,提供平滑的加减速过程 | |||||
// */ | |||||
// float PLSR_Accel_CalculateCurve(float progress) | |||||
// { | |||||
// // 曲线加减速算法 (S型曲线) | |||||
// // 使用三次函数实现平滑的加减速曲线 | |||||
if (progress < 0.0f) progress = 0.0f; | |||||
if (progress > 1.0f) progress = 1.0f; | |||||
// if (progress < 0.0f) progress = 0.0f; | |||||
// if (progress > 1.0f) progress = 1.0f; | |||||
// S型曲线: f(x) = 3x² - 2x³ | |||||
// 这个函数在x=0时f(0)=0,在x=1时f(1)=1 | |||||
// 并且具有平滑的一阶和二阶导数 | |||||
return 3.0f * progress * progress - 2.0f * progress * progress * progress; | |||||
} | |||||
// // S型曲线: f(x) = 3x² - 2x³ | |||||
// // 这个函数在x=0时f(0)=0,在x=1时f(1)=1 | |||||
// // 并且具有平滑的一阶和二阶导数 | |||||
// return 3.0f * progress * progress - 2.0f * progress * progress * progress; | |||||
// } | |||||
/** | |||||
* @brief 正弦加减速算法 | |||||
* @param progress: 进度值(0.0-1.0) | |||||
* @retval 频率比例(0.0-1.0) | |||||
* @note 基于正弦函数的平滑加减速算法 | |||||
*/ | |||||
float PLSR_Accel_CalculateSine(float progress) | |||||
{ | |||||
// 进度值边界限制:确保输入值在有效范围内 | |||||
if (progress < 0.0f) progress = 0.0f; // 最小值限制 | |||||
if (progress > 1.0f) progress = 1.0f; // 最大值限制 | |||||
// /** | |||||
// * @brief 正弦加减速算法 | |||||
// * @param progress: 进度值(0.0-1.0) | |||||
// * @retval 频率比例(0.0-1.0) | |||||
// * @note 基于正弦函数的平滑加减速算法 | |||||
// */ | |||||
// float PLSR_Accel_CalculateSine(float progress) | |||||
// { | |||||
// // 进度值边界限制:确保输入值在有效范围内 | |||||
// if (progress < 0.0f) progress = 0.0f; // 最小值限制 | |||||
// if (progress > 1.0f) progress = 1.0f; // 最大值限制 | |||||
// 正弦加减速:使用sin(π/2 * x)实现平滑的加减速曲线 | |||||
// 在起始和结束时变化率较小,中间变化率较大 | |||||
return sinf(progress * 3.14159f / 2.0f); | |||||
} | |||||
// // 正弦加减速:使用sin(π/2 * x)实现平滑的加减速曲线 | |||||
// // 在起始和结束时变化率较小,中间变化率较大 | |||||
// return sinf(progress * 3.14159f / 2.0f); | |||||
// } | |||||
/** | /** | ||||
* @brief 计算加减速步数 | * @brief 计算加减速步数 | ||||
@@ -1969,4 +2131,3 @@ uint8_t PLSR_Section_CheckWaitCondition(PLSR_RouteConfig_t* route) | |||||
@@ -20,7 +20,7 @@ | |||||
<stlinkResetStrategy>2</stlinkResetStrategy> | <stlinkResetStrategy>2</stlinkResetStrategy> | ||||
</StLinkDriver> | </StLinkDriver> | ||||
<DebugChecksum> | <DebugChecksum> | ||||
<Checksum>921199680</Checksum> | |||||
<Checksum>2012208745</Checksum> | |||||
</DebugChecksum> | </DebugChecksum> | ||||
<Exceptions> | <Exceptions> | ||||
<StopOnUncaught>_ 0</StopOnUncaught> | <StopOnUncaught>_ 0</StopOnUncaught> | ||||
@@ -1462,7 +1462,7 @@ | |||||
</plugin> | </plugin> | ||||
<plugin> | <plugin> | ||||
<file>$TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin</file> | <file>$TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin</file> | ||||
<loadFlag>0</loadFlag> | |||||
<loadFlag>1</loadFlag> | |||||
</plugin> | </plugin> | ||||
<plugin> | <plugin> | ||||
<file>$TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin</file> | <file>$TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin</file> | ||||
@@ -956,7 +956,7 @@ | |||||
</option> | </option> | ||||
<option> | <option> | ||||
<name>IlinkStackAnalysisEnable</name> | <name>IlinkStackAnalysisEnable</name> | ||||
<state>0</state> | |||||
<state>1</state> | |||||
</option> | </option> | ||||
<option> | <option> | ||||
<name>IlinkStackControlFile</name> | <name>IlinkStackControlFile</name> | ||||
@@ -1,75 +1,71 @@ | |||||
# ninja log v5 | # ninja log v5 | ||||
197 253 7768347170740755 stm32f4xx_ll_rng.pbi 5e12b9ea00d0b826 | |||||
194 251 7768347170710859 stm32f4xx_ll_gpio.pbi df8b54563945d41d | |||||
702 1049 7768347178674217 stm32f4xx_hal_flash_ex.pbi ac2d035774fe6a2e | |||||
251 704 7768347175106171 stm32f4xx_hal_pwr.pbi b347497fce55b6a8 | |||||
1052 1128 7768347179272216 stm32f4xx_ll_pwr.pbi 952cb4e4f4edb65b | |||||
1154 1183 7768347180308752 stm32f4xx_ll_tim.pbi b88554c6464192f5 | |||||
162 202 7768347170481616 test.1_part7.pbi 67c64030b23c9b51 | |||||
1367 1937 7768347187474789 test.1_part3.pbi 2c7780fc3f88c160 | |||||
1049 1367 7768347182112716 stm32f4xx_hal_rcc_ex.pbi c1d751d24d77a2df | |||||
1177 1353 7768347181963223 app_hooks.pbi ffd399489d189d5a | |||||
50 159 7768347169524813 os_cpu_c.pbi eb75b848b406ea34 | |||||
932 1273 7768347181116073 stm32f4xx_hal_pwr_ex.pbi b84426bf5a4ce0cf | |||||
1468 1969 7768347188072792 test.1_part4.pbi b15d70d6e2dea5ca | |||||
46 533 7768347173282250 stm32f4xx_hal_rcc.pbi 50976e6b18f3b8bc | |||||
935 1275 7768347181046289 stm32f4xx_hal_usart.pbi b368fafd8b8b8bb9 | |||||
52 432 7768347172783926 stm32f4xx_hal_tim.pbi 71840baae88d57c4 | |||||
1056 1123 7768347179322073 stm32f4xx_ll_dac.pbi 7dfc4be0933cdfaf | |||||
464 505 7768536870781453 stm32f4xx_ll_rng.pbi 5e12b9ea00d0b826 | |||||
67 129 7768536866814718 stm32f4xx_ll_gpio.pbi df8b54563945d41d | |||||
32 67 7768536866465887 stm32f4xx_ll_tim.pbi b88554c6464192f5 | |||||
159 513 7768536870801418 stm32f4xx_hal_flash_ex.pbi ac2d035774fe6a2e | |||||
931 1257 7768536878369160 stm32f4xx_hal_pwr.pbi b347497fce55b6a8 | |||||
115 147 7768536867273193 stm32f4xx_ll_pwr.pbi 952cb4e4f4edb65b | |||||
166 215 7768536867811386 test.1_part7.pbi 67c64030b23c9b51 | |||||
1543 2106 7768536886832096 test.1_part3.pbi 2c7780fc3f88c160 | |||||
1210 1542 7768536881070146 stm32f4xx_hal_rcc_ex.pbi c1d751d24d77a2df | |||||
42 122 7768536866824682 app_hooks.pbi ffd399489d189d5a | |||||
1652 2177 7768536887509800 test.1_part4.pbi b15d70d6e2dea5ca | |||||
513 867 7768536874350914 stm32f4xx_hal_pwr_ex.pbi b84426bf5a4ce0cf | |||||
45 114 7768536866864582 os_cpu_c.pbi eb75b848b406ea34 | |||||
578 950 7768536875260101 stm32f4xx_hal_rcc.pbi 50976e6b18f3b8bc | |||||
942 1346 7768536879266167 stm32f4xx_hal_tim.pbi 71840baae88d57c4 | |||||
871 1213 7768536877692971 stm32f4xx_hal_usart.pbi b368fafd8b8b8bb9 | |||||
3553 5121 7768536916697101 test.1.pbw f11e09b552b4c82f | |||||
2014 2487 7762488664073707 uart.pbi 5ce52444157923c9 | 2014 2487 7762488664073707 uart.pbi 5ce52444157923c9 | ||||
1201 2791 7768368842547800 test.1.pbw f11e09b552b4c82f | |||||
1124 1154 7768347180019723 stm32f4xx_ll_crc.pbi dcf41d4b97590765 | |||||
160 196 7768347170371982 stm32f4xx_ll_rcc.pbi fb9ace481decf8ab | |||||
254 280 7768347171288915 stm32f4xx_ll_spi.pbi ce805017b70a4f43 | |||||
1967 2303 7768347191132561 stm32f4xx_hal_msp.pbi 8144db72f01a260b | |||||
433 459 7768347173082920 stm32f4xx_ll_usart.pbi 783190689e783d9 | |||||
44 157 7768347169524813 os_dbg.pbi f7287a072fe86a55 | |||||
1128 1156 7768347180029689 stm32f4xx_ll_dma.pbi f9e6142ede2883b4 | |||||
2230 2534 7768347193823549 stm32f4xx_hal_crc.pbi 881b29e4c80746b3 | |||||
157 200 7768347170352051 stm32f4xx_ll_exti.pbi 883a2fd463949e02 | |||||
39 161 7768347170053061 ucos_ii.pbi 4e0ab25e0060431e | |||||
1157 1176 7768347180159266 test.1_part5.pbi 41f12be61ce67c27 | |||||
48 193 7768347170352051 stm32f4xx_ll_i2c.pbi 7f1151d8874c40c9 | |||||
1275 1641 7768347184325322 stm32f4xx_hal.pbi a073c739b6b34173 | |||||
280 702 7768347174538064 stm32f4xx_hal_sram.pbi 4652c5af4efd4e19 | |||||
1354 1410 7768347182292125 test.1_part6.pbi b9d684e502f25afa | |||||
700 1051 7768347178704124 stm32f4xx_hal_flash.pbi eccf13860e1d0c6a | |||||
705 1055 7768347179033016 stm32f4xx_hal_tim_ex.pbi 3c68a2e86514987f | |||||
765 1126 7768347179172570 stm32f4xx_hal_wwdg.pbi fca2b44f67349f99 | |||||
460 764 7768347176072920 stm32f4xx_hal_flash_ramfunc.pbi ae498685b336a49c | |||||
1126 1468 7768347183149263 stm32f4xx_hal_uart.pbi e7ca7ebbb4330340 | |||||
215 253 7768536868329652 stm32f4xx_ll_dac.pbi 7dfc4be0933cdfaf | |||||
1214 1246 7768536878269490 stm32f4xx_ll_crc.pbi dcf41d4b97590765 | |||||
126 159 7768536867392785 stm32f4xx_ll_rcc.pbi fb9ace481decf8ab | |||||
1669 1999 7768536885705853 stm32f4xx_hal_msp.pbi 8144db72f01a260b | |||||
498 546 7768536871140260 stm32f4xx_ll_spi.pbi ce805017b70a4f43 | |||||
48 118 7768536866944314 os_dbg.pbi f7287a072fe86a55 | |||||
36 71 7768536866495790 stm32f4xx_ll_usart.pbi 783190689e783d9 | |||||
147 509 7768536870671821 stm32f4xx_hal_crc.pbi 881b29e4c80746b3 | |||||
888 930 7768536875008719 stm32f4xx_ll_dma.pbi f9e6142ede2883b4 | |||||
1247 1281 7768536878608362 stm32f4xx_ll_exti.pbi 883a2fd463949e02 | |||||
1282 1297 7768536878777835 test.1_part5.pbi 41f12be61ce67c27 | |||||
39 166 7768536867462563 ucos_ii.pbi 4e0ab25e0060431e | |||||
2355 2700 7768536892214098 stm32f4xx_hal.pbi a073c739b6b34173 | |||||
71 125 7768536866854589 stm32f4xx_ll_i2c.pbi 7f1151d8874c40c9 | |||||
868 1209 7768536877633167 stm32f4xx_hal_sram.pbi 4652c5af4efd4e19 | |||||
592 942 7768536875198075 stm32f4xx_hal_flash.pbi eccf13860e1d0c6a | |||||
546 578 7768536871578800 test.1_part6.pbi b9d684e502f25afa | |||||
119 502 7768536870612013 stm32f4xx_hal_tim_ex.pbi 3c68a2e86514987f | |||||
1205 1538 7768536881149867 stm32f4xx_hal_flash_ramfunc.pbi ae498685b336a49c | |||||
950 1261 7768536878369160 stm32f4xx_hal_wwdg.pbi fca2b44f67349f99 | |||||
1257 1652 7768536881967123 stm32f4xx_hal_uart.pbi e7ca7ebbb4330340 | |||||
35 454 7762489045860992 timer.pbi 8f8acc6a162957f | 35 454 7762489045860992 timer.pbi 8f8acc6a162957f | ||||
203 700 7768347174837047 stm32f4xx_hal_i2c.pbi 74395538aa12fa10 | |||||
1642 1966 7768347187993051 stm32f4xx_hal_dma.pbi 2d6aa8f3983bf80a | |||||
1183 1501 7768347183428351 stm32f4xx_hal_timebase_tim.pbi b6f5ce0feaca8054 | |||||
534 934 7768347176930060 stm32f4xx_hal_i2c_ex.pbi 7798e48f8e6ef374 | |||||
1941 2306 7768347191122593 stm32f4xx_hal_dma_ex.pbi 1960c5ab56ffede7 | |||||
1938 2325 7768347191571086 main.pbi 9c0a6aa02351636a | |||||
536 932 7768347176850317 stm32f4xx_hal_exti.pbi 373789209d565f00 | |||||
1411 1807 7768347186009705 stm32f4xx_it.pbi d01766022cb163bc | |||||
2040 2377 7768347192029586 stm32f4xx_hal_cortex.pbi 2c6d2473a153fb5a | |||||
2306 2614 7768347194471380 system_stm32f4xx.pbi f50e519d7e78a5de | |||||
1807 2229 7768347190674090 gpio.pbi a088b5271f02118a | |||||
200 536 7768347173561328 stm32f4xx_hal_gpio.pbi 53b438f48be9a8d0 | |||||
2637 3163 7768347200122513 test.1_part0.pbi 60db414ccd7a80f4 | |||||
865 1201 7768368826999829 test.1.pbd 363d5d355a216cdf | |||||
356 864 7768368823631088 test.1_part1.pbi 72148e63fe682e2f | |||||
2534 3065 7768347199036117 test.1_part2.pbi 932c7a5b50912170 | |||||
1689 2039 7768347188461494 dma.pbi 4f5ebe00ac67ed57 | |||||
32 356 7768368818548085 tim.pbi f07c6d790a519d93 | |||||
1970 2322 7768347191620920 usart.pbi 7c2d93866867ab60 | |||||
2304 2637 7768347194690670 modbus_log.pbi 596603da5f343c45 | |||||
1502 1940 7768347187753855 flash_save.pbi dc7405226be28cc6 | |||||
2322 2613 7768347194541146 modbus_crc.pbi 9b76681ddf289794 | |||||
35 363 7768369628821298 tim.pbi f07c6d790a519d93 | |||||
363 870 7768369633904319 test.1_part1.pbi 72148e63fe682e2f | |||||
871 1210 7768369637302964 test.1.pbd 363d5d355a216cdf | |||||
1211 2792 7768369652781166 test.1.pbw f11e09b552b4c82f | |||||
31 352 7768370438400439 tim.pbi f07c6d790a519d93 | |||||
353 862 7768370443493387 test.1_part1.pbi 72148e63fe682e2f | |||||
862 1197 7768370446852178 test.1.pbd 363d5d355a216cdf | |||||
1197 2725 7768370461812142 test.1.pbw f11e09b552b4c82f | |||||
31 356 7768371513902830 tim.pbi f07c6d790a519d93 | |||||
357 865 7768371518965908 test.1_part1.pbi 72148e63fe682e2f | |||||
866 1209 7768371522444284 test.1.pbd 363d5d355a216cdf | |||||
1210 2760 7768371537633462 test.1.pbw f11e09b552b4c82f | |||||
122 464 7768536870422653 stm32f4xx_hal_i2c.pbi 74395538aa12fa10 | |||||
864 1205 7768536877762736 stm32f4xx_hal_dma.pbi 2d6aa8f3983bf80a | |||||
2024 2359 7768536889393504 stm32f4xx_hal_timebase_tim.pbi b6f5ce0feaca8054 | |||||
505 887 7768536874450598 stm32f4xx_hal_dma_ex.pbi 1960c5ab56ffede7 | |||||
509 871 7768536874185622 stm32f4xx_hal_i2c_ex.pbi 7798e48f8e6ef374 | |||||
253 592 7768536871708352 stm32f4xx_hal_exti.pbi 373789209d565f00 | |||||
1644 2023 7768536885964976 main.pbi 9c0a6aa02351636a | |||||
1995 2354 7768536889343681 stm32f4xx_it.pbi d01766022cb163bc | |||||
130 498 7768536870532288 stm32f4xx_hal_cortex.pbi 2c6d2473a153fb5a | |||||
2110 2461 7768536890190832 system_stm32f4xx.pbi f50e519d7e78a5de | |||||
1999 2335 7768536889004806 gpio.pbi a088b5271f02118a | |||||
3209 3553 7768536901332297 test.1.pbd 363d5d355a216cdf | |||||
2336 2882 7768536894499702 test.1_part0.pbi 60db414ccd7a80f4 | |||||
502 863 7768536874420683 stm32f4xx_hal_gpio.pbi 53b438f48be9a8d0 | |||||
2700 3209 7768536897898329 test.1_part1.pbi 72148e63fe682e2f | |||||
1539 2110 7768536886772270 test.1_part2.pbi 932c7a5b50912170 | |||||
1347 1669 7768536882345866 dma.pbi 4f5ebe00ac67ed57 | |||||
2177 2581 7768536891416765 tim.pbi f07c6d790a519d93 | |||||
2106 2492 7768536890439999 usart.pbi 7c2d93866867ab60 | |||||
1297 1647 7768536882196362 modbus_log.pbi 596603da5f343c45 | |||||
1648 1995 7768536885436731 modbus_crc.pbi 9b76681ddf289794 | |||||
1261 1644 7768536881937241 flash_save.pbi dc7405226be28cc6 | |||||
32 380 7768544283889545 tim.pbi f07c6d790a519d93 | |||||
381 904 7768544289141477 test.1_part1.pbi 72148e63fe682e2f | |||||
905 1273 7768544292826533 test.1.pbd 363d5d355a216cdf | |||||
1273 2905 7768544308773033 test.1.pbw f11e09b552b4c82f | |||||
36 414 7768544355956471 tim.pbi f07c6d790a519d93 | |||||
415 955 7768544361556770 test.1_part1.pbi 72148e63fe682e2f | |||||
955 1326 7768544365284012 test.1.pbd 363d5d355a216cdf | |||||
1327 3036 7768544381928778 test.1.pbw f11e09b552b4c82f |
@@ -1,60 +1,55 @@ | |||||
main.pbi: \ | main.pbi: \ | ||||
e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\Core\Src\main.c \ | |||||
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\gpio.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\..\UCOS\Source\ucos_ii.h \ | |||||
e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM\..\UCOS\Config\app_cfg.h \ | |||||
E:\Software\IAR\arm\inc\c\stdarg.h E:\Software\IAR\arm\inc\c\stdio.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\tim.h \ | |||||
e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM/../Core/Inc/usart.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:\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:\Software\IAR\arm\inc\c\math.h \ | |||||
e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM\..\Core\Inc\dma.h \ | |||||
E:\Software\IAR\arm\inc\c\DLib_float_setup.h \ | E:\Software\IAR\arm\inc\c\DLib_float_setup.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\dma.h \ | |||||
e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM/../Core/Inc\flash_save.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\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:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM\..\Core\Inc\tim.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:\Software\IAR\arm\inc\c\stdio.h E:\Software\IAR\arm\inc\c\stdarg.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:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\EWARM\..\Core\Inc\gpio.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\main.c |
@@ -1,13 +1,12 @@ | |||||
os_cpu_c.pbi: \ | os_cpu_c.pbi: \ | ||||
e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\UCOS\Ports\os_cpu_c.c \ | |||||
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:\Software\IAR\arm\inc\c\stdarg.h E:\Software\IAR\arm\inc\c\stdio.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:\Software\IAR\arm\inc\c\ysizet.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\Source\os_trace.h \ | |||||
e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\UCOS\Ports\os_cpu.h \ | e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\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\..\UCOS\Config\os_cfg.h \ | |||||
E:\Software\IAR\arm\inc\c\ycheck.h E:\Software\IAR\arm\inc\c\ysizet.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\stdio.h \ | |||||
E:\Software\IAR\arm\inc\c\stdarg.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:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\UCOS\Ports\os_cpu_c.c |
@@ -1,49 +1,47 @@ | |||||
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 \ | |||||
tim.pbi: 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\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:\Software\IAR\arm\inc\c\math.h \ | |||||
E:\Software\IAR\arm\inc\c\DLib_float_setup.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\EWARM\..\Core\Inc\tim.h \ | |||||
e:\Users\Mortal\Desktop\Train_Camp_PLSR\PLSR\PLSR\Core\Src\tim.c |