Compare commits

..

1 Commits

Author SHA1 Message Date
起床就犯困 1a51263c5f 1 2025-05-29 17:20:11 +08:00
8 changed files with 2437 additions and 2257 deletions

View File

@ -1,6 +0,0 @@
{
"files.associations": {
"gd32f4xx_it.h": "c",
"3626motor.h": "c"
}
}

View File

@ -578,7 +578,7 @@ static void ptz_hori_pid_task()
//根据电机转速计算云台转速
g_ptz.hori_speed_hall_actual = g_ptz.hori_motor_speed_hall_actual / PTZ_HORI_RATIO;
g_ptz.hori_speed_actual = g_ptz.hori_speed_hall_actual;
#endif
#endif

View File

@ -1,29 +0,0 @@
#include "3626motor.h"
void motor3606_io_Init()
{
rcu_periph_clock_enable(RCU_GPIOC);
rcu_periph_clock_enable(RCU_GPIOD);
rcu_periph_clock_enable(RCU_GPIOE);
gpio_mode_set(GPIOC, GPIO_MODE_OUTPUT, GPIO_PUPD_PULLUP, GPIO_PIN_9);
gpio_output_options_set(GPIOC, GPIO_OTYPE_PP, GPIO_OSPEED_50MHZ, GPIO_PIN_9);
gpio_mode_set(GPIOD, GPIO_MODE_OUTPUT, GPIO_PUPD_PULLUP, GPIO_PIN_10);
gpio_output_options_set(GPIOD, GPIO_OTYPE_PP, GPIO_OSPEED_50MHZ, GPIO_PIN_10);
gpio_mode_set(GPIOE, GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, GPIO_PIN_0);
gpio_mode_set(GPIOE, GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, GPIO_PIN_1);
gpio_output_options_set(GPIOE, GPIO_OTYPE_PP, GPIO_OSPEED_50MHZ, GPIO_PIN_0| GPIO_PIN_1);
rcu_periph_clock_enable(RCU_SYSCFG);
gpio_mode_set(GPIOE, GPIO_MODE_INPUT, GPIO_PUPD_NONE, GPIO_PIN_10);
H_BRIDGE_POWER_ON;
// V_BRIDGE_POWER_ON;
}

View File

@ -1,36 +0,0 @@
#ifndef __3626_MOTOR_H_
#define __3626_MOTOR_H_
#include "gd32f4xx_it.h"
#include "includes.h"
/* 水平电机正向旋转 */
#define H_Forward_Rotation gpio_bit_reset(GPIOC, GPIO_PIN_9)
/* 水平电机反向旋转 */
#define H_Reverse_Rotation gpio_bit_set(GPIOC, GPIO_PIN_9)
/* 垂直电机正向旋转 */
#define V_Forward_Rotation gpio_bit_reset(GPIOD, GPIO_PIN_10)
/* 垂直电机反向旋转 */
#define V_Reverse_Rotation gpio_bit_set(GPIOD, GPIO_PIN_10)
/* 驱动器电源控制引脚 */
#define H_BRIDGE_POWER_OFF gpio_bit_reset(GPIOE,GPIO_PIN_0)
#define H_BRIDGE_POWER_ON gpio_bit_set(GPIOE,GPIO_PIN_0)
#define V_BRIDGE_POWER_OFF gpio_bit_reset(GPIOE,GPIO_PIN_1)
#define V_BRIDGE_POWER_ON gpio_bit_set(GPIOE,GPIO_PIN_1)
void motor3606_io_Init();
#endif

View File

