Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
TianYing_ty100
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
TY
TianYing_ty100
Commits
8887ee3a
Commit
8887ee3a
authored
May 08, 2024
by
李俭双
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:增加电压数据处理
parent
be2b5525
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
41 additions
and
4 deletions
+41
-4
TianYing200.BAT
Firmware/Project/Cmsemicon/BAT32A239/MDK_ARM/TianYing200.BAT
+0
-3
Data_Voltage.c
Firmware/Source/Application/Data_Voltage/Data_Voltage.c
+33
-1
Data_Voltage.h
Firmware/Source/Application/Data_Voltage/Data_Voltage.h
+4
-0
PowerManag_user.c
Firmware/Source/Component/PowerManagement/PowerManag_user.c
+3
-0
Sys_Task_List.c
Firmware/Source/System/Sys_Task_List.c
+1
-0
No files found.
Firmware/Project/Cmsemicon/BAT32A239/MDK_ARM/TianYing200.BAT
View file @
8887ee3a
SET PATH=C:\Keil_v5\ARM\ARMCC\Bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Users\tyw05\AppData\Local\Microsoft\WindowsApps;
SET ARMCC5_ASMOPT=--diag_suppress=9931
SET ARMCC5_CCOPT=--diag_suppress=9931
SET ARMCC5_LINKOPT=--diag_suppress=9931
SET CPU_TYPE=BAT32G139GK64FB
SET CPU_VENDOR=Cmsemicon
SET UV2_TARGET=TianYing200
...
...
Firmware/Source/Application/Data_Voltage/Data_Voltage.c
View file @
8887ee3a
#include "Application.h"
#include "Data_Voltage\Data_Voltage.h"
\ No newline at end of file
#include "Data_Voltage\Data_Voltage.h"
uint8_t
voltage_value
=
0
;
void
Data_Voltage_Init
(
void
)
{
voltage_value
=
0
;
}
void
Data_Voltage_Processing_Service
(
void
)
{
if
(
Common_Get_IG_Sts
()
==
COMMON_POWER_ON
)
{
if
(
CAN_MSG_Status
(
&
CAN_CH0_CanMsgOp
,
CAN_CH0_ID_CAN_0x401_Msg_Count
)
==
CAN_SIG_LOST
)
{
voltage_value
=
0
;
}
else
{
voltage_value
=
Get_CAN_CH0_ID_401_Sig_ECU_Battery_Voltage
();
}
}
else
{
voltage_value
=
0
;
}
}
//10倍
uint8_t
Get_Battery_Voltage
(
void
)
{
return
voltage_value
;
}
\ No newline at end of file
Firmware/Source/Application/Data_Voltage/Data_Voltage.h
View file @
8887ee3a
...
...
@@ -2,4 +2,8 @@
#define _DATA_VOLTAGE_H_
#include "common.h"
void
Data_Voltage_Init
(
void
);
void
Data_Voltage_Processing_Service
(
void
);
uint8_t
Get_Battery_Voltage
(
void
);
#endif
Firmware/Source/Component/PowerManagement/PowerManag_user.c
View file @
8887ee3a
...
...
@@ -62,6 +62,7 @@ static void Power_KL30_Init(void)
LED_Driver_Init_Example
();
//注意顺序2
Data_User_Mileage_KL30Init
();
Fuel_KL30_Init
();
Data_Voltage_Init
();
TimerM_PWM_counter_Output_Init
(
TIMERM_COUNTER0
,
400
,
64000000
);
TimerM_PWM_counter_Output_Init
(
TIMERM_COUNTER1
,
400
,
64000000
);
// TimerM_PWM_counter_Output_Init(TIMERM_COUNTER0, 400);
...
...
@@ -105,6 +106,7 @@ static void Power_Wakeup_Init(void)
//Light_Sensor_Init_Example();//注意顺序1
LED_Driver_Init_Example
();
//注意顺序2
Fuel_KL30_Init
();
Data_Voltage_Init
();
TimerM_PWM_counter_Output_Init
(
TIMERM_COUNTER0
,
400
,
64000000
);
TimerM_PWM_counter_Output_Init
(
TIMERM_COUNTER1
,
400
,
64000000
);
// TimerM_PWM_counter_Output_Init(TIMERM_COUNTER0, 400);
...
...
@@ -141,6 +143,7 @@ static void Power_IG_ON_Init(void)
Telltales_KL15_Init
();
Telltales_UserInit
();
Fuel_KL15_Init
();
Data_Voltage_Init
();
Data_Coolant_Temp_KL15_Init
();
}
...
...
Firmware/Source/System/Sys_Task_List.c
View file @
8887ee3a
...
...
@@ -79,6 +79,7 @@ void Sys_100ms_Tasks(void)
Fuel_Cal_Sevice
(
100u
);
BackLight_Process
();
Services_Mileage_Callback
();
Data_Voltage_Processing_Service
();
S3_ServerCNTT
();
if
(
u8LEDDriverCheckCount
>=
10U
)
...
...
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