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
fd1fae2c
Commit
fd1fae2c
authored
Apr 16, 2025
by
李冠华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:增加外发0x17A、0x38E、0x339报文超时状态功能
parent
83ca5fb4
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
62 additions
and
5 deletions
+62
-5
CAN_CH0_CAN_Communication_Matrix.c
...ce/Application/CAN_APP/CAN_CH0_CAN_Communication_Matrix.c
+2
-2
Can_App.c
Firmware/Source/Application/CAN_User/Can_App.c
+28
-2
Can_App.h
Firmware/Source/Application/CAN_User/Can_App.h
+15
-1
Can_RX_User.c
Firmware/Source/Application/CAN_User/Can_RX_User.c
+14
-0
Can_RX_User.h
Firmware/Source/Application/CAN_User/Can_RX_User.h
+3
-0
No files found.
Firmware/Source/Application/CAN_APP/CAN_CH0_CAN_Communication_Matrix.c
View file @
fd1fae2c
...
...
@@ -557,7 +557,7 @@ const st_CANMsgAttribute CAN_CH0_CAN_MSG_CONST_ARRAY[CAN_CH0_ID_TOTAL_MAX] =
0x339ul
,
((
void
*
)
0
),
(
CAN_0x339_Receive
),
(
(
void
*
)
0
),
(
CAN_0x339_Lost_CallBack
),
},
{
{
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
},
...
...
@@ -607,7 +607,7 @@ const st_CANMsgAttribute CAN_CH0_CAN_MSG_CONST_ARRAY[CAN_CH0_ID_TOTAL_MAX] =
0x17Aul
,
((
void
*
)
0
),
(
CAN_0x17A_Receive
),
(
(
void
*
)
0
),
(
CAN_0x17A_Lost_CallBack
),
},
{
{
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
,
0x00u
},
...
...
Firmware/Source/Application/CAN_User/Can_App.c
View file @
fd1fae2c
#include "Can_App.h"
uint8_t
Msg0x17ALostFlag
=
0U
;
uint8_t
Msg0x38ELostFlag
=
0U
;
uint8_t
Msg0x339LostFlag
=
0U
;
void
Can_Set_Buff_3A2
(
canlib_uint8_t
CopyData
[])
{
...
...
@@ -136,8 +139,30 @@ void Can_Set_Buff_3D4(canlib_uint8_t CopyData[])
if
(
p3D4
!=
(
void
*
)
0
)
{
p3D4
->
Sig
.
ICU_MasterBMSCommunicatlost
=
0
;
p3D4
->
Sig
.
ICU_SlaveBMSCommunicatlost
=
0
;
p3D4
->
Sig
.
ICU_MCUCommunicatlost
=
0
;
if
(
Msg0x17ALostFlag
)
{
p3D4
->
Sig
.
ICU_SlaveBMSCommunicatlost
=
1U
;
}
else
{
p3D4
->
Sig
.
ICU_SlaveBMSCommunicatlost
=
0
;
}
if
(
Msg0x339LostFlag
)
{
p3D4
->
Sig
.
ICU_MCUCommunicatlost
=
1U
;
}
else
{
p3D4
->
Sig
.
ICU_MCUCommunicatlost
=
0
;
}
if
(
Msg0x38ELostFlag
)
{
p3D4
->
Sig
.
ICU_BMCUCommunicatlost
=
1U
;
}
else
{
p3D4
->
Sig
.
ICU_BMCUCommunicatlost
=
0
;
}
p3D4
->
Sig
.
ICU_VCUCommunicatlost
=
0
;
p3D4
->
Sig
.
Res0
=
0x0
;
p3D4
->
Sig
.
Res1
=
0x00
;
...
...
@@ -147,6 +172,7 @@ void Can_Set_Buff_3D4(canlib_uint8_t CopyData[])
p3D4
->
Sig
.
Res5
=
0x00
;
p3D4
->
Sig
.
Res6
=
0x00
;
p3D4
->
Sig
.
Res7
=
0x00
;
p3D4
->
Sig
.
Res8
=
0x00
;
}
#endif
}
Firmware/Source/Application/CAN_User/Can_App.h
View file @
fd1fae2c
...
...
@@ -5,6 +5,10 @@
#include "Application.h"
#include "Components.h"
extern
uint8_t
Msg0x17ALostFlag
;
extern
uint8_t
Msg0x38ELostFlag
;
extern
uint8_t
Msg0x339LostFlag
;
void
Can_Set_Buff_3A2
(
canlib_uint8_t
CopyData
[]);
void
Can_Set_Buff_3A7
(
canlib_uint8_t
CopyData
[]);
void
Can_Set_Buff_393
(
canlib_uint8_t
CopyData
[]);
...
...
@@ -119,14 +123,24 @@ typedef union
uint8_t
ICU_SlaveBMSCommunicatlost
:
1
;
uint8_t
ICU_MCUCommunicatlost
:
1
;
uint8_t
ICU_VCUCommunicatlost
:
1
;
uint8_t
Res0
:
4
;
uint8_t
Res0
:
2
;
uint8_t
ICU_BMCUCommunicatlost
:
1
;
uint8_t
Res8
:
1
;
uint8_t
Res1
:
8
;
uint8_t
Res2
:
8
;
uint8_t
Res3
:
8
;
uint8_t
Res4
:
8
;
uint8_t
Res5
:
8
;
uint8_t
Res6
:
8
;
uint8_t
Res7
:
8
;
}
Sig
;
...
...
Firmware/Source/Application/CAN_User/Can_RX_User.c
View file @
fd1fae2c
...
...
@@ -413,6 +413,8 @@ void CAN_0x38E_Receive(uint8_t CopyData [])
}
}
Msg0x38ELostFlag
=
0U
;
#endif
}
...
...
@@ -672,11 +674,13 @@ void CAN_0x170_Receive(uint8_t CopyData [])
void
CAN_0x339_Receive
(
uint8_t
CopyData
[])
{
g_u8ID339flag
=
1U
;
Msg0x339LostFlag
=
0U
;
}
void
CAN_0x17A_Receive
(
uint8_t
CopyData
[])
{
g_Msg0x17AFlag
=
1U
;
Msg0x17ALostFlag
=
0U
;
}
void
CAN_0x18E_Lost_CallBack
(
uint8_t
CopyData
[])
...
...
@@ -703,6 +707,7 @@ void CAN_0x38E_Lost_CallBack(uint8_t CopyData [])
{
g_OverLoadCount
[
i
]
=
0U
;
}
Msg0x38ELostFlag
=
1U
;
}
void
CAN_0x16B_Lost_CallBack
(
uint8_t
CopyData
[])
...
...
@@ -720,4 +725,13 @@ void CAN_0x170_Lost_CallBack(uint8_t CopyData [])
g_TOTALSigChargeCount
=
0U
;
}
void
CAN_0x17A_Lost_CallBack
(
uint8_t
CopyData
[])
{
Msg0x17ALostFlag
=
1U
;
}
void
CAN_0x339_Lost_CallBack
(
uint8_t
CopyData
[])
{
Msg0x339LostFlag
=
1U
;
}
Firmware/Source/Application/CAN_User/Can_RX_User.h
View file @
fd1fae2c
...
...
@@ -55,5 +55,8 @@ extern void CAN_0x38E_Lost_CallBack(uint8_t CopyData []);
extern
void
CAN_0x16B_Lost_CallBack
(
uint8_t
CopyData
[]);
extern
void
CAN_0x22F_Lost_CallBack
(
uint8_t
CopyData
[]);
extern
void
CAN_0x170_Lost_CallBack
(
uint8_t
CopyData
[]);
extern
void
CAN_0x17A_Lost_CallBack
(
uint8_t
CopyData
[]);
extern
void
CAN_0x339_Lost_CallBack
(
uint8_t
CopyData
[]);
#endif
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