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
a4e6006a
Commit
a4e6006a
authored
Aug 21, 2024
by
郑萍
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://tyw-server.synology.me:12345/shihao/haojin750tft
into zhengping
parents
b4668b50
98da5d06
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
128 additions
and
80 deletions
+128
-80
HaoJin750TFT.uvprojx
.../Project/Cmsemicon/BAT32A279/MDK_ARM/HaoJin750TFT.uvprojx
+6
-1
BackLight.c
Firmware/Source/Application/BackLight.c
+54
-49
BackLight.h
Firmware/Source/Application/BackLight.h
+1
-1
CommonInterface.c
Firmware/Source/Application/CommonInterface.c
+2
-1
AMT630H_Datas.c
Firmware/Source/Component/AMT630H/AMT630H_Datas.c
+19
-19
AMT630H_Datas.h
Firmware/Source/Component/AMT630H/AMT630H_Datas.h
+2
-1
Components.h
Firmware/Source/Component/Components.h
+1
-0
Menu_Interface.c
Firmware/Source/Component/Menu/Menu_Interface.c
+5
-0
PowerManag_user.c
Firmware/Source/Component/PowerManagement/PowerManag_user.c
+16
-6
uart.c
...urce/Device/Cmsemicon/BAT32A279/Library/Driver/src/uart.c
+1
-0
RTE_CLOCK_Select.h
...e/Cmsemicon/BAT32A279/RTE/CLOCK_Select/RTE_CLOCK_Select.h
+1
-0
RTE_CLOCK_Select_BAT32A279.c
...n/BAT32A279/RTE/CLOCK_Select/RTE_CLOCK_Select_BAT32A279.c
+19
-2
Sys_Task_List.c
Firmware/Source/System/Sys_Task_List.c
+1
-0
No files found.
Firmware/Project/Cmsemicon/BAT32A279/MDK_ARM/HaoJin750TFT.uvprojx
View file @
a4e6006a
...
...
@@ -275,7 +275,7 @@
</OCR_RVCT3>
<OCR_RVCT4>
<Type>
1
</Type>
<StartAddress>
0x0
</StartAddress>
<StartAddress>
0x
c40
0
</StartAddress>
<Size>
0x73c00
</Size>
</OCR_RVCT4>
<OCR_RVCT5>
...
...
@@ -1018,6 +1018,11 @@
<FileType>
5
</FileType>
<FilePath>
..\..\..\..\Source\Component\System_Monitor\System_Monitor_User.h
</FilePath>
</File>
<File>
<FileName>
System_Monitor.lib
</FileName>
<FileType>
4
</FileType>
<FilePath>
..\..\..\..\Source\Component\System_Monitor\System_Monitor.lib
</FilePath>
</File>
</Files>
</Group>
<Group>
...
...
Firmware/Source/Application/BackLight.c
View file @
a4e6006a
#include "Backlight.h"
#include "Components.h"
#define BACK_LIGHT_Val_1 100
#define BACK_LIGHT_Val_2 300
#define BACK_LIGHT_Val_3 500
#define BACK_LIGHT_Val_4 700
#define BACK_LIGHT_Val_5 900
typedef
void
(
*
SetPwm
)(
Light_uint16_t
Pwm
);
typedef
Light_uint8_t
(
*
SetPwmEnable
)(
void
);
typedef
Light_uint8_t
(
*
SetPwmLevel
)(
void
);
typedef
Light_uint16_t
(
*
NtcRes
)(
void
);
typedef
struct
{
SetPwm
SetPwmCbk
;
/* 设置PWM回调函数 */
SetPwmEnable
SetPwmEnCbk
;
/* 设置PWM使能回调函数 */
SetPwmLevel
SetPwmLevelCbk
;
/* 背光等级回调函数 */
NtcRes
NtcResCbk
;
/* 获取电阻值回调函数 */
}
BackLightExtPara
;
typedef
struct
{
SetPwm
SetPwmCbk
;
/* 设置PWM回调函数 */
SetPwmEnable
SetPwmEnCbk
;
/* 设置PWM使能回调函数 */
SetPwmLevel
SetPwmLevelCbk
;
/* 背光等级回调函数 */
NtcRes
NtcResCbk
;
Light_uint8_t
BacklightEn
;
/* 背光使能 */
Light_uint16_t
BacklightPwm
;
/* 背光PWM */
Light_uint16_t
BacklightLevel
;
/* 背光等级 */
}
_Backlight_Op
;
_Backlight_Op
Backlight_Operate
;
#define BACK_LIGHT_Val_1 (( 100 * Backlight_Operate.BacklightPwm ) / 100 )
#define BACK_LIGHT_Val_2 (( 200 * Backlight_Operate.BacklightPwm ) / 100 )
#define BACK_LIGHT_Val_3 (( 400 * Backlight_Operate.BacklightPwm ) / 100 )
#define BACK_LIGHT_Val_4 (( 600 * Backlight_Operate.BacklightPwm ) / 100 )
#define BACK_LIGHT_Val_5 (( 800 * Backlight_Operate.BacklightPwm ) / 100 )
#define LIGHT_DATA_TIME 10u
/*这里填写多长时间采集一个数据,单位ms*/
#define LIGHT_DATA_NUM 20u
/*燃油电阻采集数据总数 最大255*/
...
...
@@ -34,15 +60,15 @@ typedef struct
_st_Backlight
BacklightTable
[
Backlight_Max
]
=
{
/*温度 阻值 */
{
550
,
2708
},
{
600
,
2602
},
{
650
,
2500
},
{
700
,
2043
},
{
750
,
2310
},
{
800
,
2221
},
{
850
,
2136
},
{
900
,
2055
},
{
950
,
1977
},
{
550
,
2708
},
{
600
,
2602
},
{
650
,
2500
},
{
700
,
2043
},
{
750
,
2310
},
{
800
,
2221
},
{
850
,
2136
},
{
900
,
2055
},
{
950
,
1977
},
{
1000
,
1902
},
};
_st_BacklightLevel
BacklightLevelTable
[
BacklightLevel_Max
]
=
...
...
@@ -136,11 +162,11 @@ void Data_Light_Res_service(Light_uint8_t deltaTime)//获取光感阻值,并
}
if
(
LightR_Status
==
0
)
{
TimerM_PWM_set_duty
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
200
);
TimerM_PWM_set_duty
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
BACK_LIGHT_Val_2
);
}
else
{
TimerM_PWM_set_duty
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
800
);
TimerM_PWM_set_duty
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
BACK_LIGHT_Val_5
);
}
}
}
...
...
@@ -148,23 +174,23 @@ void Data_Light_Res_service(Light_uint8_t deltaTime)//获取光感阻值,并
{
if
(
Backlight_SetPwmLevel
()
==
1U
)
{
TimerM_PWM_set_duty
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
100
);
TimerM_PWM_set_duty
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
BACK_LIGHT_Val_1
);
}
else
if
(
Backlight_SetPwmLevel
()
==
2U
)
{
TimerM_PWM_set_duty
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
200
);
TimerM_PWM_set_duty
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
BACK_LIGHT_Val_2
);
}
else
if
(
Backlight_SetPwmLevel
()
==
3U
)
{
TimerM_PWM_set_duty
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
400
);
TimerM_PWM_set_duty
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
BACK_LIGHT_Val_3
);
}
else
if
(
Backlight_SetPwmLevel
()
==
4U
)
{
TimerM_PWM_set_duty
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
600
);
TimerM_PWM_set_duty
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
BACK_LIGHT_Val_4
);
}
else
if
(
Backlight_SetPwmLevel
()
==
5U
)
{
TimerM_PWM_set_duty
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
800
);
TimerM_PWM_set_duty
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
BACK_LIGHT_Val_5
);
}
}
else
...
...
@@ -187,31 +213,8 @@ Light_uint16_t GetBacklightDutyByLevel(Light_uint16_t level)
return
0
;
}
typedef
void
(
*
SetPwm
)(
Light_uint16_t
Pwm
);
typedef
Light_uint8_t
(
*
SetPwmEnable
)(
void
);
typedef
Light_uint8_t
(
*
SetPwmLevel
)(
void
);
typedef
Light_uint16_t
(
*
NtcRes
)(
void
);
typedef
struct
{
SetPwm
SetPwmCbk
;
/* 设置PWM回调函数 */
SetPwmEnable
SetPwmEnCbk
;
/* 设置PWM使能回调函数 */
SetPwmLevel
SetPwmLevelCbk
;
/* 背光等级回调函数 */
NtcRes
NtcResCbk
;
/* 获取电阻值回调函数 */
}
BackLightExtPara
;
typedef
struct
{
SetPwm
SetPwmCbk
;
/* 设置PWM回调函数 */
SetPwmEnable
SetPwmEnCbk
;
/* 设置PWM使能回调函数 */
SetPwmLevel
SetPwmLevelCbk
;
/* 背光等级回调函数 */
NtcRes
NtcResCbk
;
Light_uint8_t
BacklightEn
;
/* 背光使能 */
Light_uint16_t
BacklightPwm
;
/* 背光PWM */
Light_uint16_t
BacklightLevel
;
/* 背光等级 */
}
_Backlight_Op
;
_Backlight_Op
Backlight_Operate
;
/* 设置PWM回调函数 */
...
...
@@ -494,7 +497,7 @@ void BackLight_Service(void)
BacklightFactorCtrl
.
curFactor
=
BacklightFactorCtrl
.
destFactor
;
}
BacklightFactorCtrl
.
u16DialdestDuty
=
Backlight
FactorCtrl
.
curFactor
*
BacklightFactorCtrl
.
curFactor
/
100
;
BacklightFactorCtrl
.
u16DialdestDuty
=
Backlight
_Operate
.
BacklightPwm
*
BacklightFactorCtrl
.
curFactor
/
100
;
if
(
BacklightFactorCtrl
.
u16DialdestDuty
<
50
)
{
...
...
@@ -518,17 +521,19 @@ void BackLight_Service(void)
}
Backlight_Operate
.
BacklightPwm
=
BacklightFactorCtrl
.
u16DialcurDuty
;
Backlight_Operate
.
SetPwmCbk
(
Backlight_Operate
.
BacklightPwm
);
//
Backlight_Operate.SetPwmCbk(Backlight_Operate.BacklightPwm);
}
else
{
/* 无NTC策略 直接根据当前背光等级调整PWM */
Backlight_Operate
.
SetPwmCbk
(
Backlight_Operate
.
BacklightPwm
);
Backlight_Operate
.
BacklightPwm
=
100U
;
// Backlight_Operate.SetPwmCbk(Backlight_Operate.BacklightPwm);
}
}
else
{
Backlight_Operate
.
SetPwmCbk
(
0
);
Backlight_Operate
.
BacklightPwm
=
100U
;
// Backlight_Operate.SetPwmCbk(0);
}
}
...
...
@@ -538,7 +543,7 @@ void BackLight_Process(void)
{
if
(
Menu_Item_Select_Get
(
MENU_ITEM_BACKLIGHT_5
)
==
1
)
{
TimerM_PWM_set_duty
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
BACK_LIGHT_Val_5
);
TimerM_PWM_set_duty
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
(
BACK_LIGHT_Val_5
)
);
}
else
if
(
Menu_Item_Select_Get
(
MENU_ITEM_BACKLIGHT_4
)
==
1
)
{
...
...
Firmware/Source/Application/BackLight.h
View file @
a4e6006a
...
...
@@ -25,7 +25,7 @@ extern Light_uint16_t LightR_Status ;
void
Backlight_KL30_Wakeup_Init
(
void
);
void
BackLight_Process
(
void
);
Light_uint8_t
Backlight_SetPwmLevel
(
void
);
extern
void
BackLight_Service
(
void
);
...
...
Firmware/Source/Application/CommonInterface.c
View file @
a4e6006a
...
...
@@ -41,7 +41,8 @@ uint8_t Common_Get_IG_Sts(void)
uint16_t
Common_Get_Act_V_Speed
(
void
)
{
return
Act_V_Speed
;
uint32_t
Act_V_Speed_ODO
=
Act_V_Speed
;
return
Act_V_Speed_ODO
*
1005
/
1000
;
//需要跑大计测试
}
uint16_t
Common_Get_Disp_V_Speed
(
void
)
{
...
...
Firmware/Source/Component/AMT630H/AMT630H_Datas.c
View file @
a4e6006a
...
...
@@ -1478,15 +1478,15 @@ void AMT630H_GUI_Display_Mode_Setting(Menu_Item_en_t display_mode) /*图 显示
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0073_456_257
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0074_422_103
);
}
if
(
Menu_Item_Select_Get
(
MENU_ITEM_SELECT_DAYTIME
)
==
1
)
{
g_u8Display_Mode
=
ModeDAY
;
g_u8Display_Mode_select
=
ModeDAY
;
}
else
{
;
}
//
if(Menu_Item_Select_Get(MENU_ITEM_SELECT_DAYTIME) == 1)
//
{
//
g_u8Display_Mode = ModeDAY;
//
g_u8Display_Mode_select = ModeDAY;
//
}
//
else
//
{
//
;
//
}
break
;
case
MENU_ITEM_SELECT_NIGHTTIME
:
if
(
g_u8Language
==
CH
)
/*处于日间模式 进入显示模式设置 :中文 光标选中夜间模式*/
...
...
@@ -1509,15 +1509,15 @@ void AMT630H_GUI_Display_Mode_Setting(Menu_Item_en_t display_mode) /*图 显示
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0077_414_234
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0076_461_118
);
}
if
(
Menu_Item_Select_Get
(
MENU_ITEM_SELECT_NIGHTTIME
)
==
1
)
{
g_u8Display_Mode
=
ModeNIGHT
;
g_u8Display_Mode_select
=
ModeNIGHT
;
}
else
{
;
}
//
if(Menu_Item_Select_Get(MENU_ITEM_SELECT_NIGHTTIME) == 1)
//
{
//
g_u8Display_Mode = ModeNIGHT;
//
g_u8Display_Mode_select = ModeNIGHT;
//
}
//
else
//
{
//
;
//
}
break
;
case
MENU_ITEM_SELECT_AUTO
:
if
(
g_u8Language
==
CH
)
/*处于日间模式 进入显示模式设置 :中文 光标选中自动模式*/
...
...
@@ -1541,7 +1541,7 @@ void AMT630H_GUI_Display_Mode_Setting(Menu_Item_en_t display_mode) /*图 显示
}
if
(
Menu_Item_Select_Get
(
MENU_ITEM_SELECT_AUTO
)
==
1
)
{
g_u8Display_Mode_select
=
ModeATUO
;
//
g_u8Display_Mode_select = ModeATUO;
if
(
LightR_Status
==
0
)
{
g_u8Display_Mode
=
ModeNIGHT
;
...
...
Firmware/Source/Component/AMT630H/AMT630H_Datas.h
View file @
a4e6006a
...
...
@@ -57,7 +57,8 @@ extern uint8_t GET_Backlight(void);
extern
uint8_t
g_u8Display_Mode
;
extern
uint8_t
g_u8Display_Mode_select
;
...
...
Firmware/Source/Component/Components.h
View file @
a4e6006a
...
...
@@ -36,6 +36,7 @@
#include "Telltales\Telltales_user.h"
#include "Telltales\Telltales_Lib.h"
#include "Application\BlueTooth.h"
#include "cgc.h"
#endif
Firmware/Source/Component/Menu/Menu_Interface.c
View file @
a4e6006a
...
...
@@ -202,6 +202,8 @@ void Menu_Logic_Operation_Select_Daytime(Menu_Key_en_t enKeyType)
Menu_Item_Select_Set
(
MENU_ITEM_SELECT_DAYTIME
,
1
);
Menu_Item_Select_Set
(
MENU_ITEM_SELECT_NIGHTTIME
,
0
);
Menu_Item_Select_Set
(
MENU_ITEM_SELECT_AUTO
,
0
);
g_u8Display_Mode
=
ModeDAY
;
g_u8Display_Mode_select
=
ModeDAY
;
}
}
...
...
@@ -212,6 +214,8 @@ void Menu_Logic_Operation_Select_Nighttime(Menu_Key_en_t enKeyType)
Menu_Item_Select_Set
(
MENU_ITEM_SELECT_DAYTIME
,
0
);
Menu_Item_Select_Set
(
MENU_ITEM_SELECT_NIGHTTIME
,
1
);
Menu_Item_Select_Set
(
MENU_ITEM_SELECT_AUTO
,
0
);
g_u8Display_Mode
=
ModeNIGHT
;
g_u8Display_Mode_select
=
ModeNIGHT
;
}
}
...
...
@@ -222,6 +226,7 @@ void Menu_Logic_Operation_Select_Auto(Menu_Key_en_t enKeyType)
Menu_Item_Select_Set
(
MENU_ITEM_SELECT_DAYTIME
,
0
);
Menu_Item_Select_Set
(
MENU_ITEM_SELECT_NIGHTTIME
,
0
);
Menu_Item_Select_Set
(
MENU_ITEM_SELECT_AUTO
,
1
);
g_u8Display_Mode_select
=
ModeATUO
;
}
}
...
...
Firmware/Source/Component/PowerManagement/PowerManag_user.c
View file @
a4e6006a
...
...
@@ -44,6 +44,7 @@ static void Power_KL30_Init(void)
loc_config
.
u32UARTbps
=
115200U
;
loc_config
.
pfnUARTConfirmCallBack
=
NULL
;
loc_config
.
pfnUARTReadMsgCallBack
=
Amt630hUartRecvData
;
UART_DeInit
(
UART2
);
RTE_UART_Init
(
UART_CH2
,
&
loc_config
);
Common_DataInit
();
Analog_Signal_Conv_Init
();
...
...
@@ -76,12 +77,14 @@ static void Power_KL30_Init(void)
static
void
Power_Wakeup_Init
(
void
)
{
UART_Channel_Config_st_t
loc_config
;
Common_DataInit
();
Gpio_Init
(
Gpio_WakeUp_Init
);
eeprom_StoreInfo_Init
();
Analog_Signal_Conv_Init
();
Data_User_Mileage_WakeupInit
();
Sys_WakeUp_Init
();
RTE_CLOCK_Select_Start
();
/* 由于休眠的时候时钟关闭,唤醒的时候打开时钟,才能进行下一步 */
Data_Vehicle_Speed_KL30_Wakeup_Init
();
Data_Engine_Speed_KL30_Wakeup_Init
();
LINE_IN_Init
();
...
...
@@ -89,6 +92,13 @@ static void Power_Wakeup_Init(void)
Line_In_KL15_ON_Init
();
Fuel_KL30_Init
();
Backlight_KL30_Wakeup_Init
();
RTE_UART_Sleep_Init
(
UART_CH2
);
loc_config
.
u32UARTChEn
=
1U
;
loc_config
.
u32UARTbps
=
115200U
;
loc_config
.
pfnUARTConfirmCallBack
=
NULL
;
loc_config
.
pfnUARTReadMsgCallBack
=
Amt630hUartRecvData
;
UART_DeInit
(
UART2
);
RTE_UART_Init
(
UART_CH2
,
&
loc_config
);
/* 配置串口,630H上电发送0x0D,但是底板没回复 */
Amt630hInit
();
TimerM_PWM_counter_Output_Init
(
TIMERM_COUNTER1
,
20000
,
64000000
);
TimerM_PWM_CH_Output_init
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
ActiveLevel_High
);
...
...
@@ -124,8 +134,6 @@ static void Power_IG_ON_Init(void)
Fuel_KL15_Init
();
//RTE_GPIO_Set_Level(Blacklight_PWM, 1);
FaultCode_Init
();
Amt630hInit
();
ResetInitedState
();
}
static
void
Power_Sleep_Init
(
void
)
...
...
@@ -139,10 +147,11 @@ static void Power_Sleep_Init(void)
Gpio_Init
(
Gpio_Sleep_Init
);
AMT630H_Sleep
();
Analog_Signal_Conv_Stop
();
if
(
RTE_GPIO_Get_Level
(
KL15_AD_IN
)
==
0
)
/* KL15 */
{
RTE_DEEPSLEEP_Enable
();
}
RTE_UART_Sleep_Init
(
UART_CH2
);
CGC_HSI_CFG_AS_FCLK
();
/* 配置时钟生成控制器(cgc)以将内部高速振荡器(HSI)作为CPU系统时钟(FCLK)以及可能的其他硬件电路的时钟源。 */
//SystemCoreClockUpdate(); /* 更新时钟频率,暂时用不上,先注释 */
RTE_DEEPSLEEP_Enable
();
// RTE_CLOCK_Select_Sleep(); /* 这边代码是开启时钟,暂时用不上,先注释 */
}
static
Power_Status_em
Power_Stay_ON
(
void
)
...
...
@@ -209,6 +218,7 @@ static Power_Status_em Power_Stay_Protect(void)
if
(
SYS_OPR_STAT_RUN
)
{
Amt630hInit
();
//CAN_TX_SetEnable(&CAN_CH0_CanMsgTxOp, CAN_N_TX_Enable);
return
u8PowerSts
;
}
...
...
Firmware/Source/Device/Cmsemicon/BAT32A279/Library/Driver/src/uart.c
View file @
a4e6006a
...
...
@@ -68,6 +68,7 @@ void UART_DeInit(SCIAFSelect_TypeDef UARTx)
CGC_PER0PeriphClockCmd
(
UARTx
>>
10
,
DISABLE
);
SCIChannel_Free
(
UARTx
,
UART_Mode_Rx
|
UART_Mode_Tx
);
}
SCIChannel_Free
(
UARTx
,
UART_Mode_Rx
|
UART_Mode_Tx
);
}
/**
...
...
Firmware/Source/Device/Cmsemicon/BAT32A279/RTE/CLOCK_Select/RTE_CLOCK_Select.h
View file @
a4e6006a
...
...
@@ -5,5 +5,6 @@
extern
void
RTE_CLOCK_Select_Start
(
void
);
extern
void
RTE_CLOCK_Select_Stop
(
void
);
extern
void
RTE_CLOCK_Select_Sleep
(
void
);
#endif
Firmware/Source/Device/Cmsemicon/BAT32A279/RTE/CLOCK_Select/RTE_CLOCK_Select_BAT32A279.c
View file @
a4e6006a
...
...
@@ -15,8 +15,8 @@ void RTE_CLOCK_Select_Start(void)
#ifdef USED_FX_FCLK
CGC_Osc_Setting
(
OSC_OSCILLATOR
,
OSC_UNDER_10M
,
OSC_OSCILLATOR
,
OSC_NORMAL_POWER
);
CGC_PLL_Setting
(
PLL_SR_fMX
,
PLL_DIV_2
,
PLL_MUL_16
);
CGC_PLL_CFG_AS_FCLK
();
CGC_PLL_Setting
(
PLL_SR_fMX
,
PLL_DIV_2
,
PLL_MUL_16
);
/* CGC_PLL_Setting 用于配置PLL(相位锁定环)作为系统时钟以及可能的外设硬件电路的时钟源。 */
CGC_PLL_CFG_AS_FCLK
();
/* PLL的输出频率配置为CPU系统时钟以及外设硬件电路的时钟源。 */
delay_init
(
64000000
);
SystemCoreClock
=
64000000UL
;
#endif
...
...
@@ -40,3 +40,20 @@ uint32_t RTE_CLOCK_Sys_Get(void)
}
void
RTE_CLOCK_Select_Sleep
(
void
)
{
uint8_t
u8tempstabset1
=
0U
;
uint8_t
u8tempstabwait1
=
0U
;
u8tempstabset1
=
_FF_CGC_OSCSTAB_STA18
;
do
{
u8tempstabwait1
=
CGC
->
OSTC
;
u8tempstabwait1
&=
u8tempstabset1
;
}
while
(
u8tempstabwait1
!=
u8tempstabset1
);
CGC_PLL_Setting
(
PLL_SR_fMX
,
PLL_DIV_2
,
PLL_MUL_16
);
CGC_PLL_CFG_AS_FCLK
();
//SRAM区运行
SystemCoreClock
=
64000000UL
;
}
Firmware/Source/System/Sys_Task_List.c
View file @
a4e6006a
...
...
@@ -53,6 +53,7 @@ void Sys_20ms_Tasks(void)
void
Sys_50ms_Tasks
(
void
)
{
// BlueToothService();
BackLight_Service
();
UpdateGraphics
();
Telltales_Management
();
g_u8Cursor_Posittion
=
Menu_Get_Current_Cursor_Information
();
...
...
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