Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
RT_RMR42E
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
时昊
RT_RMR42E
Commits
a1b18ac3
Commit
a1b18ac3
authored
Feb 16, 2025
by
李冠华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:新增报文0x220和相关信号,增加混动车电源状态逻辑
parent
2ede2ca0
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
71 additions
and
31 deletions
+71
-31
CAN_CH0_CAN_Communication_Matrix.c
...ce/Application/CAN_APP/CAN_CH0_CAN_Communication_Matrix.c
+19
-0
CAN_CH0_CAN_Communication_Matrix.h
...ce/Application/CAN_APP/CAN_CH0_CAN_Communication_Matrix.h
+3
-0
Can_RX_User.c
Firmware/Source/Application/CAN_User/Can_RX_User.c
+49
-31
No files found.
Firmware/Source/Application/CAN_APP/CAN_CH0_CAN_Communication_Matrix.c
View file @
a1b18ac3
...
@@ -135,6 +135,17 @@ const st_CANMsgAttribute CAN_CH0_CAN_MSG_CONST_ARRAY[CAN_CH0_ID_TOTAL_MAX] =
...
@@ -135,6 +135,17 @@ const st_CANMsgAttribute CAN_CH0_CAN_MSG_CONST_ARRAY[CAN_CH0_ID_TOTAL_MAX] =
((
void
*
)
0
),
((
void
*
)
0
),
((
void
*
)
0
),
((
void
*
)
0
),
},
},
/*以下新增报文待矩阵更新后按要求修改*/
{
{
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
},
{
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
},
{
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
},
500ul
,
0x220ul
,
((
void
*
)
0
),
((
void
*
)
0
),
((
void
*
)
0
),
},
};
};
void
System_Indicator_ON_callback
(
canlib_uint8_t
CopyData
[])
void
System_Indicator_ON_callback
(
canlib_uint8_t
CopyData
[])
{
{
...
@@ -350,6 +361,11 @@ uint8_t Get_CAN_CH0_ID_134_Sig_SMCU_ErrorGrage(void)
...
@@ -350,6 +361,11 @@ uint8_t Get_CAN_CH0_ID_134_Sig_SMCU_ErrorGrage(void)
return
(((
uint8_t
)((
uint8_t
)
CAN_MSG_Read
(
CAN_CH0
,
CAN_CH0_ID_CAN_0x134_Msg_Count
,
2u
)
>>
0u
)
&
0x07u
));
return
(((
uint8_t
)((
uint8_t
)
CAN_MSG_Read
(
CAN_CH0
,
CAN_CH0_ID_CAN_0x134_Msg_Count
,
2u
)
>>
0u
)
&
0x07u
));
}
}
uint8_t
Get_CAN_CH0_ID_220_Sig_VCU_KeySts
(
void
)
{
return
(((
uint8_t
)((
uint8_t
)
CAN_MSG_Read
(
CAN_CH0
,
CAN_CH0_ID_CAN_0x220_Msg_Count
,
2u
)
>>
0u
)
&
0x07u
));
}
uint8_t
Co_Can_ConvertSubID_CAN_CH0
(
uint32_t
MsgID
)
uint8_t
Co_Can_ConvertSubID_CAN_CH0
(
uint32_t
MsgID
)
{
{
uint8_t
u8Result
=
CAN_CH0_ID_TOTAL_MAX
;
uint8_t
u8Result
=
CAN_CH0_ID_TOTAL_MAX
;
...
@@ -391,6 +407,9 @@ uint8_t Co_Can_ConvertSubID_CAN_CH0(uint32_t MsgID)
...
@@ -391,6 +407,9 @@ uint8_t Co_Can_ConvertSubID_CAN_CH0(uint32_t MsgID)
case
CAN_CH0_ID_CAN_0x134_Msg
:
case
CAN_CH0_ID_CAN_0x134_Msg
:
u8Result
=
CAN_CH0_ID_CAN_0x134_Msg_Count
;
u8Result
=
CAN_CH0_ID_CAN_0x134_Msg_Count
;
break
;
break
;
case
CAN_CH0_ID_CAN_0x220_Msg
:
u8Result
=
CAN_CH0_ID_CAN_0x220_Msg_Count
;
break
;
default:
default:
u8Result
=
CAN_CH0_ID_TOTAL_MAX
;
u8Result
=
CAN_CH0_ID_TOTAL_MAX
;
break
;
break
;
...
...
Firmware/Source/Application/CAN_APP/CAN_CH0_CAN_Communication_Matrix.h
View file @
a1b18ac3
...
@@ -23,6 +23,7 @@ typedef enum
...
@@ -23,6 +23,7 @@ typedef enum
CAN_CH0_ID_CAN_0x339_Msg_Count
,
CAN_CH0_ID_CAN_0x339_Msg_Count
,
CAN_CH0_ID_CAN_0x18200A21_Msg_Count
,
CAN_CH0_ID_CAN_0x18200A21_Msg_Count
,
CAN_CH0_ID_CAN_0x134_Msg_Count
,
CAN_CH0_ID_CAN_0x134_Msg_Count
,
CAN_CH0_ID_CAN_0x220_Msg_Count
,
CAN_CH0_ID_TOTAL_MAX
,
CAN_CH0_ID_TOTAL_MAX
,
}
CAN_CH0_CAN_MSG_ID_t
;
}
CAN_CH0_CAN_MSG_ID_t
;
...
@@ -63,6 +64,7 @@ extern const st_CAN_SendAttribute CAN_CH0_CANSendAttr[CAN_CH0_ID_SEND_TOTAL]
...
@@ -63,6 +64,7 @@ extern const st_CAN_SendAttribute CAN_CH0_CANSendAttr[CAN_CH0_ID_SEND_TOTAL]
#define CAN_CH0_ID_CAN_0x339_Msg 0x339ul
#define CAN_CH0_ID_CAN_0x339_Msg 0x339ul
#define CAN_CH0_ID_CAN_0x18200A21_Msg 0x18200A21ul
#define CAN_CH0_ID_CAN_0x18200A21_Msg 0x18200A21ul
#define CAN_CH0_ID_CAN_0x134_Msg 0x134ul
#define CAN_CH0_ID_CAN_0x134_Msg 0x134ul
#define CAN_CH0_ID_CAN_0x220_Msg 0x220ul
...
@@ -105,6 +107,7 @@ extern uint16_t Get_CAN_CH0_ID_339_Sig_MMCU_AccumulatedWorkHours(void);
...
@@ -105,6 +107,7 @@ extern uint16_t Get_CAN_CH0_ID_339_Sig_MMCU_AccumulatedWorkHours(void);
extern
uint8_t
Get_CAN_CH0_ID_339_Sig_MMCU_SingleWorkingHours
(
void
);
extern
uint8_t
Get_CAN_CH0_ID_339_Sig_MMCU_SingleWorkingHours
(
void
);
extern
uint8_t
Get_CAN_CH0_ID_18200A21_Sig_SBMS_Soc
(
void
);
extern
uint8_t
Get_CAN_CH0_ID_18200A21_Sig_SBMS_Soc
(
void
);
extern
uint8_t
Get_CAN_CH0_ID_134_Sig_SMCU_ErrorGrage
(
void
);
extern
uint8_t
Get_CAN_CH0_ID_134_Sig_SMCU_ErrorGrage
(
void
);
extern
uint8_t
Get_CAN_CH0_ID_220_Sig_VCU_KeySts
(
void
);
...
...
Firmware/Source/Application/CAN_User/Can_RX_User.c
View file @
a1b18ac3
...
@@ -219,6 +219,7 @@ uint8_t Get_CAN_Power_State(void)
...
@@ -219,6 +219,7 @@ uint8_t Get_CAN_Power_State(void)
uint8_t
state
=
0
;
uint8_t
state
=
0
;
uint8_t
Power_State
=
Get_CAN_Num_MMCU_PowerMode
();
uint8_t
Power_State
=
Get_CAN_Num_MMCU_PowerMode
();
#if (PART_NUMBER == RMR42E_60)
if
((
Common_Get_IG_Sts
()
==
COMMON_POWER_ON
)
&&
(
System_Indicator_CANFlag
!=
1
))
if
((
Common_Get_IG_Sts
()
==
COMMON_POWER_ON
)
&&
(
System_Indicator_CANFlag
!=
1
))
{
{
switch
(
Power_State
)
switch
(
Power_State
)
...
@@ -253,5 +254,22 @@ uint8_t Get_CAN_Power_State(void)
...
@@ -253,5 +254,22 @@ uint8_t Get_CAN_Power_State(void)
{
{
state
=
POWER_CHECK_NULL
;
state
=
POWER_CHECK_NULL
;
}
}
#else
if
((
Common_Get_IG_Sts
()
==
COMMON_POWER_ON
))
{
if
(
CAN_MSG_Status
(
&
CAN_CH0_CanMsgOp
,
Co_Can_ConvertSubID_CAN_CH0
(
CAN_CH0_ID_CAN_0x339_Msg
))
==
CAN_SIG_NORMAL
)
&&
(
Get_CAN_CH0_ID_220_Sig_VCU_KeySts
()
==
1U
)
{
state
=
KEY_ACC
;
}
else
{
state
=
PKEY_ON
;
}
}
else
{
state
=
KEY_OFF
;
}
#endif
return
state
;
return
state
;
}
}
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