Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
Test_Bench
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
时昊
Test_Bench
Commits
8d11c196
Commit
8d11c196
authored
Oct 18, 2023
by
时昊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加PWM功能
parent
c349acd4
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
179 additions
and
155 deletions
+179
-155
COM_CAN.h
C281_CHECK_Prj_suihua/source/Appliciation/COM_CAN.h
+2
-0
Check_Ctrl.c
C281_CHECK_Prj_suihua/source/Appliciation/Check_Ctrl.c
+5
-5
RTE_GPIO.c
C281_CHECK_Prj_suihua/source/Appliciation/RTE_GPIO.c
+16
-0
Signal_Remap.c
C281_CHECK_Prj_suihua/source/Appliciation/Signal_Remap.c
+146
-146
Signal_Remap.h
C281_CHECK_Prj_suihua/source/Appliciation/Signal_Remap.h
+2
-2
init.c
C281_CHECK_Prj_suihua/source/System/init.c
+8
-2
No files found.
C281_CHECK_Prj_suihua/source/Appliciation/COM_CAN.h
View file @
8d11c196
...
...
@@ -5,6 +5,8 @@ void COM_CAN_Init(void);
void
COM_RX_Process
(
void
);
void
Msg_Load_Init
(
void
);
void
Execute_Specify_Step
(
unsigned
int
step
);
void
Execute_Specify_Step_IO
(
unsigned
int
step
);
void
Execute_Specify_Step_PWM
(
unsigned
int
step
);
unsigned
int
Get_Total_CheckStep
(
void
);
void
COM_TX_Process
(
void
);
...
...
C281_CHECK_Prj_suihua/source/Appliciation/Check_Ctrl.c
View file @
8d11c196
...
...
@@ -1731,11 +1731,6 @@ void Total_Check(void)
HW_TFT_CHECK
(
0
);
HW_LCD_CHECK
(
0
);
HW_BACKLIGHT_CHECK
(
0
);
//PWM_OUT_12 = 1;
PWM_Channel_Set_Freq
(
10
,
30000
);
//e
PWM_Channel_Set_Duty
(
10
,
500
);
//e
PWM_Channel_Set_Freq
(
14
,
10000
);
//v
PWM_Channel_Set_Duty
(
14
,
800
);
//v
Function_Check_Ctrl
(
1
);
HW_Static_Current_Check
(
0
);
CAN_Msg_Tx_Enable
=
1u
;
...
...
@@ -2040,6 +2035,11 @@ void Function_Check_Ctrl(uint32_t cmd)
if
(
MENU_BACK
!=
MENU_CHECK_STEP
)
{
Execute_Specify_Step
((
MENU_CHECK_STEP
));
//Execute_Specify_Step_IO(MENU_CHECK_STEP);
if
(
MENU_CHECK_STEP
>=
1
)
{
//Execute_Specify_Step_PWM(MENU_CHECK_STEP - 1);
}
MENU_BACK
=
MENU_CHECK_STEP
;
}
}
...
...
C281_CHECK_Prj_suihua/source/Appliciation/RTE_GPIO.c
View file @
8d11c196
...
...
@@ -253,4 +253,20 @@ void RTE_GPIO_Init(void)
gpio_temp
.
enGPIOAltFun
=
GPIO_ALTER_FUN_3
;
gpio_temp
.
enGPIOCharacter
=
GPIO_Char_Schmitt1
;
GPIO_Config
(
&
gpio_temp
);
//车速
gpio_temp
.
enGPIOPort
=
GPIO_PORT_GROUP_10
;
gpio_temp
.
enGPIOPIN
=
GPIO_PIN_11
;
gpio_temp
.
enGPIOMode
=
GPIO_MODE_ALTER_SOFTWARE
;
gpio_temp
.
enGPIODir
=
GPIO_DIR_OUT
;
gpio_temp
.
enGPIOAltFun
=
GPIO_ALTER_FUN_4
;
gpio_temp
.
enGPIOCharacter
=
GPIO_Char_Schmitt1
;
GPIO_Config
(
&
gpio_temp
);
//pin85
gpio_temp
.
enGPIOPort
=
GPIO_PORT_GROUP_10
;
gpio_temp
.
enGPIOPIN
=
GPIO_PIN_12
;
gpio_temp
.
enGPIOMode
=
GPIO_MODE_ALTER_SOFTWARE
;
gpio_temp
.
enGPIODir
=
GPIO_DIR_OUT
;
gpio_temp
.
enGPIOAltFun
=
GPIO_ALTER_FUN_4
;
gpio_temp
.
enGPIOCharacter
=
GPIO_Char_Schmitt1
;
GPIO_Config
(
&
gpio_temp
);
//pin86
}
C281_CHECK_Prj_suihua/source/Appliciation/Signal_Remap.c
View file @
8d11c196
This diff is collapsed.
Click to expand it.
C281_CHECK_Prj_suihua/source/Appliciation/Signal_Remap.h
View file @
8d11c196
...
...
@@ -17,8 +17,8 @@ extern const st_Port_IO F1KM_16843_Port_IO_P [20] ;
typedef
struct
{
void
(
*
PWM_Output
)(
u
nsigned
char
Duty
,
unsigned
in
t
Freq
);
void
(
*
PWM_Output
)(
u
int32_t
Duty
,
uint32_
t
Freq
);
}
st_Port_PWM
;
extern
const
st_Port_PWM
F1KM_16843_Port_PWM_Out
[
16
]
;
extern
const
st_Port_PWM
F1KM_16843_Port_PWM_Out
[
8
]
;
#endif
C281_CHECK_Prj_suihua/source/System/init.c
View file @
8d11c196
...
...
@@ -80,8 +80,14 @@ void Sys_Startup_Init(void)
Display_Title_Info
(
);
Key_Init
(
);
PWN_Init
();
PWM_Channel_Init
(
10
,
0
,
0
,
0
,
0
);
PWM_Channel_Init
(
14
,
0
,
0
,
0
,
0
);
PWM_Channel_Init
(
1
,
0
,
0
,
0
,
0
);
PWM_Channel_Init
(
3
,
0
,
0
,
0
,
0
);
PWM_Channel_Init
(
5
,
0
,
0
,
0
,
0
);
PWM_Channel_Init
(
7
,
0
,
0
,
0
,
0
);
PWM_Channel_Init
(
9
,
0
,
0
,
0
,
0
);
PWM_Channel_Init
(
11
,
0
,
0
,
0
,
0
);
PWM_Channel_Init
(
13
,
0
,
0
,
0
,
0
);
PWM_Channel_Init
(
15
,
0
,
0
,
0
,
0
);
}
/***********************************************************************
...
...
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