Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
haoJin750TFT
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
时昊
haoJin750TFT
Commits
6faa30f1
Commit
6faa30f1
authored
Nov 26, 2024
by
张金硕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:30初始化各函数所耗时间
parent
4173f025
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
65 additions
and
27 deletions
+65
-27
PowerManag_user.c
Firmware/Source/Component/PowerManagement/PowerManag_user.c
+36
-27
RTE_Tick_Timer.h
...evice/Cmsemicon/BAT32A279/RTE/Tick_Timer/RTE_Tick_Timer.h
+13
-0
RTE_Tick_Timer_BAT32A279.c
...micon/BAT32A279/RTE/Tick_Timer/RTE_Tick_Timer_BAT32A279.c
+2
-0
Sys_Task_List.c
Firmware/Source/System/Sys_Task_List.c
+14
-0
No files found.
Firmware/Source/Component/PowerManagement/PowerManag_user.c
View file @
6faa30f1
...
@@ -35,47 +35,56 @@ void PwrMemInit(void)
...
@@ -35,47 +35,56 @@ void PwrMemInit(void)
PowerMemInit
(
&
g_stPwrTasks
);
PowerMemInit
(
&
g_stPwrTasks
);
}
}
static
void
Power_KL30_Init
(
void
)
static
void
Power_KL30_Init
(
void
)
//588.6ms
{
{
// ClearODO_Flag = 0;
// ClearODO_Flag = 0;
RTE_GPIO_Init
();
RTE_GPIO_Init
();
//50us
Gpio_Init
(
Gpio_KL30_Init
);
Gpio_Init
(
Gpio_KL30_Init
);
//650us
UART_Channel_Config_st_t
loc_config
;
UART_Channel_Config_st_t
loc_config
;
eeprom_StoreInfo_Init
();
eeprom_StoreInfo_Init
();
//50us
loc_config
.
u32UARTChEn
=
1U
;
loc_config
.
u32UARTChEn
=
1U
;
loc_config
.
u32UARTbps
=
115200U
;
loc_config
.
u32UARTbps
=
115200U
;
loc_config
.
pfnUARTConfirmCallBack
=
NULL
;
loc_config
.
pfnUARTConfirmCallBack
=
NULL
;
loc_config
.
pfnUARTReadMsgCallBack
=
Amt630hUartRecvData
;
loc_config
.
pfnUARTReadMsgCallBack
=
Amt630hUartRecvData
;
UART_DeInit
(
UART2
);
UART_DeInit
(
UART2
);
//50us
RTE_UART_Init
(
UART_CH2
,
&
loc_config
);
RTE_UART_Init
(
UART_CH2
,
&
loc_config
);
//68.35ms
Common_DataInit
();
Common_DataInit
();
//50us
Analog_Signal_Conv_Init
();
Analog_Signal_Conv_Init
();
//150us
Sys_KL30_Init
();
Sys_KL30_Init
();
//275.55ms
Data_Vehicle_Speed_KL30_Wakeup_Init
();
Data_Vehicle_Speed_KL30_Wakeup_Init
();
//50us
Data_Engine_Speed_KL30_Wakeup_Init
();
Data_Engine_Speed_KL30_Wakeup_Init
();
//50us
LINE_IN_Init
();
LINE_IN_Init
();
//50us+
Key_KL30_Init_EXample
();
Key_KL30_Init_EXample
();
//50us
Data_User_Mileage_KL30Init
();
Data_User_Mileage_KL30Init
();
//145.7ms
Fuel_KL30_Init
();
Fuel_KL30_Init
();
//50us
Oil_Pressure_KL30_Init
();
Oil_Pressure_KL30_Init
();
//50us
BackLight_30_Init
();
BackLight_30_Init
();
//50us+
Amt630hInit
();
Amt630hInit
();
//97.9ms
Telltales_Init
();
Telltales_Init
();
//50us+
g_stRTCInformation
.
u8RTCSecond
=
0
;
g_stRTCInformation
.
u8RTCSecond
=
0
;
g_stRTCInformation
.
u8RTCMinute
=
0
;
g_stRTCInformation
.
u8RTCMinute
=
0
;
g_stRTCInformation
.
u8RTCHour
=
0
;
g_stRTCInformation
.
u8RTCHour
=
0
;
g_stRTCInformation
.
u8RTCDayOfMonth
=
1
;
g_stRTCInformation
.
u8RTCDayOfMonth
=
1
;
g_stRTCInformation
.
u8RTCMonth
=
1
;
g_stRTCInformation
.
u8RTCMonth
=
1
;
g_stRTCInformation
.
u8RTCYear
=
20
;
g_stRTCInformation
.
u8RTCYear
=
20
;
RTE_RTC_Init
(
g_stRTCInformation
);
RTE_RTC_Init
(
g_stRTCInformation
);
//100us
Menu_User_Init
();
Menu_User_Init
();
//100us
UDS_Startup_Init
();
UDS_Startup_Init
();
//50us
Can_Init
();
Can_Init
();
//300us
Protocol_KL30_Wakeup_Init
();
Protocol_KL30_Wakeup_Init
();
//50us
RTE_DEEPSLEEP_GPIO_Interrupt_Enable
(
KL15_AD_IN
,
Trigger_Rising
);
FaultCode_Init
();
RTE_DEEPSLEEP_GPIO_Interrupt_Enable
(
KL15_AD_IN
,
Trigger_Rising
);
//50us+
TEMP_KL30_Init
();
FaultCode_Init
();
//50us
TEMP_KL30_Init
();
//50us
// g_u32ISRtime.g_u32Starttime = g_u32ISRtime.g_u32Ntime;
// g_u32ISRtime.g_u8IAsrtimesta = SysTick->VAL;
// g_u32ISRtime.g_u32Endtime = g_u32ISRtime.g_u32Ntime;
// g_u32ISRtime.g_u8IAsrtimeend = SysTick->VAL;
}
}
static
void
Power_Wakeup_Init
(
void
)
static
void
Power_Wakeup_Init
(
void
)
...
...
Firmware/Source/Device/Cmsemicon/BAT32A279/RTE/Tick_Timer/RTE_Tick_Timer.h
View file @
6faa30f1
...
@@ -3,10 +3,23 @@
...
@@ -3,10 +3,23 @@
#ifndef RTE_TICK_TIMER_H__
#ifndef RTE_TICK_TIMER_H__
#define RTE_TICK_TIMER_H__
#define RTE_TICK_TIMER_H__
typedef
struct
__attribute__
((
aligned
(
4
)))
{
uint32_t
g_u32Starttime
;
uint32_t
g_u32Endtime
;
uint32_t
g_u32Ntime
;
uint8_t
g_u8IAsrtimesta
;
uint8_t
g_u8IAsrtimeend
;
}
g_TestISRtime
;
/* Tick timer interrupt call back function */
/* Tick timer interrupt call back function */
typedef
void
(
*
RTE_Tick_Timer_Call_Back_ptr_t
)(
void
);
typedef
void
(
*
RTE_Tick_Timer_Call_Back_ptr_t
)(
void
);
extern
void
RTE_Tick_Timer_Start
(
uint32_t
u32Interval
,
RTE_Tick_Timer_Call_Back_ptr_t
pfnCallBack
);
extern
void
RTE_Tick_Timer_Start
(
uint32_t
u32Interval
,
RTE_Tick_Timer_Call_Back_ptr_t
pfnCallBack
);
extern
void
RTE_Tick_Timer_Stop
(
void
);
extern
void
RTE_Tick_Timer_Stop
(
void
);
extern
void
RTE_SysTick_Handler
(
void
);
extern
void
RTE_SysTick_Handler
(
void
);
extern
g_TestISRtime
g_u32ISRtime
;
#endif
/* RTE_TICK_TIMER_H__ */
#endif
/* RTE_TICK_TIMER_H__ */
Firmware/Source/Device/Cmsemicon/BAT32A279/RTE/Tick_Timer/RTE_Tick_Timer_BAT32A279.c
View file @
6faa30f1
...
@@ -6,6 +6,8 @@
...
@@ -6,6 +6,8 @@
#define RTE_TICK_TIMER_CLK_SRC_FREQ (64000000UL)
#define RTE_TICK_TIMER_CLK_SRC_FREQ (64000000UL)
#define RTE_SysTick_LOAD_RELOAD_Msk 0xFFFFFFUL
#define RTE_SysTick_LOAD_RELOAD_Msk 0xFFFFFFUL
g_TestISRtime
g_u32ISRtime
;
RTE_Tick_Timer_Call_Back_ptr_t
g_pfnRTETickTimerCallBackFunc
=
NULL
;
RTE_Tick_Timer_Call_Back_ptr_t
g_pfnRTETickTimerCallBackFunc
=
NULL
;
uint32_t
u8Value_us
=
0
;
uint32_t
u8Value_us
=
0
;
...
...
Firmware/Source/System/Sys_Task_List.c
View file @
6faa30f1
...
@@ -90,8 +90,10 @@ void Sys_100ms_Tasks(void)
...
@@ -90,8 +90,10 @@ void Sys_100ms_Tasks(void)
}
}
static
uint16_t
task_2ms
=
0u
;
static
uint16_t
task_2ms
=
0u
;
static
uint16_t
task_100ms
=
0u
;
static
uint16_t
task_100ms
=
0u
;
// uint8_t g_u8GPIOTurnOver = 0U;
void
Sys_Exact_50us_Tasks
(
void
)
void
Sys_Exact_50us_Tasks
(
void
)
{
{
// g_u32ISRtime.g_u32Ntime ++;
static
uint32_t
task_1ms
=
0u
;
static
uint32_t
task_1ms
=
0u
;
GenDelay_Tick
();
GenDelay_Tick
();
////DoCAN_Timer_Update(50u);
////DoCAN_Timer_Update(50u);
...
@@ -114,4 +116,16 @@ void Sys_Exact_50us_Tasks(void)
...
@@ -114,4 +116,16 @@ void Sys_Exact_50us_Tasks(void)
task_100ms
=
0U
;
task_100ms
=
0U
;
Data_Mileage_ISR
();
Data_Mileage_ISR
();
}
}
// if(g_u8GPIOTurnOver)
// {
// PORT->PM13 &= ~(1<<0);
// PORT->PSET13 = (1<<0);
// g_u8GPIOTurnOver = 0U;
// }
// else
// {
// PORT->PM13 &= ~(1<<0);
// PORT->PCLR13 = (1<<0);
// g_u8GPIOTurnOver = 1U;
// }
}
}
\ No newline at end of file
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