@ -1,9 +1,9 @@
////////////////////////////////////////////////////////////////////////////////
/// FULL_BRIDGE<EFBFBD>ļ<EFBFBD>
/// FULL_BRIDGE文件
///
///
/// <EFBFBD><EFBFBD><EFBFBD><EFBFBD>hall<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
/// 包含hall捕获、六步驱动等
/// @file full_bridge.c
/// @author LH
/// @date 2022-07-19
@ -34,11 +34,11 @@ HALL_State V_Hall_state;
/*
********************************<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>***********************************/
*******************************************************************/
static unsigned int h_pwm_duty;
static unsigned int v_pwm_duty;
/*!
\brief none pwmռ<EFBFBD>ձ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
\brief none pwm占空比设置
\param[in] none
\param[out] none
\retval none
@ -50,7 +50,7 @@ void h_pwm_duty_change(unsigned int pwm_duty)
h_pwm_duty = pwm_duty;
}
//<EFBFBD><EFBFBD>ֱ
//垂直
void v_pwm_duty_change(unsigned int pwm_duty)
{
v_pwm_duty = pwm_duty;
@ -59,7 +59,7 @@ void v_pwm_duty_change(unsigned int pwm_duty)
/*!
\brief hall״̬<EFBFBD><EFBFBD>ȡ
\brief hall状态获取
\param[in] none
\param[out] none
\retval none
@ -94,7 +94,7 @@ unsigned char v_hall_senser_value_get()
/*!
\brief none U<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>V<EFBFBD><EFBFBD><EFBFBD>
\brief none U相进V相出
\param[in] none
\param[out] none
\retval none
@ -112,7 +112,7 @@ void h_uh_vl()
/*!
\brief none W<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>V<EFBFBD><EFBFBD><EFBFBD>
\brief none W相进V相出
\param[in] none
\param[out] none
\retval none
@ -130,7 +130,7 @@ void h_wh_vl()
/*!
\brief none W<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>U<EFBFBD><EFBFBD><EFBFBD>
\brief none W相进U相出
\param[in] none
\param[out] none
\retval none
@ -148,7 +148,7 @@ void h_wh_ul()
/*!
\brief none V<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>U<EFBFBD><EFBFBD><EFBFBD>
\brief none V相进U相出
\param[in] none
\param[out] none
\retval none
@ -166,7 +166,7 @@ void h_vh_ul()
/*!
\brief none V<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>W<EFBFBD><EFBFBD><EFBFBD>
\brief none V相进W相出
\param[in] none
\param[out] none
\retval none
@ -184,7 +184,7 @@ void h_vh_wl()
/*!
\brief none U<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>W<EFBFBD><EFBFBD><EFBFBD>
\brief none U相进W相出
\param[in] none
\param[out] none
\retval none
@ -201,7 +201,7 @@ void h_uh_wl()
}
/*!
\brief none <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>򣬶<EFBFBD><EFBFBD><EFBFBD>120<EFBFBD><EFBFBD>hall<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ת˳<EFBFBD><EFBFBD>Ϊ546231<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ת˳<EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD>7-<EFBFBD><EFBFBD>ת˳<EFBFBD><EFBFBD>,,<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ټ<EFBFBD>1<EFBFBD><EFBFBD>
\brief none 120°hall5462317-,,1
\param[in] none
\param[out] none
\retval none
@ -218,7 +218,7 @@ pctr h_six_step_commu[6] =
/*!
\brief none U<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>V<EFBFBD><EFBFBD><EFBFBD>
\brief none U相进V相出
\param[in] none
\param[out] none
\retval none
@ -236,7 +236,7 @@ void v_uh_vl()
/*!
\brief none W<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>V<EFBFBD><EFBFBD><EFBFBD>
\brief none W相进V相出
\param[in] none
\param[out] none
\retval none
@ -254,7 +254,7 @@ void v_wh_vl()
/*!
\brief none W<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>U<EFBFBD><EFBFBD><EFBFBD>
\brief none W相进U相出
\param[in] none
\param[out] none
\retval none
@ -272,7 +272,7 @@ void v_wh_ul()
/*!
\brief none V<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>U<EFBFBD><EFBFBD><EFBFBD>
\brief none V相进U相出
\param[in] none
\param[out] none
\retval none
@ -290,7 +290,7 @@ void v_vh_ul()
/*!
\brief none V<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>W<EFBFBD><EFBFBD><EFBFBD>
\brief none V相进W相出
\param[in] none
\param[out] none
\retval none
@ -308,7 +308,7 @@ void v_vh_wl()
/*!
\brief none U<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>W<EFBFBD><EFBFBD><EFBFBD>
\brief none U相进W相出
\param[in] none
\param[out] none
\retval none
@ -325,7 +325,7 @@ void v_uh_wl()
}
/*!
\brief none <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>򣬶<EFBFBD><EFBFBD><EFBFBD>120<EFBFBD><EFBFBD>hall<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ת˳<EFBFBD><EFBFBD>Ϊ546231<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ת˳<EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD>7-<EFBFBD><EFBFBD>ת˳<EFBFBD><EFBFBD>,,<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ټ<EFBFBD>1<EFBFBD><EFBFBD>
\brief none 120°hall5462317-,,1
\param[in] none
\param[out] none
\retval none
@ -345,33 +345,33 @@ void uvw()
}
/*!
\brief none ˮƽֱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˢ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
\brief none
\param[in] none
\param[out] none
\retval none
\note LH @2022.07.21
*/
//<EFBFBD>ж<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
//中断里调用
void h_bldc_six_step()
{
// H_ADC2_Phase_current();
if(g_ptz.hori_start_stop_set == PTZ_HORI_START)
{//<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬
{//电机处于启动状态
H_Hall_state.Hall_value = h_hall_senser_value_get();
if((H_Hall_state.Hall_value <= 6)&&(H_Hall_state.Hall_value >= 1))
{
// if(g_ptz.hori_direction_set == PTZ_HORI_DIR_RIGHT)
// {//<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ת- 1
// {//电机正转- 1
// h_six_step_commu[(7-H_Hall_state.Hall_value) -1]();
// }else{//<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ת
// }else{//电机反转
// h_six_step_commu[H_Hall_state.Hall_value -1]();
// }
//ֱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>̨ת<EFBFBD><EFBFBD>
//直齿云台转向
if(g_ptz.hori_direction_set == PTZ_HORI_DIR_RIGHT)
{//<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ת- 1
{//电机正转- 1
h_six_step_commu[H_Hall_state.Hall_value -1]();
}else{//<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ת
}else{//电机反转
h_six_step_commu[(7-H_Hall_state.Hall_value) -1]();
}
@ -380,35 +380,35 @@ void h_bldc_six_step()
}
}
/*!
\brief none <EFBFBD><EFBFBD>ֱֱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˢ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
\brief none
\param[in] none
\param[out] none
\retval none
\note LH @2022.07.21
*/
//<EFBFBD>ж<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
//中断里调用
void v_bldc_six_step()
{
// V_ADC0_Phase_current();
if((g_ptz.vert_start_stop_set == PTZ_VERT_START) && (g_ptz.vert_pid.mode == PID_ADJUST_SPEED))
{//<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬
{//电机处于启动状态
V_Hall_state.Hall_value = v_hall_senser_value_get();
if((V_Hall_state.Hall_value <= 6)&&(V_Hall_state.Hall_value >= 1))
{
if(g_ptz.vert_direction_set == PTZ_VERT_DIR_UP)
{//<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ת- 1
{//电机正转- 1
v_six_step_commu[V_Hall_state.Hall_value -1]();
}else{//<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ת
}else{//电机反转
v_six_step_commu[(7-V_Hall_state.Hall_value) -1]();
}
// if(g_ptz.vert_pid.PidUT_float < 0)
// {//<EFBFBD><EFBFBD><EFBFBD><EFBFBD>˼·<EFBFBD><EFBFBD>PID<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ת<EFBFBD><EFBFBD>
// {//换种思路PID计算为负数时反向转动
// if(g_ptz.vert_direction_set == PTZ_VERT_DIR_UP)
// {//<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ת- 1
// {//电机正转- 1
// v_six_step_commu[(7-V_Hall_state.Hall_value) -1]();
// }else{//<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ת
// }else{//电机反转
// v_six_step_commu[V_Hall_state.Hall_value -1]();
// }
// }
@ -422,7 +422,7 @@ void v_bldc_six_step()
/*!
\brief none <EFBFBD><EFBFBD>ֱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>٣<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
\brief none
\param[in] none
\param[out] none
\retval none
@ -455,6 +455,7 @@ void hori_dir_speed_start(unsigned int verf)
TIMER_CH0CV(TIMER2) = verf;//U199;//
TIMER_CH1CV(TIMER2) = 0;//V
TIMER_CH2CV(TIMER2) = 0;//W
}
void hori_dir_speed_stop(void)
@ -472,7 +473,7 @@ void hori_dir_speed_stop(void)
/*!
\brief none <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
\brief none
\param[in] none
\param[out] none
\retval none
@ -480,7 +481,7 @@ void hori_dir_speed_stop(void)
*/
void h_start_motor()
{
//<EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>ʹ<EFBFBD><EFBFBD>
//定时器使能
// timer_enable(TIMER2);
h_pwm_duty_change(0);
TIMER_CH0CV(TIMER2) = 0 ;//
@ -491,12 +492,12 @@ void h_start_motor()
H_EN2_OFF;//V
H_EN3_OFF;//W
// timer_interrupt_enable(TIMER2,TIMER_INT_UP);//<EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD>ʹ<EFBFBD><EFBFBD>
// timer_interrupt_enable(TIMER2,TIMER_INT_UP);//定时器更新中断使能
}
void v_start_motor()
{
//<EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>ʹ<EFBFBD><EFBFBD>
//定时器使能
// timer_enable(TIMER3);
v_pwm_duty_change(0);
TIMER_CH0CV(TIMER3) = 0 ;//
@ -507,12 +508,12 @@ void v_start_motor()
V_EN2_OFF;//V
V_EN3_OFF;//W
// timer_interrupt_enable(TIMER3,TIMER_INT_UP);//<EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD>ʹ<EFBFBD><EFBFBD>
// timer_interrupt_enable(TIMER3,TIMER_INT_UP);//定时器更新中断使能
}
/*!
\brief none <EFBFBD><EFBFBD><EFBFBD>ֹͣ
\brief none
\param[in] none
\param[out] none
\retval none
@ -521,7 +522,7 @@ void v_start_motor()
void h_stop_motor()
{
h_pwm_duty_change(0);
// //<EFBFBD><EFBFBD><EFBFBD><EFBFBD>͵<EFBFBD>ƽ
// //输出低电平
TIMER_CH0CV(TIMER2) = 0;
TIMER_CH1CV(TIMER2) = 0;
TIMER_CH2CV(TIMER2) = 0;
@ -529,15 +530,15 @@ void h_stop_motor()
H_EN1_OFF;//U
H_EN2_OFF;//V
H_EN3_OFF;//W
// //<EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD>ر<EFBFBD>
// //定时器关闭
// timer_disable(TIMER2);
// timer_interrupt_disable(TIMER2,TIMER_INT_UP);//<EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD>ʹ<EFBFBD><EFBFBD>
// timer_interrupt_disable(TIMER2,TIMER_INT_UP);//定时器更新中断使能
}
void v_stop_motor()
{
v_pwm_duty_change(0);
// //<EFBFBD><EFBFBD><EFBFBD><EFBFBD>͵<EFBFBD>ƽ
// //输出低电平
TIMER_CH0CV(TIMER3) = 0;
TIMER_CH1CV(TIMER3) = 0;
TIMER_CH2CV(TIMER3) = 0;
@ -545,9 +546,9 @@ void v_stop_motor()
V_EN1_OFF;//U
V_EN2_OFF;//V
V_EN3_OFF;//W
// //<EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD>ر<EFBFBD>
// //定时器关闭
// timer_disable(TIMER3);
// timer_interrupt_disable(TIMER3,TIMER_INT_UP);//<EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD>ʹ<EFBFBD><EFBFBD>
// timer_interrupt_disable(TIMER3,TIMER_INT_UP);//定时器更新中断使能
}
@ -556,7 +557,7 @@ void v_stop_motor()
/*!
\brief hall<EFBFBD><EFBFBD><EFBFBD>ų<EFBFBD>ʼ<EFBFBD><EFBFBD>
\brief hall引脚初始化
\param[in] none
\param[out] none
\retval none
@ -564,11 +565,11 @@ void v_stop_motor()
*/
static void hall_io_init(void)
{
// //<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>
// //配置引脚时钟
// rcu_periph_clock_enable(RCU_GPIOE);
//
// //ˮƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>PE10-H1,PE11-H2,PE12-H3<48><33><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֱPE13-H1,PE14-H2,PE15-H3
// //<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģʽ
// //水平——PE10-H1,PE11-H2,PE12-H3垂直PE13-H1,PE14-H2,PE15-H3
// //设置引脚为输入模式
// gpio_mode_set(GPIOE, GPIO_MODE_INPUT, GPIO_PUPD_NONE, GPIO_PIN_10);
// gpio_mode_set(GPIOE, GPIO_MODE_INPUT, GPIO_PUPD_NONE, GPIO_PIN_11);
// gpio_mode_set(GPIOE, GPIO_MODE_INPUT, GPIO_PUPD_NONE, GPIO_PIN_12);
@ -590,7 +591,7 @@ static void hall_io_init(void)
}
/*!
\brief none <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ų<EFBFBD>ʼ<EFBFBD><EFBFBD>
\brief none
\param[in] none
\param[out] none
\retval none
@ -614,9 +615,9 @@ void bridge_io_init(void)
gpio_mode_set(GPIOD, GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, GPIO_PIN_15);
gpio_output_options_set(GPIOD, GPIO_OTYPE_PP, GPIO_OSPEED_50MHZ, GPIO_PIN_10| GPIO_PIN_11| GPIO_PIN_15);
//GD<EFBFBD>İ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Խ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ġ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ŵ<EFBFBD>Դ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ţ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ķϵ縴λ<EFBFBD><EFBFBD>
gpio_mode_set(GPIOE, GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, GPIO_PIN_0);//ˮƽ<EFBFBD><EFBFBD>Դ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
gpio_mode_set(GPIOE, GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, GPIO_PIN_1);//<EFBFBD><EFBFBD>ֱ<EFBFBD><EFBFBD>Դ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
//GD改版后驱动策略进行了修改————新增驱动桥电源控制引脚,便于驱动器的断电复位等
gpio_mode_set(GPIOE, GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, GPIO_PIN_0);//水平电源控制引脚
gpio_mode_set(GPIOE, GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, GPIO_PIN_1);//垂直电源控制引脚
gpio_output_options_set(GPIOE, GPIO_OTYPE_PP, GPIO_OSPEED_50MHZ, GPIO_PIN_0| GPIO_PIN_1);
H_EN1_OFF;

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project>
<fileVersion>3</fileVersion>
<fileVersion>4</fileVersion>
<configuration>
<name>Debug</name>
<toolchain>
@ -11,7 +11,7 @@
<name>C-SPY</name>
<archiveVersion>2</archiveVersion>
<data>
<version>32</version>
<version>33</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
@ -44,7 +44,7 @@
</option>
<option>
<name>MemFile</name>
<state>$TOOLKIT_DIR$\CONFIG\debugger\GigaDevice\GD32F450xE.ddf</state>
<state>$TOOLKIT_DIR$\config\debugger\GigaDevice\GD32F450xE.ddf</state>
</option>
<option>
<name>RunToEnable</name>
@ -88,7 +88,7 @@
</option>
<option>
<name>OCLastSavedByProductVersion</name>
<state>9.20.1.43525</state>
<state>9.40.2.67586</state>
</option>
<option>
<name>UseFlashLoader</name>
@ -112,7 +112,7 @@
</option>
<option>
<name>FlashLoadersV3</name>
<state>$TOOLKIT_DIR$\config\flashloader\GigaDevice\FlashGD32F4xxxE.board</state>
<state>$TOOLKIT_DIR$/config/flashloader/GigaDevice/FlashGD32F4xxxE.board</state>
</option>
<option>
<name>OCImagesSuppressCheck1</name>
@ -222,6 +222,38 @@
<name>OCTpiuBaseOption</name>
<state>1</state>
</option>
<option>
<name>OCOverrideSlave</name>
<state>0</state>
</option>
<option>
<name>OCOverrideSlavePath</name>
<state></state>
</option>
<option>
<name>C_32_64Device</name>
<state>1</state>
</option>
<option>
<name>AuthEnable</name>
<state>0</state>
</option>
<option>
<name>AuthSdmSelection</name>
<state>1</state>
</option>
<option>
<name>AuthSdmManifest</name>
<state></state>
</option>
<option>
<name>AuthSdmExplicitLib</name>
<state></state>
</option>
<option>
<name>AuthEnforce</name>
<state>0</state>
</option>
</data>
</settings>
<settings>
@ -457,6 +489,39 @@
</option>
</data>
</settings>
<settings>
<name>E2_ID</name>
<archiveVersion>2</archiveVersion>
<data>
<version>0</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
<name>E2PowerFromProbe</name>
<state>1</state>
</option>
<option>
<name>CE2UsbSerialNo</name>
<state></state>
</option>
<option>
<name>CE2IdCodeEditB</name>
<state>0xFFFF'FFFF'FFFF'FFFF'FFFF'FFFF'FFFF'FFFF</state>
</option>
<option>
<name>CE2LogFileCheck</name>
<state>0</state>
</option>
<option>
<name>CE2LogFileEditB</name>
<state>$PROJ_DIR$\cspycomm.log</state>
</option>
<option>
<name>OCDriverInfo</name>
<state>1</state>
</option>
</data>
</settings>
<settings>
<name>GDBSERVER_ID</name>
<archiveVersion>2</archiveVersion>
@ -1072,7 +1137,7 @@
<name>STLINK_ID</name>
<archiveVersion>2</archiveVersion>
<data>
<version>7</version>
<version>8</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
@ -1187,9 +1252,17 @@
</option>
<option>
<name>CCSTLinkProbeList</name>
<version>1</version>
<version>2</version>
<state>0</state>
</option>
<option>
<name>CCSTLinkTargetVccEnable</name>
<state>1</state>
</option>
<option>
<name>CCSTLinkTargetVoltage</name>
<state>###Uninitialized###</state>
</option>
</data>
</settings>
<settings>
@ -1417,7 +1490,7 @@
</option>
<option>
<name>CCXds100ResetList</name>
<version>0</version>
<version>1</version>
<state>0</state>
</option>
<option>
@ -1506,17 +1579,25 @@
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm9.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm9BE.ewplugin</file>
<file>$TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm9a.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin</file>
<loadFlag>0</loadFlag>
@ -1541,7 +1622,7 @@
<name>C-SPY</name>
<archiveVersion>2</archiveVersion>
<data>
<version>32</version>
<version>33</version>
<wantNonLocal>1</wantNonLocal>
<debug>0</debug>
<option>
@ -1752,6 +1833,38 @@
<name>OCTpiuBaseOption</name>
<state>1</state>
</option>
<option>
<name>OCOverrideSlave</name>
<state>0</state>
</option>
<option>
<name>OCOverrideSlavePath</name>
<state></state>
</option>
<option>
<name>C_32_64Device</name>
<state>1</state>
</option>
<option>
<name>AuthEnable</name>
<state>0</state>
</option>
<option>
<name>AuthSdmSelection</name>
<state>1</state>
</option>
<option>
<name>AuthSdmManifest</name>
<state></state>
</option>
<option>
<name>AuthSdmExplicitLib</name>
<state></state>
</option>
<option>
<name>AuthEnforce</name>
<state>0</state>
</option>
</data>
</settings>
<settings>
@ -1987,6 +2100,39 @@
</option>
</data>
</settings>
<settings>
<name>E2_ID</name>
<archiveVersion>2</archiveVersion>
<data>
<version>0</version>
<wantNonLocal>1</wantNonLocal>
<debug>0</debug>
<option>
<name>E2PowerFromProbe</name>
<state>1</state>
</option>
<option>
<name>CE2UsbSerialNo</name>
<state></state>
</option>
<option>
<name>CE2IdCodeEditB</name>
<state>0xFFFF'FFFF'FFFF'FFFF'FFFF'FFFF'FFFF'FFFF</state>
</option>
<option>
<name>CE2LogFileCheck</name>
<state>0</state>
</option>
<option>
<name>CE2LogFileEditB</name>
<state>$PROJ_DIR$\cspycomm.log</state>
</option>
<option>
<name>OCDriverInfo</name>
<state>1</state>
</option>
</data>
</settings>
<settings>
<name>GDBSERVER_ID</name>
<archiveVersion>2</archiveVersion>
@ -2602,7 +2748,7 @@
<name>STLINK_ID</name>
<archiveVersion>2</archiveVersion>
<data>
<version>7</version>
<version>8</version>
<wantNonLocal>1</wantNonLocal>
<debug>0</debug>
<option>
@ -2717,9 +2863,17 @@
</option>
<option>
<name>CCSTLinkProbeList</name>
<version>1</version>
<version>2</version>
<state>0</state>
</option>
<option>
<name>CCSTLinkTargetVccEnable</name>
<state>1</state>
</option>
<option>
<name>CCSTLinkTargetVoltage</name>
<state>###Uninitialized###</state>
</option>
</data>
</settings>
<settings>
@ -2947,7 +3101,7 @@
</option>
<option>
<name>CCXds100ResetList</name>
<version>0</version>
<version>1</version>
<state>0</state>
</option>
<option>
@ -3036,17 +3190,25 @@
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm9.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm9BE.ewplugin</file>
<file>$TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm9a.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin</file>
<loadFlag>0</loadFlag>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project>
<fileVersion>3</fileVersion>
<fileVersion>4</fileVersion>
<configuration>
<name>Debug</name>
<toolchain>
@ -11,7 +11,7 @@
<name>General</name>
<archiveVersion>3</archiveVersion>
<data>
<version>34</version>
<version>36</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
@ -62,7 +62,7 @@
</option>
<option>
<name>RTDescription</name>
<state>Use the normal configuration of the C/C++ runtime library. No locale interface, C locale, no file descriptor support, no multibytes in printf and scanf, and no hex floats in strtod.</state>
<state>A compact configuration of the C/C++14 runtime library. No locale interface, C locale, no file descriptor support, no multibytes in printf and scanf, and no hex floats in strtod.</state>
</option>
<option>
<name>OGProductVersion</name>
@ -70,7 +70,7 @@
</option>
<option>
<name>OGLastSavedByProductVersion</name>
<state>9.20.1.43525</state>
<state>9.40.2.67586</state>
</option>
<option>
<name>OGChipSelectEditMenu</name>
@ -98,7 +98,7 @@
</option>
<option>
<name>GBECoreSlave</name>
<version>31</version>
<version>33</version>
<state>39</state>
</option>
<option>
@ -115,7 +115,7 @@
</option>
<option>
<name>CoreVariant</name>
<version>31</version>
<version>33</version>
<state>39</state>
</option>
<option>
@ -138,7 +138,7 @@
</option>
<option>
<name>GFPUCoreSlave2</name>
<version>31</version>
<version>33</version>
<state>39</state>
</option>
<option>
@ -203,13 +203,26 @@
<name>BuildFilesPath</name>
<state>Debug</state>
</option>
<option>
<name>PointerAuthentication</name>
<state>0</state>
</option>
<option>
<name>FPU64</name>
<state>1</state>
</option>
<option>
<name>OG_32_64DeviceCoreSlave</name>
<version>33</version>
<state>39</state>
</option>
</data>
</settings>
<settings>
<name>ICCARM</name>
<archiveVersion>2</archiveVersion>
<data>
<version>37</version>
<version>38</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
@ -511,13 +524,21 @@
<name>CCStackProtection</name>
<state>0</state>
</option>
<option>
<name>CCPointerAutentiction</name>
<state>0</state>
</option>
<option>
<name>CCBranchTargetIdentification</name>
<state>0</state>
</option>
</data>
</settings>
<settings>
<name>AARM</name>
<archiveVersion>2</archiveVersion>
<data>
<version>11</version>
<version>12</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
@ -677,6 +698,10 @@
<name>PreInclude</name>
<state></state>
</option>
<option>
<name>A_32_64Device</name>
<state>1</state>
</option>
</data>
</settings>
<settings>
@ -719,19 +744,11 @@
<buildSequence>inputOutputBased</buildSequence>
</data>
</settings>
<settings>
<name>BUILDACTION</name>
<archiveVersion>1</archiveVersion>
<data>
<prebuild></prebuild>
<postbuild></postbuild>
</data>
</settings>
<settings>
<name>ILINK</name>
<archiveVersion>0</archiveVersion>
<data>
<version>26</version>
<version>27</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
@ -808,7 +825,7 @@
</option>
<option>
<name>IlinkIcfFile</name>
<state>I:\HY-2.0\HY2.0\trunk\iar9_2\4.0 LW21-01B\Hyt2\BSP\IAR\GD32F450xE.icf</state>
<state>D:\psx\Pan-Tilt\1.software\HY\4.0 LW21-01B\BSP\IAR\GD32F450xE_APP.icf</state>
</option>
<option>
<name>IlinkIcfFileSlave</name>
@ -1091,6 +1108,14 @@
<name>IlinkWrapperFile</name>
<state></state>
</option>
<option>
<name>IlinkProcessor</name>
<state>1</state>
</option>
<option>
<name>IlinkFpuProcessor</name>
<state>1</state>
</option>
</data>
</settings>
<settings>
@ -1114,6 +1139,11 @@
</option>
</data>
</settings>
<settings>
<name>BUILDACTION</name>
<archiveVersion>2</archiveVersion>
<data />
</settings>
</configuration>
<configuration>
<name>Release</name>
@ -1125,7 +1155,7 @@
<name>General</name>
<archiveVersion>3</archiveVersion>
<data>
<version>34</version>
<version>36</version>
<wantNonLocal>1</wantNonLocal>
<debug>0</debug>
<option>
@ -1184,7 +1214,7 @@
</option>
<option>
<name>OGLastSavedByProductVersion</name>
<state>9.20.1.43525</state>
<state>9.40.2.67586</state>
</option>
<option>
<name>OGChipSelectEditMenu</name>
@ -1212,7 +1242,7 @@
</option>
<option>
<name>GBECoreSlave</name>
<version>31</version>
<version>33</version>
<state>39</state>
</option>
<option>
@ -1229,7 +1259,7 @@
</option>
<option>
<name>CoreVariant</name>
<version>31</version>
<version>33</version>
<state>39</state>
</option>
<option>
@ -1252,7 +1282,7 @@
</option>
<option>
<name>GFPUCoreSlave2</name>
<version>31</version>
<version>33</version>
<state>39</state>
</option>
<option>
@ -1317,13 +1347,26 @@
<name>BuildFilesPath</name>
<state>Release</state>
</option>
<option>
<name>PointerAuthentication</name>
<state>0</state>
</option>
<option>
<name>FPU64</name>
<state>1</state>
</option>
<option>
<name>OG_32_64DeviceCoreSlave</name>
<version>33</version>
<state>39</state>
</option>
</data>
</settings>
<settings>
<name>ICCARM</name>
<archiveVersion>2</archiveVersion>
<data>
<version>37</version>
<version>38</version>
<wantNonLocal>1</wantNonLocal>
<debug>0</debug>
<option>
@ -1610,13 +1653,21 @@
<name>CCStackProtection</name>
<state>0</state>
</option>
<option>
<name>CCPointerAutentiction</name>
<state>0</state>
</option>
<option>
<name>CCBranchTargetIdentification</name>
<state>0</state>
</option>
</data>
</settings>
<settings>
<name>AARM</name>
<archiveVersion>2</archiveVersion>
<data>
<version>11</version>
<version>12</version>
<wantNonLocal>1</wantNonLocal>
<debug>0</debug>
<option>
@ -1776,6 +1827,10 @@
<name>PreInclude</name>
<state></state>
</option>
<option>
<name>A_32_64Device</name>
<state>1</state>
</option>
</data>
</settings>
<settings>
@ -1818,19 +1873,11 @@
<buildSequence>inputOutputBased</buildSequence>
</data>
</settings>
<settings>
<name>BUILDACTION</name>
<archiveVersion>1</archiveVersion>
<data>
<prebuild></prebuild>
<postbuild></postbuild>
</data>
</settings>
<settings>
<name>ILINK</name>
<archiveVersion>0</archiveVersion>
<data>
<version>26</version>
<version>27</version>
<wantNonLocal>1</wantNonLocal>
<debug>0</debug>
<option>
@ -2190,6 +2237,14 @@
<name>IlinkWrapperFile</name>
<state></state>
</option>
<option>
<name>IlinkProcessor</name>
<state>1</state>
</option>
<option>
<name>IlinkFpuProcessor</name>
<state>1</state>
</option>
</data>
</settings>
<settings>
@ -2213,6 +2268,11 @@
</option>
</data>
</settings>
<settings>
<name>BUILDACTION</name>
<archiveVersion>2</archiveVersion>
<data />
</settings>
</configuration>
<group>
<name>APP</name>
@ -2375,7 +2435,7 @@
<settings>
<name>ICCARM</name>
<data>
<version>37</version>
<version>38</version>
<wantNonLocal>0</wantNonLocal>
<debug>1</debug>
<option>
@ -2669,6 +2729,14 @@
<name>CCStackProtection</name>
<state>0</state>
</option>
<option>
<name>CCPointerAutentiction</name>
<state>0</state>
</option>
<option>
<name>CCBranchTargetIdentification</name>
<state>0</state>
</option>
</data>
</settings>
</configuration>
@ -2900,7 +2968,7 @@
<settings>
<name>ICCARM</name>
<data>
<version>37</version>
<version>38</version>
<wantNonLocal>0</wantNonLocal>
<debug>1</debug>
<option>
@ -3192,6 +3260,14 @@
<name>CCStackProtection</name>
<state>0</state>
</option>
<option>
<name>CCPointerAutentiction</name>
<state>0</state>
</option>
<option>
<name>CCBranchTargetIdentification</name>
<state>0</state>
</option>
</data>
</settings>
</configuration>

File diff suppressed because it is too large Load Diff