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
d096fe49
Commit
d096fe49
authored
Aug 08, 2024
by
时昊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:修改gpio,里程存储正常
parent
29e8ea7b
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
56 additions
and
15 deletions
+56
-15
HaoJin750TFT.uvprojx
.../Project/Cmsemicon/BAT32A279/MDK_ARM/HaoJin750TFT.uvprojx
+2
-2
HaoJin750TFT.sct
...ject/Cmsemicon/BAT32A279/MDK_ARM/Objects/HaoJin750TFT.sct
+4
-4
userdefine.h
...BAT32A279/MDK_ARM/RTE/Device/BAT32A279KM64FB/userdefine.h
+1
-1
RTE_GPIO_BAT32A279.c
.../Device/Cmsemicon/BAT32A279/RTE/GPIO/RTE_GPIO_BAT32A279.c
+30
-8
RTE_GPIO_BAT32A279.h
.../Device/Cmsemicon/BAT32A279/RTE/GPIO/RTE_GPIO_BAT32A279.h
+16
-0
Sys_Task_List.c
Firmware/Source/System/Sys_Task_List.c
+3
-0
No files found.
Firmware/Project/Cmsemicon/BAT32A279/MDK_ARM/HaoJin750TFT.uvprojx
View file @
d096fe49
...
@@ -275,7 +275,7 @@
...
@@ -275,7 +275,7 @@
</OCR_RVCT3>
</OCR_RVCT3>
<OCR_RVCT4>
<OCR_RVCT4>
<Type>
1
</Type>
<Type>
1
</Type>
<StartAddress>
0x
c40
0
</StartAddress>
<StartAddress>
0x0
</StartAddress>
<Size>
0x73c00
</Size>
<Size>
0x73c00
</Size>
</OCR_RVCT4>
</OCR_RVCT4>
<OCR_RVCT5>
<OCR_RVCT5>
...
@@ -361,7 +361,7 @@
...
@@ -361,7 +361,7 @@
</VariousControls>
</VariousControls>
</Aads>
</Aads>
<LDads>
<LDads>
<umfTarg>
0
</umfTarg>
<umfTarg>
1
</umfTarg>
<Ropi>
0
</Ropi>
<Ropi>
0
</Ropi>
<Rwpi>
0
</Rwpi>
<Rwpi>
0
</Rwpi>
<noStLib>
0
</noStLib>
<noStLib>
0
</noStLib>
...
...
Firmware/Project/Cmsemicon/BAT32A279/MDK_ARM/Objects/HaoJin750TFT.sct
View file @
d096fe49
...
@@ -2,8 +2,8 @@
...
@@ -2,8 +2,8 @@
; *** Scatter-Loading Description File generated by uVision ***
; *** Scatter-Loading Description File generated by uVision ***
; *************************************************************
; *************************************************************
LR_IROM1 0x0000
C4
00 0x00073C00 { ; load region size_region
LR_IROM1 0x0000
00
00 0x00073C00 { ; load region size_region
ER_IROM1 0x0000
C4
00 0x00073C00 { ; load address = execution address
ER_IROM1 0x0000
00
00 0x00073C00 { ; load address = execution address
*.o (RESET, +First)
*.o (RESET, +First)
*(InRoot$$Sections)
*(InRoot$$Sections)
.ANY (+RO)
.ANY (+RO)
...
@@ -12,8 +12,8 @@ LR_IROM1 0x0000C400 0x00073C00 { ; load region size_region
...
@@ -12,8 +12,8 @@ LR_IROM1 0x0000C400 0x00073C00 { ; load region size_region
RW_IRAM1 0x20000000 0x0000FF00 { ; RW data
RW_IRAM1 0x20000000 0x0000FF00 { ; RW data
.ANY (+RW +ZI)
.ANY (+RW +ZI)
}
}
RW_IRAM2 0x2000FF00 0x00000100 {
; RW data
RW_IRAM2 0x2000FF00 0x00000100 {
.ANY (
RW_FUNC_PLL
)
.ANY (
+RW +ZI
)
}
}
}
}
Firmware/Project/Cmsemicon/BAT32A279/MDK_ARM/RTE/Device/BAT32A279KM64FB/userdefine.h
View file @
d096fe49
...
@@ -20,7 +20,7 @@ User definitions
...
@@ -20,7 +20,7 @@ User definitions
typedef
unsigned
short
MD_STATUS
;
typedef
unsigned
short
MD_STATUS
;
#define HAS_BOOTLOADER (
1
u) // 仅仿真App时设置为0
#define HAS_BOOTLOADER (
0
u) // 仅仿真App时设置为0
#define APP_BASE (0x0000C400ul)
#define APP_BASE (0x0000C400ul)
/* Status list definition */
/* Status list definition */
...
...
Firmware/Source/Device/Cmsemicon/BAT32A279/RTE/GPIO/RTE_GPIO_BAT32A279.c
View file @
d096fe49
...
@@ -22,6 +22,7 @@ void EXTI8_IRQHandler(void *msg);
...
@@ -22,6 +22,7 @@ void EXTI8_IRQHandler(void *msg);
void
EXTI9_IRQHandler
(
void
*
msg
);
void
EXTI9_IRQHandler
(
void
*
msg
);
void
EXTI10_IRQHandler
(
void
*
msg
);
void
EXTI10_IRQHandler
(
void
*
msg
);
void
EXTI11_IRQHandler
(
void
*
msg
);
void
EXTI11_IRQHandler
(
void
*
msg
);
void
EXTI17_IRQHandler
(
void
*
msg
);
typedef
enum
{
typedef
enum
{
INTP0_Channel
=
0x0001
,
INTP0_Channel
=
0x0001
,
...
@@ -75,6 +76,7 @@ const RTE_GPIO_INTP_Table_st_t INTP_Table[] =
...
@@ -75,6 +76,7 @@ const RTE_GPIO_INTP_Table_st_t INTP_Table[] =
{
RTE_GPIO_PORT07_PIN07
,
GPIO_P77
,
GROUP_AF_INTP11
,
INTP11_IRQn
,
INTP11_Channel
,
(
void
*
)
EXTI11_IRQHandler
},
{
RTE_GPIO_PORT07_PIN07
,
GPIO_P77
,
GROUP_AF_INTP11
,
INTP11_IRQn
,
INTP11_Channel
,
(
void
*
)
EXTI11_IRQHandler
},
{
RTE_GPIO_PORT13_PIN06
,
GPIO_P136
,
GROUP_AF_ODEFAULT
,
INTP0_IRQn
,
INTP0_Channel
,
(
void
*
)
EXTI0_IRQHandler
},
{
RTE_GPIO_PORT13_PIN06
,
GPIO_P136
,
GROUP_AF_ODEFAULT
,
INTP0_IRQn
,
INTP0_Channel
,
(
void
*
)
EXTI0_IRQHandler
},
{
RTE_GPIO_PORT14_PIN06
,
GPIO_P146
,
GROUP_AF_INTP4
,
INTP4_IRQn
,
INTP4_Channel
,
(
void
*
)
EXTI4_IRQHandler
},
{
RTE_GPIO_PORT14_PIN06
,
GPIO_P146
,
GROUP_AF_INTP4
,
INTP4_IRQn
,
INTP4_Channel
,
(
void
*
)
EXTI4_IRQHandler
},
{
RTE_GPIO_PORT00_PIN00
,
GPIO_P00
,
GROUP_AF_ODEFAULT
,
TM00_IRQn
,
INTP4_Channel
,
(
void
*
)
EXTI17_IRQHandler
},
};
};
...
@@ -202,7 +204,7 @@ int32_t RTE_GPIO_Config(uint16_t u16Pin, uint8_t u8Mode)
...
@@ -202,7 +204,7 @@ int32_t RTE_GPIO_Config(uint16_t u16Pin, uint8_t u8Mode)
if
((
u8Mode
&
RTE_GPIO_DIR_MASK
)
==
RTE_GPIO_DIR_IN
)
if
((
u8Mode
&
RTE_GPIO_DIR_MASK
)
==
RTE_GPIO_DIR_IN
)
{
{
stInit
.
GPIO_Mode
=
(
GPIOMode_TypeDef
)
1U
;
//IN
stInit
.
GPIO_Mode
=
GPIO_Mode_IN
;
//IN
if
((
u8Mode
&
RTE_GPIO_PULL_MASK
)
==
RTE_GPIO_PULL_UP
)
if
((
u8Mode
&
RTE_GPIO_PULL_MASK
)
==
RTE_GPIO_PULL_UP
)
{
{
stInit
.
GPIO_PuPd
=
(
GPIOPuPd_TypeDef
)
RTE_GPIO_PULL_UP
;
stInit
.
GPIO_PuPd
=
(
GPIOPuPd_TypeDef
)
RTE_GPIO_PULL_UP
;
...
@@ -252,7 +254,7 @@ int32_t RTE_GPIO_Config(uint16_t u16Pin, uint8_t u8Mode)
...
@@ -252,7 +254,7 @@ int32_t RTE_GPIO_Config(uint16_t u16Pin, uint8_t u8Mode)
stInit
.
GPIO_Level
=
GPIO_Level_HIGH
;
stInit
.
GPIO_Level
=
GPIO_Level_HIGH
;
}
}
GPIO_Init
(
RTE_GPIO_Port_Get
(
u16PortIndex
)
,
&
stInit
);
GPIO_Init
(
(
GPIO_Port_t
)
u16PortIndex
,
&
stInit
);
}
}
i32Result
=
0
;
i32Result
=
0
;
...
@@ -325,9 +327,9 @@ int32_t RTE_GPIO_Set_Level(uint16_t u16Pin, uint8_t u8Level)
...
@@ -325,9 +327,9 @@ int32_t RTE_GPIO_Set_Level(uint16_t u16Pin, uint8_t u8Level)
u16PinIndex
=
1
<<
u16PinIndex
;
u16PinIndex
=
1
<<
u16PinIndex
;
if
(
u8Level
==
0
)
if
(
u8Level
==
0
)
{
GPIO_ResetBits
(
RTE_GPIO_Port_Get
(
u16PortIndex
)
,
u16PinIndex
);}
{
GPIO_ResetBits
(
(
GPIO_Port_t
)
u16PortIndex
,
u16PinIndex
);}
else
else
{
GPIO_SetBits
(
RTE_GPIO_Port_Get
(
u16PortIndex
)
,
u16PinIndex
);}
{
GPIO_SetBits
(
(
GPIO_Port_t
)
u16PortIndex
,
u16PinIndex
);}
i32Result
=
0
;
i32Result
=
0
;
}
}
...
@@ -534,7 +536,6 @@ int32_t RTE_GPIO_Interrupt_Enable(RTE_GPIO_IRQ_Desc_st_t *pstIRQDesc)
...
@@ -534,7 +536,6 @@ int32_t RTE_GPIO_Interrupt_Enable(RTE_GPIO_IRQ_Desc_st_t *pstIRQDesc)
uint16_t
u16PortIndex
;
uint16_t
u16PortIndex
;
uint16_t
u16PinIndex
;
uint16_t
u16PinIndex
;
INTP_InitTypeDef
stEXTICfg
;
INTP_InitTypeDef
stEXTICfg
;
GPIO_InitTypeDef
GPIO_InitStruct
;
i32Result
=
-
1
;
i32Result
=
-
1
;
if
(
pstIRQDesc
!=
NULL
)
if
(
pstIRQDesc
!=
NULL
)
...
@@ -553,11 +554,11 @@ int32_t RTE_GPIO_Interrupt_Enable(RTE_GPIO_IRQ_Desc_st_t *pstIRQDesc)
...
@@ -553,11 +554,11 @@ int32_t RTE_GPIO_Interrupt_Enable(RTE_GPIO_IRQ_Desc_st_t *pstIRQDesc)
break
;
break
;
}
}
}
}
GPIO_PinAFConfig
(
RTE_GPIO_Port_Get
(
u16PortIndex
)
,
1
<<
u16PinIndex
,
INTP_Table
[
u8Index
].
PinSource
,
INTP_Table
[
u8Index
].
u16AFt
);
GPIO_PinAFConfig
(
(
GPIO_Port_t
)
u16PortIndex
,
1
<<
u16PinIndex
,
INTP_Table
[
u8Index
].
PinSource
,
INTP_Table
[
u8Index
].
u16AFt
);
INTP_Stop
(
INTP_Table
[
u8Index
].
INTP_Channel
);
/* 修改前先确保中断是已禁用状�? */
INTP_Stop
(
INTP_Table
[
u8Index
].
INTP_Channel
);
/* 修改前先确保中断是已禁用状�? */
stEXTICfg
.
INTP_Select
=
(
uint16_t
)
INTP_Table
[
u8Index
].
INTP_Channel
;
stEXTICfg
.
INTP_Select
=
INTP_Table
[
u8Index
].
INTP_Channel
;
stEXTICfg
.
EXTI_Trigger
=
pstIRQDesc
->
u16Type
;
stEXTICfg
.
EXTI_Trigger
=
pstIRQDesc
->
u16Type
;
pstIRQDesc
->
i32Flag
=
0
;
pstIRQDesc
->
i32Flag
=
0
;
...
@@ -597,7 +598,6 @@ int32_t RTE_GPIO_Interrupt_Disable(RTE_GPIO_IRQ_Desc_st_t *pstIRQDesc)
...
@@ -597,7 +598,6 @@ int32_t RTE_GPIO_Interrupt_Disable(RTE_GPIO_IRQ_Desc_st_t *pstIRQDesc)
int32_t
i32Result
;
int32_t
i32Result
;
uint16_t
u16PortIndex
;
uint16_t
u16PortIndex
;
uint16_t
u16PinIndex
;
uint16_t
u16PinIndex
;
////uint32_t u32Active;
INTP_InitTypeDef
stEXTICfg
;
INTP_InitTypeDef
stEXTICfg
;
i32Result
=
-
1
;
i32Result
=
-
1
;
...
@@ -1017,6 +1017,28 @@ void EXTI11_IRQHandler(void *msg)
...
@@ -1017,6 +1017,28 @@ void EXTI11_IRQHandler(void *msg)
}
}
void
EXTI17_IRQHandler
(
void
*
msg
)
{
uint8_t
u8Level
;
RTE_GPIO_IRQ_Desc_st_t
*
pstDesc
;
RTE_GPIO_Int_Handler_Func_ptr_t
pfnIRQHandler
;
/* 清除中断标志 */
INTC_ClearPendingIRQ
(
TM00_IRQn
);
/* 读取中断发生时端口的电平并执行回调函�??? */
pstDesc
=
g_pstRTEGPIOIRQDesc
[
4
];
if
(
pstDesc
!=
NULL
)
{
u8Level
=
RTE_GPIO_Get_Level
(
pstDesc
->
u16Pin
);
pstDesc
->
i32Flag
=
1
;
if
(
pstDesc
->
pvHandler
!=
NULL
)
{
pfnIRQHandler
=
(
RTE_GPIO_Int_Handler_Func_ptr_t
)(
pstDesc
->
pvHandler
);
pfnIRQHandler
(
pstDesc
->
u16Pin
,
u8Level
);
}
}
}
GPIO_Port_t
RTE_GPIO_Port_Get
(
uint16_t
u16PortIndex
)
GPIO_Port_t
RTE_GPIO_Port_Get
(
uint16_t
u16PortIndex
)
{
{
GPIO_Port_t
enGPIO_Port
;
GPIO_Port_t
enGPIO_Port
;
...
...
Firmware/Source/Device/Cmsemicon/BAT32A279/RTE/GPIO/RTE_GPIO_BAT32A279.h
View file @
d096fe49
...
@@ -37,6 +37,15 @@ typedef struct
...
@@ -37,6 +37,15 @@ typedef struct
#define RTE_GPIO_PIN_NUM_05 (0x05U)
#define RTE_GPIO_PIN_NUM_05 (0x05U)
#define RTE_GPIO_PIN_NUM_06 (0x06U)
#define RTE_GPIO_PIN_NUM_06 (0x06U)
#define RTE_GPIO_PIN_NUM_07 (0x07U)
#define RTE_GPIO_PIN_NUM_07 (0x07U)
#define RTE_GPIO_PIN_NUM_09 (0x09U)
#define RTE_GPIO_PIN_NUM_010 (0x10U)
#define RTE_GPIO_PIN_NUM_012 (0x12U)
#define RTE_GPIO_PIN_NUM_023 (0x23U)
#define RTE_GPIO_PIN_NUM_015 (0x15U)
#define RTE_GPIO_PIN_NUM_021 (0x21U)
#define RTE_GPIO_PIN_NUM_022 (0x22U)
#define RTE_GPIO_PORT00_PIN00 (((uint16_t)RTE_GPIO_PORT_GROUP_00 << 8) | (uint16_t)RTE_GPIO_PIN_NUM_00)
#define RTE_GPIO_PORT00_PIN00 (((uint16_t)RTE_GPIO_PORT_GROUP_00 << 8) | (uint16_t)RTE_GPIO_PIN_NUM_00)
#define RTE_GPIO_PORT00_PIN01 (((uint16_t)RTE_GPIO_PORT_GROUP_00 << 8) | (uint16_t)RTE_GPIO_PIN_NUM_01)
#define RTE_GPIO_PORT00_PIN01 (((uint16_t)RTE_GPIO_PORT_GROUP_00 << 8) | (uint16_t)RTE_GPIO_PIN_NUM_01)
...
@@ -45,6 +54,13 @@ typedef struct
...
@@ -45,6 +54,13 @@ typedef struct
#define RTE_GPIO_PORT00_PIN04 (((uint16_t)RTE_GPIO_PORT_GROUP_00 << 8) | (uint16_t)RTE_GPIO_PIN_NUM_04)
#define RTE_GPIO_PORT00_PIN04 (((uint16_t)RTE_GPIO_PORT_GROUP_00 << 8) | (uint16_t)RTE_GPIO_PIN_NUM_04)
#define RTE_GPIO_PORT00_PIN05 (((uint16_t)RTE_GPIO_PORT_GROUP_00 << 8) | (uint16_t)RTE_GPIO_PIN_NUM_05)
#define RTE_GPIO_PORT00_PIN05 (((uint16_t)RTE_GPIO_PORT_GROUP_00 << 8) | (uint16_t)RTE_GPIO_PIN_NUM_05)
#define RTE_GPIO_PORT00_PIN06 (((uint16_t)RTE_GPIO_PORT_GROUP_00 << 8) | (uint16_t)RTE_GPIO_PIN_NUM_06)
#define RTE_GPIO_PORT00_PIN06 (((uint16_t)RTE_GPIO_PORT_GROUP_00 << 8) | (uint16_t)RTE_GPIO_PIN_NUM_06)
#define RTE_GPIO_PORT00_PIN09 (((uint16_t)RTE_GPIO_PORT_GROUP_00 << 8) | (uint16_t)RTE_GPIO_PIN_NUM_09)
#define RTE_GPIO_PORT00_PIN10 (((uint16_t)RTE_GPIO_PORT_GROUP_00 << 8) | (uint16_t)RTE_GPIO_PIN_NUM_010)
#define RTE_GPIO_PORT00_PIN12 (((uint16_t)RTE_GPIO_PORT_GROUP_00 << 8) | (uint16_t)RTE_GPIO_PIN_NUM_012)
#define RTE_GPIO_PORT00_PIN15 (((uint16_t)RTE_GPIO_PORT_GROUP_00 << 8) | (uint16_t)RTE_GPIO_PIN_NUM_015)
#define RTE_GPIO_PORT00_PIN23 (((uint16_t)RTE_GPIO_PORT_GROUP_00 << 8) | (uint16_t)RTE_GPIO_PIN_NUM_023)
#define RTE_GPIO_PORT00_PIN22 (((uint16_t)RTE_GPIO_PORT_GROUP_00 << 8) | (uint16_t)RTE_GPIO_PIN_NUM_022)
#define RTE_GPIO_PORT00_PIN21 (((uint16_t)RTE_GPIO_PORT_GROUP_00 << 8) | (uint16_t)RTE_GPIO_PIN_NUM_021)
#define RTE_GPIO_PORT01_PIN00 (((uint16_t)RTE_GPIO_PORT_GROUP_01 << 8) | (uint16_t)RTE_GPIO_PIN_NUM_00)
#define RTE_GPIO_PORT01_PIN00 (((uint16_t)RTE_GPIO_PORT_GROUP_01 << 8) | (uint16_t)RTE_GPIO_PIN_NUM_00)
#define RTE_GPIO_PORT01_PIN01 (((uint16_t)RTE_GPIO_PORT_GROUP_01 << 8) | (uint16_t)RTE_GPIO_PIN_NUM_01)
#define RTE_GPIO_PORT01_PIN01 (((uint16_t)RTE_GPIO_PORT_GROUP_01 << 8) | (uint16_t)RTE_GPIO_PIN_NUM_01)
...
...
Firmware/Source/System/Sys_Task_List.c
View file @
d096fe49
...
@@ -70,11 +70,14 @@ uint32_t aaa = 0;
...
@@ -70,11 +70,14 @@ uint32_t aaa = 0;
void
Sys_100ms_Tasks
(
void
)
void
Sys_100ms_Tasks
(
void
)
{
{
ODOtest
=
Data_ODO_Read
();
Triptest
=
Data_Read_Trip
(
0
);
S3_ServerCNTT
();
S3_ServerCNTT
();
Get_DisTime_Service
();
Get_DisTime_Service
();
Fuel_Cal_Sevice
(
100u
);
Fuel_Cal_Sevice
(
100u
);
Coolant_Cal_Sevice
(
100u
);
Coolant_Cal_Sevice
(
100u
);
Services_Mileage_Callback
();
Services_Mileage_Callback
();
//Data_Mileage_Clear();
RTE_GPIO_Config
(
RTE_GPIO_PORT05_PIN04
,
GpioOut_High
);
RTE_GPIO_Config
(
RTE_GPIO_PORT05_PIN04
,
GpioOut_High
);
...
...
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