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
9151cfb9
Commit
9151cfb9
authored
Jun 04, 2024
by
李俭双
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:依据规范变更,增加胎压学习的外发
parent
09513099
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
81 additions
and
3 deletions
+81
-3
CAN_CH0_CAN_Communication_Matrix.c
...ce/Application/CAN_APP/CAN_CH0_CAN_Communication_Matrix.c
+3
-0
CAN_CH0_CAN_Communication_Matrix.h
...ce/Application/CAN_APP/CAN_CH0_CAN_Communication_Matrix.h
+3
-0
Can_App.c
Firmware/Source/Application/CAN_User/Can_App.c
+39
-0
Can_App.h
Firmware/Source/Application/CAN_User/Can_App.h
+15
-0
Can_User.c
Firmware/Source/Application/CAN_User/Can_User.c
+17
-1
FaultCode.h
Firmware/Source/Application/FaultCode/FaultCode.h
+1
-1
PowerManag_user.c
Firmware/Source/Component/PowerManagement/PowerManag_user.c
+3
-1
No files found.
Firmware/Source/Application/CAN_APP/CAN_CH0_CAN_Communication_Matrix.c
View file @
9151cfb9
...
...
@@ -12,6 +12,9 @@ const st_CAN_SendAttribute CAN_CH0_CANSendAttr[CAN_CH0_ID_SEND_TOTAL] =
{
0x6EEul
,
100ul
*
1000ul
,
7ul
*
1000ul
,
0u
,
MSG_STD
,
1u
,
8u
,
CAN_MSG_TX_CYCLE
,
Can_Set_Buff_6EE
,
(
void
*
)
0
},
{
0x6EFul
,
100ul
*
1000ul
,
7ul
*
1000ul
,
0u
,
MSG_STD
,
1u
,
8u
,
CAN_MSG_TX_CYCLE
,
Can_Set_Buff_6EF
,
(
void
*
)
0
},
{
0x450ul
,
100ul
*
1000ul
,
7ul
*
1000ul
,
0u
,
MSG_STD
,
1u
,
8u
,
CAN_MSG_TX_CYCLE
,
Can_Set_Buff_450
,
(
void
*
)
0
},
#if (IC_Current == TY200_080000b_ty)
{
0x580ul
,
10ul
*
1000ul
,
7ul
*
1000ul
,
0u
,
MSG_STD
,
1u
,
8u
,
CAN_MSG_TX_CYCLE
,
Can_Set_Buff_580
,
(
void
*
)
0
},
#endif
};
const
st_CANMsgAttribute
CAN_CH0_CAN_MSG_CONST_ARRAY
[
CAN_CH0_ID_TOTAL_MAX
]
=
...
...
Firmware/Source/Application/CAN_APP/CAN_CH0_CAN_Communication_Matrix.h
View file @
9151cfb9
...
...
@@ -24,6 +24,9 @@ typedef enum
CAN_CH0_ID_CAN_0x6EE_Msg_Count
,
CAN_CH0_ID_CAN_0x6EF_Msg_Count
,
CAN_CH0_ID_CAN_0x450_Msg_Count
,
#if (IC_Current == TY200_080000b_ty)
CAN_CH0_ID_CAN_0x580_Msg_Count
,
#endif
CAN_CH0_ID_SEND_TOTAL
,
}
CAN_CH0_CAN_MSG_SEND_ID_t
;
...
...
Firmware/Source/Application/CAN_User/Can_App.c
View file @
9151cfb9
...
...
@@ -100,5 +100,44 @@ void Can_Set_Buff_450(canlib_uint8_t CopyData[])
p450
->
Sig
.
Rear_Pressure_TX_H
=
(
Get_Rear_TPMS_TX
()
>>
8
)
&
0xFF
;
p450
->
Sig
.
Rear_Pressure_TX_L
=
Get_Rear_TPMS_TX
()
&
0xFF
;
}
void
Can_Set_Buff_580
(
canlib_uint8_t
CopyData
[])
{
CANMsg580Union
*
p580
;
uint8_t
i
=
0
;
p580
=
(
CANMsg580Union
*
)
CopyData
;
if
(
p580
!=
(
void
*
)
0
)
{
for
(
i
=
0u
;
i
<
8u
;
i
++
)
{
p580
->
Msg
[
i
]
=
0xFFu
;
}
}
if
(
Get_Tpms_TX_Flag
()
==
1
)
{
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
;
}
else
if
(
Get_Tpms_TX_Flag
()
==
1
)
{
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
;
}
else
{
p580
->
Sig
.
TPMS_LEARN_CND_BYTE0
=
0x0
;
p580
->
Sig
.
TPMS_LEARN_CND_BYTE1
=
0x0
;
p580
->
Sig
.
TPMS_LEARN_CND_BYTE2
=
0x0
;
p580
->
Sig
.
TPMS_LEARN_CND_BYTE3
=
0x0
;
p580
->
Sig
.
TPMS_LEARN_CND_BYTE4
=
0x02
;
}
}
Firmware/Source/Application/CAN_User/Can_App.h
View file @
9151cfb9
...
...
@@ -89,6 +89,20 @@ typedef union
}
Sig
;
}
CANMsg450Union
;
typedef
union
{
uint8_t
Msg
[
8
];
struct
{
uint8_t
TPMS_LEARN_CND_BYTE0
:
8
;
uint8_t
TPMS_LEARN_CND_BYTE1
:
8
;
uint8_t
TPMS_LEARN_CND_BYTE2
:
8
;
uint8_t
TPMS_LEARN_CND_BYTE3
:
8
;
uint8_t
TPMS_LEARN_CND_BYTE4
:
8
;
uint32_t
Res1
:
24
;
}
Sig
;
}
CANMsg580Union
;
...
...
@@ -96,6 +110,7 @@ void Can_Set_Buff_220(canlib_uint8_t CopyData[]);
void
Can_Set_Buff_6EE
(
canlib_uint8_t
CopyData
[]);
void
Can_Set_Buff_6EF
(
canlib_uint8_t
CopyData
[]);
void
Can_Set_Buff_450
(
canlib_uint8_t
CopyData
[]);
void
Can_Set_Buff_580
(
canlib_uint8_t
CopyData
[]);
#endif
Firmware/Source/Application/CAN_User/Can_User.c
View file @
9151cfb9
...
...
@@ -173,6 +173,20 @@ void Can_Tx_Apply_Buff(void)
CAN_MessageCache_DeInit
(
CAN0MSG10
);
CAN_MessageCache_Init
(
CAN0MSG10
,
&
CAN_SendMsg
);
CAN_SendMsg
.
Id
=
0x580
;
CAN_SendMsg
.
IDE
=
CAN_Id_Standard
;
CAN_SendMsg
.
CacheType
=
CAN_CacheType_Tx
;
CAN_SendMsg
.
RTR
=
CAN_RTR_Data
;
CAN_RecvMsg
.
Interrupt
=
DISABLE
;
CAN_SendMsg
.
DLC
=
8
;
for
(
uint8_t
i
=
0
;
i
<
CAN_SendMsg
.
DLC
;
i
++
)
{
CAN_SendMsg
.
Data
[
i
]
=
0
;
}
CAN_MessageCache_DeInit
(
CAN0MSG14
);
CAN_MessageCache_Init
(
CAN0MSG14
,
&
CAN_SendMsg
);
CAN_SendMsg_Diag_Tx
.
Id
=
DIAG_ID_Tx
;
...
...
@@ -321,7 +335,9 @@ void Can_Write(st_CAN_Msg *Msg)
case
0x220
:
CAN_Transmit
(
CAN0MSG10
,
&
CAN_SendMsg
);
break
;
case
0x580
:
CAN_Transmit
(
CAN0MSG14
,
&
CAN_SendMsg
);
break
;
default:
break
;
}
...
...
Firmware/Source/Application/FaultCode/FaultCode.h
View file @
9151cfb9
Firmware/Source/Component/PowerManagement/PowerManag_user.c
View file @
9151cfb9
...
...
@@ -130,6 +130,7 @@ static void Power_Wakeup_Init(void)
TimerM_PWM_CH_Output_init
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
ActiveLevel_High
);
Telltales_Init
();
Telltales_UserInit
();
Data_TPMS_KL15_WAKE_UP_Init
();
RTE_DEEPSLEEP_GPIO_Interrupt_Enable
(
WAKEUP_KL15_In
,
Trigger_Rising
);
}
...
...
@@ -160,6 +161,7 @@ static void Power_IG_ON_Init(void)
MenuData_TCS_Init
();
Data_Coolant_Temp_KL15_Init
();
BlueTooth_KL30_KL15_Wakeup_Init
();
Data_TPMS_KL15_WAKE_UP_Init
();
CAN_TX_SetEnable
(
&
CAN_CH0_CanMsgTxOp
,
CAN_N_TX_Enable
);
}
...
...
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