Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
WZ-EF01
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
WZ
WZ-EF01
Commits
6e7f705d
Commit
6e7f705d
authored
Mar 22, 2026
by
wangkai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:降低电机归零速度,改成1200微步/秒;去掉电机零点检测前面的判断条件
parent
ff645427
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
18 deletions
+21
-18
TYD5660.h
code/Sources/Device/inc/Stepper_Motors/TYD5660.h
+1
-1
Stepper_Motor.c
code/Sources/Device/src/Stepper_Motor.c
+17
-16
UDS_ISO14229_Services.c
code/Sources/Diagnostic/src/UDS_ISO14229_Services.c
+1
-1
main.c
code/Sources/System/src/main.c
+2
-0
No files found.
code/Sources/Device/inc/Stepper_Motors/TYD5660.h
View file @
6e7f705d
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
=============================================================================*/
=============================================================================*/
#define STEPPER_MOTOR_DIR_SWITCH_SPEED 120 //电机最大换向转速,低于此转速电机才可以切换旋转方向,单位:微步/秒
#define STEPPER_MOTOR_DIR_SWITCH_SPEED 120 //电机最大换向转速,低于此转速电机才可以切换旋转方向,单位:微步/秒
#define STEPPER_MOTOR_CAL_SPEED_MIN 560 //电机最小校准速度,校正模式时电机以不低于此速度旋转,单位:微步/秒
#define STEPPER_MOTOR_CAL_SPEED_MIN 560 //电机最小校准速度,校正模式时电机以不低于此速度旋转,单位:微步/秒
#define STEPPER_MOTOR_FULL_RST_SPEED
50
00 //电机大角度归零速度,单位:微步/秒
#define STEPPER_MOTOR_FULL_RST_SPEED
12
00 //电机大角度归零速度,单位:微步/秒
#define STEPPER_MOTOR_FINE_RST_SPEED 560 //电机小角度归零速度,单位:微步/秒
#define STEPPER_MOTOR_FINE_RST_SPEED 560 //电机小角度归零速度,单位:微步/秒
#define STEPPER_MOTOR_SHDN_RST_SPEED 1683 //电机断电归零速度,单位:微步/秒
#define STEPPER_MOTOR_SHDN_RST_SPEED 1683 //电机断电归零速度,单位:微步/秒
...
...
code/Sources/Device/src/Stepper_Motor.c
View file @
6e7f705d
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
******************************************************************************/
******************************************************************************/
#include "Stepper_Motor.h"
#include "Stepper_Motor.h"
#include "GPIO.h"
volatile
uint16_t
StepperMotor0CurStep
;
volatile
uint16_t
StepperMotor0CurStep
;
volatile
uint16_t
StepperMotor0DstStep
;
volatile
uint16_t
StepperMotor0DstStep
;
...
@@ -517,7 +518,7 @@ void Stepper_Motor_Reset(void)
...
@@ -517,7 +518,7 @@ void Stepper_Motor_Reset(void)
if
(
CurStep
==
0
)
if
(
CurStep
==
0
)
StepperMotorGlobalCtrl
.
Flag
&=
0x0E
;
StepperMotorGlobalCtrl
.
Flag
&=
0x0E
;
#ifdef STEPPER_MOTOR_0_ZERO_SW
//
#ifdef STEPPER_MOTOR_0_ZERO_SW
if
(
STEPPER_MOTOR_0_ZERO_SW
==
0
)
if
(
STEPPER_MOTOR_0_ZERO_SW
==
0
)
{
{
if
(
StepperMotor0
.
ZeroSw
==
0
)
if
(
StepperMotor0
.
ZeroSw
==
0
)
...
@@ -532,7 +533,7 @@ void Stepper_Motor_Reset(void)
...
@@ -532,7 +533,7 @@ void Stepper_Motor_Reset(void)
EnableInterrupts
;
EnableInterrupts
;
}
}
}
}
#endif
//
#endif
#endif
#endif
#if STEPPER_MOTOR_1_ENABLE
#if STEPPER_MOTOR_1_ENABLE
...
@@ -540,7 +541,7 @@ void Stepper_Motor_Reset(void)
...
@@ -540,7 +541,7 @@ void Stepper_Motor_Reset(void)
if
(
CurStep
==
0
)
if
(
CurStep
==
0
)
StepperMotorGlobalCtrl
.
Flag
&=
0x0D
;
StepperMotorGlobalCtrl
.
Flag
&=
0x0D
;
#ifdef STEPPER_MOTOR_1_ZERO_SW
//
#ifdef STEPPER_MOTOR_1_ZERO_SW
if
(
STEPPER_MOTOR_1_ZERO_SW
==
0
)
if
(
STEPPER_MOTOR_1_ZERO_SW
==
0
)
{
{
if
(
StepperMotor1
.
ZeroSw
==
0
)
if
(
StepperMotor1
.
ZeroSw
==
0
)
...
@@ -555,7 +556,7 @@ void Stepper_Motor_Reset(void)
...
@@ -555,7 +556,7 @@ void Stepper_Motor_Reset(void)
EnableInterrupts
;
EnableInterrupts
;
}
}
}
}
#endif
//
#endif
#endif
#endif
#if STEPPER_MOTOR_2_ENABLE
#if STEPPER_MOTOR_2_ENABLE
...
@@ -563,7 +564,7 @@ void Stepper_Motor_Reset(void)
...
@@ -563,7 +564,7 @@ void Stepper_Motor_Reset(void)
if
(
CurStep
==
0
)
if
(
CurStep
==
0
)
StepperMotorGlobalCtrl
.
Flag
&=
0x0B
;
StepperMotorGlobalCtrl
.
Flag
&=
0x0B
;
#ifdef STEPPER_MOTOR_2_ZERO_SW
//
#ifdef STEPPER_MOTOR_2_ZERO_SW
if
(
STEPPER_MOTOR_2_ZERO_SW
==
0
)
if
(
STEPPER_MOTOR_2_ZERO_SW
==
0
)
{
{
if
(
StepperMotor2
.
ZeroSw
==
0
)
if
(
StepperMotor2
.
ZeroSw
==
0
)
...
@@ -578,7 +579,7 @@ void Stepper_Motor_Reset(void)
...
@@ -578,7 +579,7 @@ void Stepper_Motor_Reset(void)
EnableInterrupts
;
EnableInterrupts
;
}
}
}
}
#endif
//
#endif
#endif
#endif
#if STEPPER_MOTOR_3_ENABLE
#if STEPPER_MOTOR_3_ENABLE
...
@@ -586,7 +587,7 @@ void Stepper_Motor_Reset(void)
...
@@ -586,7 +587,7 @@ void Stepper_Motor_Reset(void)
if
(
CurStep
==
0
)
if
(
CurStep
==
0
)
StepperMotorGlobalCtrl
.
Flag
&=
0x07
;
StepperMotorGlobalCtrl
.
Flag
&=
0x07
;
#ifdef STEPPER_MOTOR_3_ZERO_SW
//
#ifdef STEPPER_MOTOR_3_ZERO_SW
if
(
STEPPER_MOTOR_3_ZERO_SW
==
0
)
if
(
STEPPER_MOTOR_3_ZERO_SW
==
0
)
{
{
if
(
StepperMotor3
.
ZeroSw
==
0
)
if
(
StepperMotor3
.
ZeroSw
==
0
)
...
@@ -601,7 +602,7 @@ void Stepper_Motor_Reset(void)
...
@@ -601,7 +602,7 @@ void Stepper_Motor_Reset(void)
EnableInterrupts
;
EnableInterrupts
;
}
}
}
}
#endif
//
#endif
#endif
#endif
}
}
...
@@ -651,7 +652,7 @@ void Stepper_Motor_Speed_Control_Service(void)
...
@@ -651,7 +652,7 @@ void Stepper_Motor_Speed_Control_Service(void)
if
(
CurStep
==
0
)
if
(
CurStep
==
0
)
StepperMotorGlobalCtrl
.
Flag
&=
0x0E
;
StepperMotorGlobalCtrl
.
Flag
&=
0x0E
;
#ifdef STEPPER_MOTOR_0_ZERO_SW
//
#ifdef STEPPER_MOTOR_0_ZERO_SW
if
(
STEPPER_MOTOR_0_ZERO_SW
==
0
)
if
(
STEPPER_MOTOR_0_ZERO_SW
==
0
)
{
{
if
(
StepperMotor0
.
ZeroSw
==
0
)
if
(
StepperMotor0
.
ZeroSw
==
0
)
...
@@ -664,7 +665,7 @@ void Stepper_Motor_Speed_Control_Service(void)
...
@@ -664,7 +665,7 @@ void Stepper_Motor_Speed_Control_Service(void)
EnableInterrupts
;
EnableInterrupts
;
}
}
}
}
#endif
//
#endif
#endif
#endif
#if STEPPER_MOTOR_1_ENABLE
#if STEPPER_MOTOR_1_ENABLE
...
@@ -672,7 +673,7 @@ void Stepper_Motor_Speed_Control_Service(void)
...
@@ -672,7 +673,7 @@ void Stepper_Motor_Speed_Control_Service(void)
if
(
CurStep
==
0
)
if
(
CurStep
==
0
)
StepperMotorGlobalCtrl
.
Flag
&=
0x0D
;
StepperMotorGlobalCtrl
.
Flag
&=
0x0D
;
#ifdef STEPPER_MOTOR_1_ZERO_SW
//
#ifdef STEPPER_MOTOR_1_ZERO_SW
if
(
STEPPER_MOTOR_1_ZERO_SW
==
0
)
if
(
STEPPER_MOTOR_1_ZERO_SW
==
0
)
{
{
if
(
StepperMotor1
.
ZeroSw
==
0
)
if
(
StepperMotor1
.
ZeroSw
==
0
)
...
@@ -685,7 +686,7 @@ void Stepper_Motor_Speed_Control_Service(void)
...
@@ -685,7 +686,7 @@ void Stepper_Motor_Speed_Control_Service(void)
EnableInterrupts
;
EnableInterrupts
;
}
}
}
}
#endif
//
#endif
#endif
#endif
#if STEPPER_MOTOR_2_ENABLE
#if STEPPER_MOTOR_2_ENABLE
...
@@ -693,7 +694,7 @@ void Stepper_Motor_Speed_Control_Service(void)
...
@@ -693,7 +694,7 @@ void Stepper_Motor_Speed_Control_Service(void)
if
(
CurStep
==
0
)
if
(
CurStep
==
0
)
StepperMotorGlobalCtrl
.
Flag
&=
0x0B
;
StepperMotorGlobalCtrl
.
Flag
&=
0x0B
;
#ifdef STEPPER_MOTOR_2_ZERO_SW
//
#ifdef STEPPER_MOTOR_2_ZERO_SW
if
(
STEPPER_MOTOR_2_ZERO_SW
==
0
)
if
(
STEPPER_MOTOR_2_ZERO_SW
==
0
)
{
{
if
(
StepperMotor2
.
ZeroSw
==
0
)
if
(
StepperMotor2
.
ZeroSw
==
0
)
...
@@ -706,7 +707,7 @@ void Stepper_Motor_Speed_Control_Service(void)
...
@@ -706,7 +707,7 @@ void Stepper_Motor_Speed_Control_Service(void)
EnableInterrupts
;
EnableInterrupts
;
}
}
}
}
#endif
//
#endif
#endif
#endif
#if STEPPER_MOTOR_3_ENABLE
#if STEPPER_MOTOR_3_ENABLE
...
@@ -714,7 +715,7 @@ void Stepper_Motor_Speed_Control_Service(void)
...
@@ -714,7 +715,7 @@ void Stepper_Motor_Speed_Control_Service(void)
if
(
CurStep
==
0
)
if
(
CurStep
==
0
)
StepperMotorGlobalCtrl
.
Flag
&=
0x07
;
StepperMotorGlobalCtrl
.
Flag
&=
0x07
;
#ifdef STEPPER_MOTOR_3_ZERO_SW
//
#ifdef STEPPER_MOTOR_3_ZERO_SW
if
(
STEPPER_MOTOR_3_ZERO_SW
==
0
)
if
(
STEPPER_MOTOR_3_ZERO_SW
==
0
)
{
{
if
(
StepperMotor3
.
ZeroSw
==
0
)
if
(
StepperMotor3
.
ZeroSw
==
0
)
...
@@ -727,7 +728,7 @@ void Stepper_Motor_Speed_Control_Service(void)
...
@@ -727,7 +728,7 @@ void Stepper_Motor_Speed_Control_Service(void)
EnableInterrupts
;
EnableInterrupts
;
}
}
}
}
#endif
//
#endif
#endif
#endif
if
(
StepperMotorGlobalCtrl
.
Flag
==
0
)
if
(
StepperMotorGlobalCtrl
.
Flag
==
0
)
...
...
code/Sources/Diagnostic/src/UDS_ISO14229_Services.c
View file @
6e7f705d
...
@@ -1625,7 +1625,7 @@ void UDS_Service_22_Indication ( uint32_t A_TA_type, uint16_t A_Length, uint8_t
...
@@ -1625,7 +1625,7 @@ void UDS_Service_22_Indication ( uint32_t A_TA_type, uint16_t A_Length, uint8_t
UDS_ISO14229_Transfer
[
8
]
=
'0'
;
UDS_ISO14229_Transfer
[
8
]
=
'0'
;
UDS_ISO14229_Transfer
[
9
]
=
'.'
;
UDS_ISO14229_Transfer
[
9
]
=
'.'
;
UDS_ISO14229_Transfer
[
10
]
=
'1'
;
UDS_ISO14229_Transfer
[
10
]
=
'1'
;
UDS_ISO14229_Transfer
[
11
]
=
'
3
'
;
UDS_ISO14229_Transfer
[
11
]
=
'
6
'
;
UDS_Service_Response
(
0x22
,
POSITIVE_RSP
,
DIAG_ID_Tx
,
12
,
UDS_ISO14229_Transfer
);
UDS_Service_Response
(
0x22
,
POSITIVE_RSP
,
DIAG_ID_Tx
,
12
,
UDS_ISO14229_Transfer
);
break
;
break
;
case
0xF191
:
case
0xF191
:
...
...
code/Sources/System/src/main.c
View file @
6e7f705d
...
@@ -47,6 +47,8 @@
...
@@ -47,6 +47,8 @@
//20250618 增加唤醒和ingoff->ignon排气制动指示灯控制信号清零
//20250618 增加唤醒和ingoff->ignon排气制动指示灯控制信号清零
//V00.13
//V00.13
//20250621 升级软件版本号
//20250621 升级软件版本号
//V00.16 临时版本
//20260322 降低电机归零速度,改成1200微步/秒;去掉电机零点检测前面的判断条件
#include "main.h"
#include "main.h"
#include "fuelconfig.h"
#include "fuelconfig.h"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment