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
ab10570e
Commit
ab10570e
authored
Aug 15, 2024
by
高士达
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'CHENJIALE' into 'dev'
Chenjiale See merge request
!66
parents
4e6b837e
86f6245d
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
82 additions
and
33 deletions
+82
-33
TianYing.sct
.../Project/Cmsemicon/BAT32A239/MDK_ARM/Objects/TianYing.sct
+2
-2
CAN_CH0_CAN_Communication_Matrix.c
...ce/Application/CAN_APP/CAN_CH0_CAN_Communication_Matrix.c
+1
-1
Can_App.c
Firmware/Source/Application/CAN_User/Can_App.c
+27
-12
Can_User.c
Firmware/Source/Application/CAN_User/Can_User.c
+17
-3
eeManager_Interface.c
Firmware/Source/Component/Eeprom/eeManager_Interface.c
+6
-6
Service_Interval.c
...ware/Source/Component/Service_Interval/Service_Interval.c
+29
-9
No files found.
Firmware/Project/Cmsemicon/BAT32A239/MDK_ARM/Objects/TianYing.sct
View file @
ab10570e
...
...
@@ -2,8 +2,8 @@
; *** Scatter-Loading Description File generated by uVision ***
; *************************************************************
LR_IROM1 0x0000
0
000 0x00040000 { ; load region size_region
ER_IROM1 0x0000
0
000 0x00040000 { ; load address = execution address
LR_IROM1 0x0000
8
000 0x00040000 { ; load region size_region
ER_IROM1 0x0000
8
000 0x00040000 { ; load address = execution address
*.o (RESET, +First)
*(InRoot$$Sections)
.ANY (+RO)
...
...
Firmware/Source/Application/CAN_APP/CAN_CH0_CAN_Communication_Matrix.c
View file @
ab10570e
...
...
@@ -13,7 +13,7 @@ const st_CAN_SendAttribute CAN_CH0_CANSendAttr[CAN_CH0_ID_SEND_TOTAL] =
{
0x6EFul
,
100ul
*
1000ul
,
97ul
*
1000ul
,
0u
,
MSG_STD
,
3u
,
8u
,
CAN_MSG_TX_CYCLE
,
Can_Set_Buff_6EF
,
(
void
*
)
0
},
{
0x450ul
,
100ul
*
1000ul
,
96ul
*
1000ul
,
0u
,
MSG_STD
,
4u
,
8u
,
CAN_MSG_TX_CYCLE
,
Can_Set_Buff_450
,
(
void
*
)
0
},
#if (IC_Current == TY200_080000b_ty)
{
0x580ul
,
8ul
*
1000ul
,
0ul
*
1000ul
,
0u
,
MSG_STD
,
1u
,
8u
,
CAN_MSG_TX_CYCLE
,
Can_Set_Buff_580
,
(
void
*
)
0
},
{
0x580ul
,
40ul
*
1000ul
,
0ul
*
1000ul
,
0u
,
MSG_STD
,
1u
,
8u
,
CAN_MSG_TX_CYCKE_EVENT
,
Can_Set_Buff_580
,
(
void
*
)
0
},
#endif
};
...
...
Firmware/Source/Application/CAN_User/Can_App.c
View file @
ab10570e
...
...
@@ -158,7 +158,7 @@ void Can_Set_Buff_450(canlib_uint8_t CopyData[])
}
}
//uint8_t Can_580Send_flag = 0;
void
Can_Set_Buff_580
(
canlib_uint8_t
CopyData
[])
{
CANMsg580Union
*
p580
;
...
...
@@ -174,33 +174,48 @@ void Can_Set_Buff_580(canlib_uint8_t CopyData[])
if
(
Get_Tpms_TX_Flag
()
==
1
)
{
if
(
++
CAN_TX_Count
>
3
)
{
Tpms_TX_Flag
=
0
;
CAN_TX_Count
=
0
;
}
//Can_580Send_flag = 1;
//if(CAN_TX_Count++ > 2)
//{
// Tpms_TX_Flag = 0;
// CAN_TX_Count = 0;
// //Can_580Send_flag = 0;
//}
p580
->
Sig
.
TPMS_LEARN_CND_BYTE0
=
0x31
;
p580
->
Sig
.
TPMS_LEARN_CND_BYTE1
=
0x01
;
p580
->
Sig
.
TPMS_LEARN_CND_BYTE2
=
0x59
;
p580
->
Sig
.
TPMS_LEARN_CND_BYTE3
=
0x08
;
p580
->
Sig
.
TPMS_LEARN_CND_BYTE4
=
0x00
;
//if(Can_580Send_flag == 0)
//{
// Can_580Send_flag = 1;
// CAN_TX_Count++;
//}
}
else
if
(
Get_Tpms_TX_Flag
()
==
2
)
{
if
(
++
CAN_TX_Count
>
3
)
{
Tpms_TX_Flag
=
0
;
CAN_TX_Count
=
0
;
}
//Can_580Send_flag = 1;
//if(CAN_TX_Count++ > 2)
//{
// Tpms_TX_Flag = 0;
// CAN_TX_Count = 0;
// //Can_580Send_flag = 0;
//}
p580
->
Sig
.
TPMS_LEARN_CND_BYTE0
=
0x31
;
p580
->
Sig
.
TPMS_LEARN_CND_BYTE1
=
0x01
;
p580
->
Sig
.
TPMS_LEARN_CND_BYTE2
=
0x59
;
p580
->
Sig
.
TPMS_LEARN_CND_BYTE3
=
0x08
;
p580
->
Sig
.
TPMS_LEARN_CND_BYTE4
=
0x01
;
//if(Can_580Send_flag == 0)
//{
// Can_580Send_flag = 1;
// CAN_TX_Count++;
//}
}
else
{
CAN_TX_Count
=
0
;
//Can_580Send_flag = 0;
//CAN_TX_Count = 0;
//p580 -> Sig.TPMS_LEARN_CND_BYTE0 = 0x0;
//p580 -> Sig.TPMS_LEARN_CND_BYTE1 = 0x0;
//p580 -> Sig.TPMS_LEARN_CND_BYTE2 = 0x0;
...
...
Firmware/Source/Application/CAN_User/Can_User.c
View file @
ab10570e
...
...
@@ -326,7 +326,11 @@ uint8_t Get_Busoff_Status(void)
{
return
get_can_busoff
(
CAN_CH_0
);
}
extern
uint8_t
Can_341_Flg
;
//extern uint8_t Can_341_Flg;
//extern uint8_t Can_580Send_flag;
uint8_t
CAN_Send_Cound
=
0
;
extern
uint8_t
Tpms_TX_Flag
;
uint8_t
COM_APP_Process
(
st_CAN_Msg
*
Msg
)
{
// Can_Write((st_CAN_Msg *)Msg);
...
...
@@ -376,12 +380,22 @@ uint8_t COM_APP_Process(st_CAN_Msg *Msg)
{
AliveCountTimer
=
0
;
}
break
;
break
;
#if (IC_Current == TY200_080000b_ty)
case
0x580
:
if
(
Get_Tpms_TX_Flag
()
!=
0
)
{
CAN_result
=
CAN_Transmit
(
CAN0MSG14
,
&
CAN_SendMsg
);
if
(
CAN_Send_Cound
++
<=
2
)
{
CAN_result
=
CAN_Transmit
(
CAN0MSG14
,
&
CAN_SendMsg
);
}
else
{
CAN_Send_Cound
=
0
;
Tpms_TX_Flag
=
0
;
}
//Can_580Send_flag = 0;
}
break
;
...
...
Firmware/Source/Component/Eeprom/eeManager_Interface.c
View file @
ab10570e
...
...
@@ -62,7 +62,7 @@ void EE_SDA_InConfig(void)
--------------------------------------------------------------------------*/
void
EE_SDA_OutConfig
(
void
)
{
RTE_GPIO_Config
(
EE_SDA
,
RTE_GPIO_
OUTPUT_OD
);
RTE_GPIO_Config
(
EE_SDA
,
RTE_GPIO_
DIR_OUT
);
}
/*-------------------------------------------------------------------------
* Function Name : EE_SDA_GetValue
...
...
@@ -89,8 +89,8 @@ ee_uint8_t EE_SDA_GetValue(void)
--------------------------------------------------------------------------*/
void
EE_SDA_OUT
(
ee_uint8_t
data
)
{
RTE_GPIO_Config
(
EE_SDA
,
RTE_GPIO_DIR_OUT
|
data
);
//
RTE_GPIO_Set_Level(EE_SDA, data);
//
RTE_GPIO_Config(EE_SDA, RTE_GPIO_DIR_OUT | data);
RTE_GPIO_Set_Level
(
EE_SDA
,
data
);
}
/*-------------------------------------------------------------------------
...
...
@@ -103,7 +103,7 @@ void EE_SDA_OUT(ee_uint8_t data)
--------------------------------------------------------------------------*/
void
EE_SCL_OutConfig
(
void
)
{
RTE_GPIO_Config
(
EE_SCL
,
RTE_GPIO_
OUTPUT_OD
);
RTE_GPIO_Config
(
EE_SCL
,
RTE_GPIO_
DIR_OUT
);
}
/*-------------------------------------------------------------------------
* Function Name : EE_SCL_OUT
...
...
@@ -115,8 +115,8 @@ void EE_SCL_OutConfig(void)
--------------------------------------------------------------------------*/
void
EE_SCL_OUT
(
ee_uint8_t
data
)
{
RTE_GPIO_Config
(
EE_SCL
,
RTE_GPIO_DIR_OUT
|
data
);
//
RTE_GPIO_Set_Level(EE_SCL, data);
//
RTE_GPIO_Config(EE_SCL, RTE_GPIO_DIR_OUT | data);
RTE_GPIO_Set_Level
(
EE_SCL
,
data
);
}
/*-------------------------------------------------------------------------
...
...
Firmware/Source/Component/Service_Interval/Service_Interval.c
View file @
ab10570e
...
...
@@ -276,16 +276,17 @@ void Service_Interval_TimerSleepFix(Intlib_uint32_t FixTimer)
void
Service_Interval_SetKm
(
Intlib_uint32_t
IntervalKm
)
{
DataIntervalSave_t
DataIntervalSave
;
if
(
g_IntervalCalc
!=
Intlib_NULL
)
DataIntervalSave_t
ReadDataIntervalSave
;
Intlib_uint8_t
u8Errcount
=
0
;
if
(
g_IntervalCalc
!=
Intlib_NULL
)
{
g_IntervalCalc
->
Interval100m
=
IntervalKm
*
10
;
g_IntervalCalc
->
MilAfterReset
=
g_ReadODO_Cbk
(
);
g_IntervalCalc
->
Interval100m
=
IntervalKm
*
10
;
g_IntervalCalc
->
MilAfterReset
=
g_ReadODO_Cbk
();
DataIntervalSave
.
Flag
=
0x7887A55A
;
DataIntervalSave
.
Interval100m
=
g_IntervalCalc
->
Interval100m
;
DataIntervalSave
.
Flag
=
0x7887A55A
;
DataIntervalSave
.
Interval100m
=
g_IntervalCalc
->
Interval100m
;
DataIntervalSave
.
MilAfterReset
=
g_IntervalCalc
->
MilAfterReset
;
if
(
g_IntervalCalc
->
IntervalDayEnable
)
if
(
g_IntervalCalc
->
IntervalDayEnable
)
{
DataIntervalSave
.
Interval1s
=
g_IntervalCalc
->
Interval1s
;
DataIntervalSave
.
TotalTimer
=
g_IntervalCalc
->
CurTimer_1s
;
...
...
@@ -296,9 +297,28 @@ void Service_Interval_SetKm(Intlib_uint32_t IntervalKm)
DataIntervalSave
.
TotalTimer
=
0u
;
}
if
(
g_EEPromWrite_Cbk
!=
Intlib_NULL
)
while
(
u8Errcount
<
3
)
{
g_EEPromWrite_Cbk
((
Intlib_uint32_t
*
)
&
DataIntervalSave
,
sizeof
(
DataIntervalSave_t
)
/
4
);
if
(
g_EEPromWrite_Cbk
!=
Intlib_NULL
)
{
g_EEPromWrite_Cbk
((
Intlib_uint32_t
*
)
&
DataIntervalSave
,
sizeof
(
DataIntervalSave_t
)
/
4
);
}
if
(
g_EEPromRead_Cbk
!=
Intlib_NULL
)
{
g_EEPromRead_Cbk
((
Intlib_uint32_t
*
)
&
ReadDataIntervalSave
,
sizeof
(
DataIntervalSave_t
)
/
4
);
}
if
(
memcmp
(
&
DataIntervalSave
,
&
ReadDataIntervalSave
,
sizeof
(
DataIntervalSave_t
))
==
0
)
{
break
;
}
u8Errcount
++
;
if
(
u8Errcount
>=
3
)
{
break
;
}
Gen_TimeDelay
(
10
*
1000u
,
50u
);
}
}
}
...
...
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