下你所需,载你所想!
汇集开发技术源码资料

电动车无刷电机驱动

:5.131MB :1 :2022-10-11 14:33:10

部分简介

电动车无刷电机驱动如果开发者对于本文件有需要的可以参考。
电动车无刷电机驱动
// 刹车保护临时标志 上电有刹车
u8 hBrakeHardFlag = 0, hBrakeStartFlag = 0;
static u8 hBrakeHardIndex = 0,hBrakeStartIndex = 0;
u16 wGlobal_Flags = 0; //错误故障
// 故障显示单次结束标志 故障显示计数 故障显示计数参考 故障LED交替闪烁计时
static u8 ErrTimeFlag = 0, ErrPrevState = 0, ErrPrevIndex = 0, hErrPeriodTime = 0;
static u16 GlobalGetExteSet = 0, GlobalHardSet = 0;
static u8 GlobalHardIndex = 0;
static u8 hTimebase_2_5ms = 0; //
static u16 HelpLevelIndex[2]; //助力低电平时间保存
// 助力电平计数器计时 助力加速度控制
static u16 HelpLevelTime = 0, HelpBoostAcce = 0;
// 助力电平状态保存 助力加速标志 有效的助力个数 助力有效置起标志
static u8 HelpLevelSave = 0, HelpAccelSign = 0, HelpEffNumber = 0, HelpUsefuFlag = 0;
#if (CRUISEMODE!=NOCRUISE)
static u8 CruiseSetupFlag = 0; //巡航置起标志
static u16 GlobalCruiseSet = 0; //巡航保存的手把电压
#if ((CRUISEMODE==AUTOMCRUISE)||(CRUISEMODE==CHOOSCRUISE))
static u16 CruiseMaticTime = 0; //自动巡航启动计时
#endif
#if ((CRUISEMODE==ATTHECRUISE)&&(defined THREESTATES))
static u8 KAuxsFalgSet = 0;
#endif
#if ((CRUISEMODE==ATTHECRUISE)||(CRUISEMODE==CHOOSCRUISE))
static u16 CruiseManuaTime = 0; //手动巡航消抖计时
static u8 CruiseDisappear = 0; //手动巡航消抖标志
#endif
void MC_SetupSpeedCruise(void);
#endif
static u8 XSForMarkFlag = 0, XSForMarkIndex = 0;
#if (TYPESPEEDMODE==BUTTON3SHIFT)
// 三速速度级别 三速按钮消抖
static u8 Button3SpeedTurn = 0, Button3SpeedPres = 0;
// 三速按钮消抖计时 三速速度限制
static u16 Button3SpeedTime = 0;
#elif (TYPESPEEDMODE!=NOTSHIFT)
static u8 Dialle3SpeedState=0, Dialle3SpeedSkey=0, Dialle3SpeedWhich=0;
static u8 Dialle3SpeedFlag=0, Dialle3SpeedTime=0;
#endif
static u16 TorqreSpeedLimit = NORMAL_SPEED;
#if ((defined EABSBRAKE)||(defined LOCKMOTOR))
// EABS处理计时器 EABS退出计时器
static u8 E_ABSPerTime = 0, E_ABSPerCont = 0;
// EABS执行步骤
u8 E_ABSCanFlag = 0;
// EABS刹车硬度给定
u16 E_ABSPWMDuty = 0;
#endif
#ifdef LOCKMOTOR
// 锁电机置起标志 锁电机置起准备 电机推动方向
u8 LocktheMotoFlag = 0, LocktheMotoWait = 0, LocktheMotoTurn = 0;
// 锁电机端口消抖
static u8 LocktheMotoTime = 0;
// 锁电机方向计数 锁电机方向保存
static s8 LocktheMotoTest = 0, LocktheMotoTemp = 0;
// 锁电机转矩给定
static u16 LocktheMotoDuty = 0;
void MC_TestLockMotorFault(void);
#endif
#ifdef RECESPEEDLIMIT
u8 StealthSpeedLimit = 0;
#if (TYPESPEEDMODE==NOTSHIFT)
static u8 TemporaryMaxSpeed = 0;
#endif
#endif
#ifdef SINGLELCD
static u8 bSendTab[12];
static u8 bSendTime=0, bSendWait=0, bPassWordH=0, bPassWordL=0, bPassWord=0;
static u8 bSendBit=0, bStatBit=0, bSendByte=0, bTempBit=0, bTempByte=0;
static u16 TimeBit = 0;
#endif

电动车无刷电机驱动

热门推荐

相关文章