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
d3c1fabd
Commit
d3c1fabd
authored
Aug 20, 2024
by
王雅楠
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://tyw-server.synology.me:12345/shihao/haojin750tft
into wangyanan
parents
8845ad61
e5b12ed6
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
221 additions
and
116 deletions
+221
-116
HaoJin750TFT.uvprojx
.../Project/Cmsemicon/BAT32A279/MDK_ARM/HaoJin750TFT.uvprojx
+11
-6
HaoJin750TFT.sct
...ject/Cmsemicon/BAT32A279/MDK_ARM/Objects/HaoJin750TFT.sct
+2
-2
BlueTooth.c
Firmware/Source/Application/BlueTooth.c
+37
-9
BlueTooth.h
Firmware/Source/Application/BlueTooth.h
+2
-0
AMT630H_Datas.c
Firmware/Source/Component/AMT630H/AMT630H_Datas.c
+8
-0
Key_user.c
Firmware/Source/Component/Key/Key_user.c
+17
-2
Key_user.h
Firmware/Source/Component/Key/Key_user.h
+2
-0
cgc.c
...ource/Device/Cmsemicon/BAT32A279/Library/Driver/src/cgc.c
+136
-92
Sys_Task_List.c
Firmware/Source/System/Sys_Task_List.c
+2
-1
Option.properties
Firmware/utility/诊断工具/Option/Option.properties
+4
-4
No files found.
Firmware/Project/Cmsemicon/BAT32A279/MDK_ARM/HaoJin750TFT.uvprojx
View file @
d3c1fabd
...
...
@@ -275,7 +275,7 @@
</OCR_RVCT3>
<OCR_RVCT4>
<Type>
1
</Type>
<StartAddress>
0x
c40
0
</StartAddress>
<StartAddress>
0x0
</StartAddress>
<Size>
0x73c00
</Size>
</OCR_RVCT4>
<OCR_RVCT5>
...
...
@@ -728,6 +728,16 @@
<FileType>
5
</FileType>
<FilePath>
..\..\..\..\Source\Application\FaultCode.h
</FilePath>
</File>
<File>
<FileName>
BlueTooth.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\..\..\Source\Application\BlueTooth.c
</FilePath>
</File>
<File>
<FileName>
BlueTooth.h
</FileName>
<FileType>
5
</FileType>
<FilePath>
..\..\..\..\Source\Application\BlueTooth.h
</FilePath>
</File>
</Files>
</Group>
<Group>
...
...
@@ -1008,11 +1018,6 @@
<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/Project/Cmsemicon/BAT32A279/MDK_ARM/Objects/HaoJin750TFT.sct
View file @
d3c1fabd
...
...
@@ -2,8 +2,8 @@
; *** Scatter-Loading Description File generated by uVision ***
; *************************************************************
LR_IROM1 0x0000
C4
00 0x00073C00 { ; load region size_region
ER_IROM1 0x0000
C4
00 0x00073C00 { ; load address = execution address
LR_IROM1 0x0000
00
00 0x00073C00 { ; load region size_region
ER_IROM1 0x0000
00
00 0x00073C00 { ; load address = execution address
*.o (RESET, +First)
*(InRoot$$Sections)
.ANY (+RO)
...
...
Firmware/Source/Application/BlueTooth.c
View file @
d3c1fabd
#include "Components.h"
uint8_t
OTA_Update_Count
=
0
;
const
uint8_t
HJBlueToothName
[
9
]
=
{
"HJ_750TFT"
};
uint8_t
UUIDConfigBuf
[
22
]
=
{
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0x00
};
void
BlueToothService
()
{
// _PICID_Struct PicObj;
// PicObj.qr_logo_id = Pic_0020;
// PicObj.qr_pic_id = Pic_0002;
// PicObj.update_pic_id = 0;
// PicObj.second_menu = 0;
// PicObj.navigation_task_id = 0;
// PackedTransfer_DisplayPhoneMirrorQRcode(1, PicObj);
SetBlueToothName
((
uint8_t
*
)
HJBlueToothName
,
sizeof
(
HJBlueToothName
));
SetUUIDData
((
char
*
)
UUIDConfigBuf
,
22
);
// _QRCODE_RECT QRCode_Rect;
...
...
@@ -20,3 +15,36 @@ void BlueToothService()
// QRCode_Rect.width = QRCode_WIDTH;
// SetScreenType(QRCode_TYPE, QRCode_Rect);
}
void
UpdateGraphics
(
void
)
{
_PICID_Struct
PicObj
;
PicObj
.
qr_logo_id
=
0
;
PicObj
.
main_pic_id
=
Pic_0382
;
PicObj
.
qr_pic_id
=
Pic_0316
;
PicObj
.
update_pic_id
=
Pic_0193
;
PicObj
.
second_menu
=
0
;
PicObj
.
navigation_task_id
=
0
;
PackedTransfer_DisplayPhoneMirrorQRcode
(
0
,
PicObj
);
}
void
OTAUpdateService
(
void
)
{
_QRCODE_RECT
QRCode_Rect
;
QRCode_Rect
.
x
=
457
;
QRCode_Rect
.
y
=
137
;
QRCode_Rect
.
height
=
240
;
QRCode_Rect
.
width
=
240
;
if
(
OTA_Update_Flag
==
1
)
{
OTA_Update_Count
++
;
if
(
OTA_Update_Count
<
5
)
{
SetUpdateCtrl
(
1
,
QRCode_Rect
);
}
}
else
{
SetUpdateCtrl
(
0
,
QRCode_Rect
);
OTA_Update_Count
=
0
;
}
}
Firmware/Source/Application/BlueTooth.h
View file @
d3c1fabd
...
...
@@ -10,5 +10,7 @@
extern
void
BlueToothService
(
void
);
extern
void
OTAUpdateService
(
void
);
void
UpdateGraphics
(
void
);
#endif
\ No newline at end of file
Firmware/Source/Component/AMT630H/AMT630H_Datas.c
View file @
d3c1fabd
...
...
@@ -4250,8 +4250,16 @@ void AMT630H_GUI_ReadPosittion_Display(void)
AMT630H_GUI_Language_Setting
(
MENU_ITEM_LANGUAGE_ENGLISH
);
break
;
case
MENU_ITEM_FAULT_INFORMATION
:
/*27 故障信息*/
if
(
OTA_Update_Flag
==
0
)
{
AMT630H_GUI_SETTING
();
AMT630H_GUI_Fault_Information
();
}
else
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0653_54_499
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0193_0_0
);
}
break
;
case
MENU_ITEM_PHONE_CONNECT
:
/*28 手机互联*/
AMT630H_GUI_SETTING
();
...
...
Firmware/Source/Component/Key/Key_user.c
View file @
d3c1fabd
...
...
@@ -62,6 +62,7 @@ void Key_Operation_Right(Key_Event_en_t enKeyEvent)//确认
break
;
case
KEY_EVENT_LONG_PRESS_4
:
//10s
//TYW_RESET_ODO();
Get_Into_OTA_Update_Mode
();
break
;
case
KEY_EVENT_OFF_TO_ON
:
break
;
...
...
@@ -158,10 +159,16 @@ void Key_Wakeup_Init_EXample(void)
void
Key_TimeOut_Service
(
void
)
{
if
(
OTA_Update_Flag
==
0
)
{
if
((
MenuData
.
Back_Time_Left_Flag
==
1
)
&&
(
MenuData
.
Back_Time_Right_Flag
==
1
))
{
Menu_Service
(
MENU_KEY_TIMEOUT
);
}
}
else
{
}
}
void
Key_Auto_Save
(
void
)
...
...
@@ -274,6 +281,14 @@ void Key_Event_Short_Press_Right(void)//确认
}
}
uint8_t
OTA_Update_Flag
=
0
;
void
Get_Into_OTA_Update_Mode
(
void
)
{
if
(
Menu_Get_Current_Cursor_Information
()
==
MENU_ITEM_FAULT_INFORMATION
)
{
OTA_Update_Flag
=
!
OTA_Update_Flag
;
}
}
void
KEY_LEFT_EVENT_NONE_Service
(
void
)
{
MenuData
.
Back_Time_Left
++
;
...
...
Firmware/Source/Component/Key/Key_user.h
View file @
d3c1fabd
...
...
@@ -47,6 +47,7 @@ typedef struct
uint8_t
Clock_Flash
;
}
_Menu_Data
;
extern
uint8_t
OTA_Update_Flag
;
extern
uint8_t
ClearODO_Flag
;
extern
uint8_t
g_u8Cursor_Posittion
;
extern
RTC_CounterTypeDef
counter_val
;
...
...
@@ -59,6 +60,7 @@ Key_Status_en_t Key_Status_Read_Left(void);
Key_Status_en_t
Key_Status_Read_Right
(
void
);
void
Key_Event_Short_Press_Left
(
void
);
void
Key_Event_Short_Press_Right
(
void
);
void
Get_Into_OTA_Update_Mode
(
void
);
void
KEY_RIGHT_EVENT_NONE_Service
(
void
);
void
KEY_LEFT_EVENT_NONE_Service
(
void
);
void
Key_Auto_Save
(
void
);
...
...
Firmware/Source/Device/Cmsemicon/BAT32A279/Library/Driver/src/cgc.c
View file @
d3c1fabd
#include "cgc.h"
uint8_t
USE_HSE_SYSTYEM_CLOCK
=
SYSTYEM_CLOCK_CLOSE
;
uint8_t
USE_HSI_SYSTYEM_CLOCK
=
SYSTYEM_CLOCK_CLOSE
;
uint8_t
USE_LSE_SYSTYEM_CLOCK
=
SYSTYEM_CLOCK_CLOSE
;
uint8_t
USE_LSI_SYSTYEM_CLOCK
=
SYSTYEM_CLOCK_CLOSE
;
/**
* @brief Enables or disables the PER0 peripheral clock.
* @note After reset, the peripheral clock (used for registers read/write access)
...
...
@@ -107,7 +102,6 @@ void CGC_PER2PeriphClockCmd(uint32_t CGC_PER2Periph, FunctionalState NewState)
CGC
->
PER2
&=
~
CGC_PER2Periph
;
}
}
/**
* @brief Enables or disables the PER3 peripheral clock.
* @note After reset, the peripheral clock (used for registers read/write access)
...
...
@@ -155,32 +149,29 @@ void CGC_Osc_Setting(OSC_Pin_Mode_t main,OSC_Speed_Mode_t amph, OSC_Pin_Mode_t s
uint8_t
tmp
;
tmp
=
0x00
;
if
(
main
==
OSC_PORT
)
if
(
main
==
OSC_OSCILLATOR
)
{
tmp
|=
(
0
<<
CGC_CMC_EXCLK_Pos
)
|
(
0
<<
CGC_CMC_OSCSEL
_Pos
);
tmp
|=
(
0
<<
CGC_CMC_EXCLK_Pos
)
|
(
1
<<
CGC_CMC_OSCSEL_Pos
)
|
(((
uint8_t
)
amph
)
<<
CGC_CMC_AMPH
_Pos
);
}
if
(
sub
==
OSC_PORT
)
else
if
(
main
==
OSC_PORT
)
{
tmp
|=
(
0
<<
CGC_CMC_EXCLK
S_Pos
)
|
(
0
<<
CGC_CMC_OSCSELS
_Pos
);
tmp
|=
(
0
<<
CGC_CMC_EXCLK
_Pos
)
|
(
0
<<
CGC_CMC_OSCSEL
_Pos
);
}
if
(
main
==
OSC_OSCILLATOR
)
else
if
(
main
==
OSC_EXCLK
)
{
tmp
|=
(
0
<<
CGC_CMC_EXCLK_Pos
)
|
(
1
<<
CGC_CMC_OSCSEL_Pos
)
|
(
1
<<
CGC_CMC_AMPH
_Pos
);
tmp
|=
(
1
<<
CGC_CMC_EXCLK_Pos
)
|
(
1
<<
CGC_CMC_OSCSEL
_Pos
);
}
if
(
sub
==
OSC_OSCILLATOR
)
{
tmp
|=
(
0
<<
CGC_CMC_EXCLKS_Pos
)
|
(
1
<<
CGC_CMC_OSCSELS_Pos
)
|
(
1
<<
CGC_CMC_AMPHS_Pos
);
tmp
|=
(
0
<<
CGC_CMC_EXCLKS_Pos
)
|
(
1
<<
CGC_CMC_OSCSELS_Pos
)
|
(
((
uint8_t
)
amphs
)
<<
CGC_CMC_AMPHS_Pos
);
}
if
(
main
==
OSC_EXCLK
)
else
if
(
sub
==
OSC_PORT
)
{
tmp
|=
(
1
<<
CGC_CMC_EXCLK_Pos
)
|
(
1
<<
CGC_CMC_OSCSEL
_Pos
);
tmp
|=
(
0
<<
CGC_CMC_EXCLKS_Pos
)
|
(
0
<<
CGC_CMC_OSCSELS
_Pos
);
}
if
(
sub
==
OSC_EXCLK
)
else
if
(
sub
==
OSC_EXCLK
)
{
tmp
|=
(
1
<<
CGC_CMC_EXCLKS_Pos
)
|
(
1
<<
CGC_CMC_OSCSELS_Pos
);
}
...
...
@@ -188,7 +179,7 @@ void CGC_Osc_Setting(OSC_Pin_Mode_t main,OSC_Speed_Mode_t amph, OSC_Pin_Mode_t s
CGC
->
CMC
=
tmp
;
/* Set fMX */
CGC
->
CSC
&=
~
(
1
<<
7
)
;
//MSTOP = 0
CGC
->
CSC
&=
~
(
1
<<
CGC_CSC_MSTOP_Pos
)
;
//MSTOP = 0
if
(
main
==
OSC_OSCILLATOR
)
{
...
...
@@ -203,7 +194,7 @@ void CGC_Osc_Setting(OSC_Pin_Mode_t main,OSC_Speed_Mode_t amph, OSC_Pin_Mode_t s
}
/* Set fSUB */
CGC
->
CSC
&=
~
(
1
<<
6
)
;
//XTSTOP = 0
CGC
->
CSC
&=
~
(
1
<<
CGC_CSC_XTSTOP_Pos
)
;
//XTSTOP = 0
if
(
sub
==
OSC_OSCILLATOR
)
{
...
...
@@ -234,25 +225,24 @@ void CGC_Osc_Setting(OSC_Pin_Mode_t main,OSC_Speed_Mode_t amph, OSC_Pin_Mode_t s
*/
void
CGC_LSEConfig
(
OSC_Pin_Mode_t
sub
,
OSC_Power_Mode_t
amphs
)
{
/* Check the parameters */
assert_param
(
IS_CGC_LSE_MODE
(
sub
));
assert_param
(
IS_CGC_LSE_PWR_MODE
(
amphs
));
volatile
uint32_t
w_count
;
uint8_t
tmp
;
/* Check the parameters */
assert_param
(
IS_CGC_OSC_PIN_MODE
(
sub
));
assert_param
(
IS_CGC_LSE_PWR_MODE
(
amphs
));
tmp
=
0x00
;
if
(
sub
==
OSC_PORT
)
{
tmp
|=
(
0
<<
CGC_CMC_EXCLKS_Pos
)
|
(
0
<<
CGC_CMC_OSCSELS_Pos
);
}
if
(
sub
==
OSC_OSCILLATOR
)
{
tmp
|=
(
0
<<
CGC_CMC_EXCLKS_Pos
)
|
(
1
<<
CGC_CMC_OSCSELS_Pos
)
|
(
amphs
<<
CGC_CMC_AMPHS_Pos
);
tmp
|=
(
0
<<
CGC_CMC_EXCLKS_Pos
)
|
(
1
<<
CGC_CMC_OSCSELS_Pos
)
|
(
((
uint8_t
)
amphs
)
<<
CGC_CMC_AMPHS_Pos
);
}
if
(
sub
==
OSC_EXCLK
)
else
if
(
sub
==
OSC_PORT
)
{
tmp
|=
(
0
<<
CGC_CMC_EXCLKS_Pos
)
|
(
0
<<
CGC_CMC_OSCSELS_Pos
);
}
else
if
(
sub
==
OSC_EXCLK
)
{
tmp
|=
(
1
<<
CGC_CMC_EXCLKS_Pos
)
|
(
1
<<
CGC_CMC_OSCSELS_Pos
);
}
...
...
@@ -260,7 +250,7 @@ void CGC_LSEConfig(OSC_Pin_Mode_t sub, OSC_Power_Mode_t amphs)
CGC
->
CMC
=
tmp
;
/* Set fSUB */
CGC
->
CSC
&=
~
(
1
<<
6
)
;
//XTSTOP = 0
CGC
->
CSC
&=
~
(
1
<<
CGC_CSC_XTSTOP_Pos
)
;
//XTSTOP = 0
if
(
sub
==
OSC_OSCILLATOR
)
{
...
...
@@ -275,7 +265,7 @@ void CGC_LSEConfig(OSC_Pin_Mode_t sub, OSC_Power_Mode_t amphs)
/**
* @brief Configures the External High Speed oscillator (HSE).
* @note External High Speed oscillator clock source can be choose from PORT
* @note External High Speed oscillator clock source can be choose from PORT
��
* OSC_OSCILLATOR or external input clock.
* at same time, OSC_OSCILLATOR can be 1MHz < fx < 10MHz or 10MHz < fx < 20MHz
* @param pinMode
...
...
@@ -290,27 +280,25 @@ void CGC_LSEConfig(OSC_Pin_Mode_t sub, OSC_Power_Mode_t amphs)
*/
void
CGC_HSEConfig
(
OSC_Pin_Mode_t
main
,
OSC_Speed_Mode_t
amph
)
{
/* Check the parameters */
assert_param
(
IS_CGC_LSE_MODE
(
main
));
assert_param
(
IS_CGC_HSE_OSC_SPEED
(
amph
));
volatile
uint32_t
w_count
;
uint8_t
temp_stab_set
;
uint8_t
temp_stab_wait
;
uint8_t
tmp
;
/* Check the parameters */
assert_param
(
IS_CGC_OSC_PIN_MODE
(
main
));
assert_param
(
IS_CGC_HSE_OSC_SPEED
(
amph
));
tmp
=
0x00
;
if
(
main
==
OSC_PORT
)
{
tmp
|=
(
0
<<
CGC_CMC_EXCLK_Pos
)
|
(
0
<<
CGC_CMC_OSCSEL_Pos
);
}
if
(
main
==
OSC_OSCILLATOR
)
{
tmp
|=
(
0
<<
CGC_CMC_EXCLK_Pos
)
|
(
1
<<
CGC_CMC_OSCSEL_Pos
)
|
(
amph
<<
CGC_CMC_AMPH_Pos
);
tmp
|=
(
0
<<
CGC_CMC_EXCLK_Pos
)
|
(
1
<<
CGC_CMC_OSCSEL_Pos
)
|
(
((
uint8_t
)
amph
)
<<
CGC_CMC_AMPH_Pos
);
}
if
(
main
==
OSC_EXCLK
)
else
if
(
main
==
OSC_PORT
)
{
tmp
|=
(
0
<<
CGC_CMC_EXCLK_Pos
)
|
(
0
<<
CGC_CMC_OSCSEL_Pos
);
}
else
if
(
main
==
OSC_EXCLK
)
{
tmp
|=
(
1
<<
CGC_CMC_EXCLK_Pos
)
|
(
1
<<
CGC_CMC_OSCSEL_Pos
);
}
...
...
@@ -318,7 +306,7 @@ void CGC_HSEConfig(OSC_Pin_Mode_t main, OSC_Speed_Mode_t amph)
CGC
->
CMC
=
tmp
;
/* Set fMX */
CGC
->
CSC
&=
~
(
1
<<
7
)
;
//MSTOP = 0
CGC
->
CSC
&=
~
(
1
<<
CGC_CSC_MSTOP_Pos
)
;
//MSTOP = 0
if
(
main
==
OSC_OSCILLATOR
)
{
...
...
@@ -333,6 +321,18 @@ void CGC_HSEConfig(OSC_Pin_Mode_t main, OSC_Speed_Mode_t amph)
}
}
/* Clock switching needs to be executed in SRAM */
#if defined (__CC_ARM)
#pragma arm section code = "RW_FUNC_PLL" // Arm Compiler 5
#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION > 6010050)
#pragma clang section text = "RW_FUNC_PLL" // Arm Compiler 6
#endif
#if defined(__ICCARM__)
__ramfunc
#endif
/**
* @brief Enables External Low Speed oscillator (LSE/Fsub) used as CPU
* system clock and Clock source of peripheral hardware circuit.
...
...
@@ -342,9 +342,12 @@ void CGC_HSEConfig(OSC_Pin_Mode_t main, OSC_Speed_Mode_t amph)
void
CGC_LSE_CFG_AS_FCLK
()
{
CGC
->
CKC
=
(
1
<<
CGC_CKC_CSS_Pos
)
|
(
0
<<
CGC_CKC_MCM0_Pos
);
__NOP
();
__NOP
();
__NOP
();
__NOP
();
while
((
CGC
->
CKC
&
CGC_CKC_CLS_Msk
)
==
0
);
USE_LSE_SYSTYEM_CLOCK
=
SYSTYEM_CLOCK_OPEN
;
}
/**
...
...
@@ -356,8 +359,11 @@ void CGC_LSE_CFG_AS_FCLK()
void
CGC_HSE_CFG_AS_FCLK
()
{
CGC
->
CKC
=
(
0
<<
CGC_CKC_CSS_Pos
)
|
(
1
<<
CGC_CKC_MCM0_Pos
);
__NOP
();
__NOP
();
__NOP
();
__NOP
();
while
((
CGC
->
CKC
&
CGC_CKC_MCS_Msk
)
==
0
);
USE_HSE_SYSTYEM_CLOCK
=
SYSTYEM_CLOCK_OPEN
;
}
/**
...
...
@@ -369,12 +375,48 @@ void CGC_HSE_CFG_AS_FCLK()
*/
void
CGC_HSI_CFG_AS_FCLK
()
{
CGC
->
CKC
=
0
<<
CGC_CKC_CSS_Pos
;
if
(
CGC
->
MCKC
&
CGC_MCKC_CKSTR_Msk
)
{
CGC
->
MCKC
&=
~
(
1
<<
CGC_MCKC_CKSELR_Pos
);
__NOP
();
__NOP
();
__NOP
();
__NOP
();
while
(
CGC
->
MCKC
&
CGC_MCKC_CKSTR_Msk
);
}
CGC
->
CKC
=
(
0
<<
CGC_CKC_CSS_Pos
)
|
(
0
<<
CGC_CKC_MCM0_Pos
);
__NOP
();
__NOP
();
__NOP
();
__NOP
();
while
((
CGC
->
CKC
&
(
CGC_CKC_CSS_Msk
|
CGC_CKC_MCS_Msk
)));
}
/**
* @brief Enables output frequency by PLL used as CPU
* system clock and Clock source of peripheral hardware circuit.
* @note
* @retval None
*/
void
CGC_PLL_CFG_AS_FCLK
(
void
)
{
CGC
->
MCKC
|=
(
1
<<
CGC_MCKC_CKSELR_Pos
);
__NOP
();
__NOP
();
__NOP
();
__NOP
();
while
((
CGC
->
MCKC
&
CGC_MCKC_CKSTR_Msk
)
==
0
);
while
((
CGC
->
CKC
&
CGC_CKC_CSS_Msk
)
==
1
);
USE_HSI_SYSTYEM_CLOCK
=
SYSTYEM_CLOCK_OPEN
;
CGC
->
CKC
=
(
0
<<
CGC_CKC_CSS_Pos
)
|
(
0
<<
CGC_CKC_MCM0_Pos
);
__NOP
();
__NOP
();
__NOP
();
__NOP
();
while
(
CGC
->
CKC
&
CGC_CKC_CSS_Msk
);
}
#if 0
/**
* @brief Enables External High Speed oscillator (HSE) used as MAIN system clock
* which can provided for clock output/buzzer or CPU/peripheral hardware circuit.
...
...
@@ -383,7 +425,11 @@ void CGC_HSI_CFG_AS_FCLK()
*/
void CGC_HSE_CFG_AS_FMAIN()
{
CGC
->
CKC
=
1
<<
CGC_CKC_MCM0_Pos
;
CGC->CKC = (1 << CGC_CKC_MCM0_Pos);
__NOP();
__NOP();
__NOP();
__NOP();
while((CGC->CKC & CGC_CKC_MCS_Msk) == 0);
}
/**
...
...
@@ -394,9 +440,20 @@ void CGC_HSE_CFG_AS_FMAIN()
*/
void CGC_HSI_CFG_AS_FMAIN()
{
CGC
->
CKC
=
0
<<
CGC_CKC_MCM0_Pos
;
while
((
CGC
->
CKC
&
CGC_CKC_MCS_Msk
)
==
1
);
CGC->CKC = (0 << CGC_CKC_MCM0_Pos);
__NOP();
__NOP();
__NOP();
__NOP();
while(CGC->CKC & CGC_CKC_MCS_Msk);
}
#endif
#if defined (__CC_ARM)
#pragma arm section code // Arm Compiler 5
#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION > 6010050)
#pragma clang section text = "" // Arm Compiler 6
#endif
/**
* @brief Setting PLL used as system clock and Clock source of peripheral hardware circuit.
...
...
@@ -451,7 +508,7 @@ void CGC_PLL_Setting(PLL_Src_t src, PLL_Div_t div, PLL_Mul_t mul)
CGC
->
PLLCR
=
tmp
;
CGC
->
PLLCR
|=
1
<<
0
;
/* PLLON = 1 */
CGC
->
PLLCR
|=
(
1
<<
CGC_PLLCR_PLLON_Pos
)
;
/* PLLON = 1 */
for
(
i
=
0U
;
i
<=
2000
;
i
++
)
{
__NOP
();
...
...
@@ -459,19 +516,6 @@ void CGC_PLL_Setting(PLL_Src_t src, PLL_Div_t div, PLL_Mul_t mul)
}
/**
* @brief Enables output frequency by PLL used as CPU
* system clock and Clock source of peripheral hardware circuit.
* @note
* @retval None
*/
__attribute__
((
section
(
"RW_FUNC_PLL"
)))
void
CGC_PLL_CFG_AS_FCLK
(
void
)
{
CGC
->
MCKC
=
0x01
;
while
((
CGC
->
MCKC
&
CGC_MCKC_CKSTR_Msk
)
==
0
);
USE_HSE_SYSTYEM_CLOCK
=
SYSTYEM_CLOCK_OPEN
;
}
/**
* @brief This function stops the main system clock oscilator (MOSC).
* @param None
...
...
@@ -479,7 +523,7 @@ __attribute__((section("RW_FUNC_PLL"))) void CGC_PLL_CFG_AS_FCLK(void)
*/
void
CGC_MainOsc_Stop
(
void
)
{
CGC
->
CSC
|=
1
<<
7
;
/* MSTOP = 1 */
CGC
->
CSC
|=
(
1
<<
CGC_CSC_MSTOP_Pos
)
;
/* MSTOP = 1 */
}
/**
...
...
@@ -489,7 +533,7 @@ void CGC_MainOsc_Stop(void)
*/
void
CGC_MainOsc_Start
(
void
)
{
CGC
->
CSC
&=
~
(
1
<<
7
);
/* MSTOP = 0 */
CGC
->
CSC
&=
~
(
1
<<
CGC_CSC_MSTOP_Pos
);
/* MSTOP = 0 */
}
/**
...
...
@@ -499,7 +543,7 @@ void CGC_MainOsc_Start(void)
*/
void
CGC_SubOsc_Stop
(
void
)
{
CGC
->
CSC
|=
1
<<
6
;
/* XTSTOP = 1 */
CGC
->
CSC
|=
(
1
<<
CGC_CSC_XTSTOP_Pos
)
;
/* XTSTOP = 1 */
}
/**
...
...
@@ -509,7 +553,7 @@ void CGC_SubOsc_Stop(void)
*/
void
CLK_SubOsc_Start
(
void
)
{
CGC
->
CSC
&=
~
(
1
<<
6
);
/* XTSTOP = 0 */
CGC
->
CSC
&=
~
(
1
<<
CGC_CSC_XTSTOP_Pos
);
/* XTSTOP = 0 */
}
/**
...
...
@@ -519,7 +563,7 @@ void CLK_SubOsc_Start(void)
*/
void
CGC_Hoco_Stop
(
void
)
{
CGC
->
CSC
|=
1
<<
0
;
/* HIOSTOP = 1 */
CGC
->
CSC
|=
(
1
<<
CGC_CSC_HIOSTOP_Pos
)
;
/* HIOSTOP = 1 */
}
/**
...
...
@@ -529,5 +573,5 @@ void CGC_Hoco_Stop(void)
*/
void
CGC_Hoco_Start
(
void
)
{
CGC
->
CSC
&=
~
(
1
<<
0
);
/* HIOSTOP = 0 */
CGC
->
CSC
&=
~
(
1
<<
CGC_CSC_HIOSTOP_Pos
);
/* HIOSTOP = 0 */
}
Firmware/Source/System/Sys_Task_List.c
View file @
d3c1fabd
...
...
@@ -53,6 +53,7 @@ void Sys_20ms_Tasks(void)
void
Sys_50ms_Tasks
(
void
)
{
// BlueToothService();
UpdateGraphics
();
Telltales_Management
();
g_u8Cursor_Posittion
=
Menu_Get_Current_Cursor_Information
();
...
...
@@ -82,7 +83,7 @@ void Sys_100ms_Tasks(void)
Coolant_Cal_Sevice
(
100u
);
Services_Mileage_Callback
();
// Data_Mileage_Clear();
OTAUpdateService
();
RTE_GPIO_Config
(
RTE_GPIO_PORT05_PIN04
,
GpioOut_High
);
//BackLight_Process();
//TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, 100);
...
...
Firmware/utility/诊断工具/Option/Option.properties
View file @
d3c1fabd
#new Option
#Sun Aug 18 1
1:51:19
CST 2024
#Sun Aug 18 1
5:35:55
CST 2024
IsSort
=
true
MergeFlashIsCompression
=
false
ChangeAppFilePath
=
MergeCanXLSPath
=
RH850_D1M1AGPIOJSONpath
=
DBFFilePath
=
MergeCrcTtpe
=
2
1
MergeCrcTtpe
=
2
9
MergeBootFilePath
=
D
\:\\
git
\\
haojin750tft
\\
Firmware
\\
utility
\\
Boot_Release
\\
HaoJin_750TFT_HJYB-7500TFT_BV1.03_20240816.hex
IsMergeChangeAddress
=
false
MergeFlashOutPutFilePath
=
...
...
@@ -47,7 +47,7 @@ IsMergeCreateHex=false
MergeFlashIsCreateREC
=
false
TTFExtractTTFpath
=
MergeImageFilePath
=
IsMergeCreateUpdateBin
=
tru
e
IsMergeCreateUpdateBin
=
fals
e
MergeImageSize
=
128M
CRCFilePath
=
MergeFlashCompressionFormat
=
...
...
@@ -56,7 +56,7 @@ IsHexDisplay=true
MergeLineInXLSPath
=
MergeFlashInPutFilePath
=
MergeFlashIsInternal
=
false
MergeOutPutFilePath
=
D
\:\\\u9879\u
76EE
\\\u
8C6A
\u
8FDB
\\
haojin750TFT
\\
srec
MergeOutPutFilePath
=
D
\:\\\u9879\u
76EE
\\\u
8C6A
\u
8FDB
\\
haojin750TFT
\\
srec
-8.18
MergeAppFilePath
=
D
\:\\
git
\\
haojin750tft
\\
Firmware
\\
Project
\\
Cmsemicon
\\
BAT32A279
\\
MDK_ARM
\\
Objects
\\
HaoJin750TFT.hex
MergeTelltalesXLSPath
=
FillingByte
=
-86
...
...
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