Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiancetai
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
陈家乐
jiancetai
Commits
696970f1
Commit
696970f1
authored
Aug 18, 2025
by
何锐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:写入UID不进boot
parent
868026ab
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
42 deletions
+35
-42
CAN_APP.c
YueJin_test_bench/source/Appliciation/CAN_APP.c
+23
-23
RSCAN.c
YueJin_test_bench/source/Driver/CAN/RSCAN.c
+12
-19
No files found.
YueJin_test_bench/source/Appliciation/CAN_APP.c
View file @
696970f1
...
...
@@ -544,37 +544,37 @@ void Can_Set_Buff_786(uint8_t CopyData [])
switch
(
UIDStep
)
{
case
0
:
for
(
uint8_t
i
=
0
;
i
<
8
;
i
++
)
{
pCANMsg
->
Msg
[
i
]
=
Data_786_5
[
i
];
}
//
for(uint8_t i = 0;i < 8;i++)
//
{
//
pCANMsg->Msg[i] = Data_786_5[i];
//
}
UIDStep
++
;
break
;
case
1
:
for
(
uint8_t
i
=
0
;
i
<
8
;
i
++
)
{
pCANMsg
->
Msg
[
i
]
=
Data_786_6
[
i
];
}
//
for(uint8_t i = 0;i < 8;i++)
//
{
//
pCANMsg->Msg[i] = Data_786_6[i];
//
}
UIDStep
++
;
break
;
case
2
:
if
(
UIDGetstep
==
1
)
{
Data_786_7
[
0
]
=
0x06
;
Data_786_7
[
1
]
=
0x27
;
Data_786_7
[
2
]
=
0x06
;
Data_786_7
[
3
]
=
seedresult
[
0
];
Data_786_7
[
4
]
=
seedresult
[
1
];
Data_786_7
[
5
]
=
seedresult
[
2
];
Data_786_7
[
6
]
=
seedresult
[
3
];
Data_786_7
[
7
]
=
0xAA
;
for
(
uint8_t
i
=
0
;
i
<
8
;
i
++
)
{
pCANMsg
->
Msg
[
i
]
=
Data_786_7
[
i
];
}
//
if(UIDGetstep == 1)
//
{
//
Data_786_7[0] = 0x06;
//
Data_786_7[1] = 0x27;
//
Data_786_7[2] = 0x06;
//
Data_786_7[3] = seedresult[0];
//
Data_786_7[4] = seedresult[1];
//
Data_786_7[5] = seedresult[2];
//
Data_786_7[6] = seedresult[3];
//
Data_786_7[7] = 0xAA;
//
for(uint8_t i = 0;i < 8;i++)
//
{
//
pCANMsg->Msg[i] = Data_786_7[i];
//
}
UIDStep
++
;
UIDGetstep
=
2
;
}
//
}
break
;
case
3
:
for
(
uint8_t
i
=
0
;
i
<
8
;
i
++
)
...
...
YueJin_test_bench/source/Driver/CAN/RSCAN.c
View file @
696970f1
...
...
@@ -946,16 +946,16 @@ void RSCAN0_CH4_Receive(CAN_Frame_st_t *pstCANFrame)
u8get786msg
[
7
]
=
pstCANFrame
->
unCANData
.
u8CANData
[
7
];
if
(
UIDGetstep
==
0
)
{
if
(
u8get786msg
[
1
]
==
0x67
&&
u8get786msg
[
2
]
==
0x05
)
{
memcpy
(
seednum
,
&
u8get786msg
[
3
],
4
);
key_value
=
CalculateKey
(
seednum
);
seedresult
[
0
]
=
(
uint8_t
)
key_value
;
seedresult
[
1
]
=
(
uint8_t
)(
key_value
>>
8
);
seedresult
[
2
]
=
(
uint8_t
)(
key_value
>>
16
);
seedresult
[
3
]
=
(
uint8_t
)(
key_value
>>
24
);
UIDGetstep
=
1
;
}
//
if(u8get786msg[1] == 0x67 && u8get786msg[2] == 0x05)
//
{
//
memcpy(seednum,&u8get786msg[3],4);
//
key_value = CalculateKey(seednum);
//
seedresult[0] = (uint8_t)key_value ;
//
seedresult[1] = (uint8_t)(key_value >> 8);
//
seedresult[2] = (uint8_t)(key_value >> 16);
//
seedresult[3] = (uint8_t)(key_value >> 24);
//
UIDGetstep = 1;
//
}
}
else
if
(
UIDGetstep
==
2
)
{
...
...
@@ -966,17 +966,10 @@ void RSCAN0_CH4_Receive(CAN_Frame_st_t *pstCANFrame)
}
else
if
(
UIDGetstep
==
4
)
{
if
(
u8get786msg
[
3
]
==
0x78
)
{
UIDGetstep
=
5
;
}
}
else
if
(
UIDGetstep
==
5
)
if
(
u8get786msg
[
1
]
==
0x6E
)
{
if
((
u8get786msg
[
1
]
==
0x6E
)
&&
(
u8get786msg
[
3
]
==
0x88
))
{
UIDGetstep
=
6
;
uidWrite
=
0
;
UIDGetstep
=
5
;
General_Number_Disp
(
writesuccess
,
3
,
200
);
//写入成功
}
}
...
...
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