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 [])
...
@@ -544,37 +544,37 @@ void Can_Set_Buff_786(uint8_t CopyData [])
switch
(
UIDStep
)
switch
(
UIDStep
)
{
{
case
0
:
case
0
:
for
(
uint8_t
i
=
0
;
i
<
8
;
i
++
)
//
for(uint8_t i = 0;i < 8;i++)
{
//
{
pCANMsg
->
Msg
[
i
]
=
Data_786_5
[
i
];
//
pCANMsg->Msg[i] = Data_786_5[i];
}
//
}
UIDStep
++
;
UIDStep
++
;
break
;
break
;
case
1
:
case
1
:
for
(
uint8_t
i
=
0
;
i
<
8
;
i
++
)
//
for(uint8_t i = 0;i < 8;i++)
{
//
{
pCANMsg
->
Msg
[
i
]
=
Data_786_6
[
i
];
//
pCANMsg->Msg[i] = Data_786_6[i];
}
//
}
UIDStep
++
;
UIDStep
++
;
break
;
break
;
case
2
:
case
2
:
if
(
UIDGetstep
==
1
)
//
if(UIDGetstep == 1)
{
//
{
Data_786_7
[
0
]
=
0x06
;
//
Data_786_7[0] = 0x06;
Data_786_7
[
1
]
=
0x27
;
//
Data_786_7[1] = 0x27;
Data_786_7
[
2
]
=
0x06
;
//
Data_786_7[2] = 0x06;
Data_786_7
[
3
]
=
seedresult
[
0
];
//
Data_786_7[3] = seedresult[0];
Data_786_7
[
4
]
=
seedresult
[
1
];
//
Data_786_7[4] = seedresult[1];
Data_786_7
[
5
]
=
seedresult
[
2
];
//
Data_786_7[5] = seedresult[2];
Data_786_7
[
6
]
=
seedresult
[
3
];
//
Data_786_7[6] = seedresult[3];
Data_786_7
[
7
]
=
0xAA
;
//
Data_786_7[7] = 0xAA;
for
(
uint8_t
i
=
0
;
i
<
8
;
i
++
)
//
for(uint8_t i = 0;i < 8;i++)
{
//
{
pCANMsg
->
Msg
[
i
]
=
Data_786_7
[
i
];
//
pCANMsg->Msg[i] = Data_786_7[i];
}
//
}
UIDStep
++
;
UIDStep
++
;
UIDGetstep
=
2
;
UIDGetstep
=
2
;
}
//
}
break
;
break
;
case
3
:
case
3
:
for
(
uint8_t
i
=
0
;
i
<
8
;
i
++
)
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)
...
@@ -946,16 +946,16 @@ void RSCAN0_CH4_Receive(CAN_Frame_st_t *pstCANFrame)
u8get786msg
[
7
]
=
pstCANFrame
->
unCANData
.
u8CANData
[
7
];
u8get786msg
[
7
]
=
pstCANFrame
->
unCANData
.
u8CANData
[
7
];
if
(
UIDGetstep
==
0
)
if
(
UIDGetstep
==
0
)
{
{
if
(
u8get786msg
[
1
]
==
0x67
&&
u8get786msg
[
2
]
==
0x05
)
//
if(u8get786msg[1] == 0x67 && u8get786msg[2] == 0x05)
{
//
{
memcpy
(
seednum
,
&
u8get786msg
[
3
],
4
);
//
memcpy(seednum,&u8get786msg[3],4);
key_value
=
CalculateKey
(
seednum
);
//
key_value = CalculateKey(seednum);
seedresult
[
0
]
=
(
uint8_t
)
key_value
;
//
seedresult[0] = (uint8_t)key_value ;
seedresult
[
1
]
=
(
uint8_t
)(
key_value
>>
8
);
//
seedresult[1] = (uint8_t)(key_value >> 8);
seedresult
[
2
]
=
(
uint8_t
)(
key_value
>>
16
);
//
seedresult[2] = (uint8_t)(key_value >> 16);
seedresult
[
3
]
=
(
uint8_t
)(
key_value
>>
24
);
//
seedresult[3] = (uint8_t)(key_value >> 24);
UIDGetstep
=
1
;
//
UIDGetstep = 1;
}
//
}
}
}
else
if
(
UIDGetstep
==
2
)
else
if
(
UIDGetstep
==
2
)
{
{
...
@@ -966,17 +966,10 @@ void RSCAN0_CH4_Receive(CAN_Frame_st_t *pstCANFrame)
...
@@ -966,17 +966,10 @@ void RSCAN0_CH4_Receive(CAN_Frame_st_t *pstCANFrame)
}
}
else
if
(
UIDGetstep
==
4
)
else
if
(
UIDGetstep
==
4
)
{
{
if
(
u8get786msg
[
3
]
==
0x78
)
if
(
u8get786msg
[
1
]
==
0x6E
)
{
UIDGetstep
=
5
;
}
}
else
if
(
UIDGetstep
==
5
)
{
{
if
((
u8get786msg
[
1
]
==
0x6E
)
&&
(
u8get786msg
[
3
]
==
0x88
))
{
UIDGetstep
=
6
;
uidWrite
=
0
;
uidWrite
=
0
;
UIDGetstep
=
5
;
General_Number_Disp
(
writesuccess
,
3
,
200
);
//写入成功
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