第 47 页 共 60 页
1. Command frame
The command frame is sent from the main control terminal (host computer, MCU, etc.) to the controlled
terminal TD5(3)USPCAN, and the TD5(3)USPCAN performs corresponding operation after receiving the
command frame.
2. Response frame
The response frame refers to the response information returned by TD5(3)USPCAN to the main control
terminal after TD5(3)USPCAN receives the command frame.
4.3.1 Write configuration parameters
1. Write configuration command frame
A configuration command frame is used to configure the parameters of TD5(3)USPCAN, which contains
all the data needed to configure TD5(3)USPCAN. The format of the configuration command frame is shown
in Table 4.4.
Table 4.4 Write Configuration Command Frame Format
Frame start
Command
word
Data
length
Data field
Check word
2 bytes
1 byte
1 byte
60 bytes
1 byte
0xF7, 0xF8
0x01
0x3C
As defined
in Table 4.5.
XOR of all
previous bytes
Description:
Frame start: 2 bytes, followed by 0xF7 and 0xF8.
Command word: 1 byte. Fixed at 0x01.
Data length: 1 byte, the number of data bytes in the data field in the frame, fixed at 60 (i.e. 0x3C).
Data: 60 bytes, configuration information.
Check word: 1 byte, which is exclusive OR of all previous bytes.
Table 4.5 Definition of write configuration command frame data field
Byte
position
Definition
Scope of data
Explain
0
UART baud rate
0x00~0x10
The correspondence is shown in
Table 4.6.