第 54 页 共 60 页
Description:
Frame start: 2 bytes, followed by 0xF7 and 0xF8.
Command word: the command word in the response frame is the same as that in the command frame,
namely 0x03.
Data length: 1 byte, the number of data bytes in the data field in the frame, fixed at 60 (i.e. 0x3C).
Data field: 60 bytes, when the parameter information is configured.
Check word: 1 byte, which is exclusive OR of all previous bytes.
4.4 Collocation method
4.4.1 MCU configuration mode
1. With UART configuration
When the user uses the UART interface of MCU to connect with TD5(3)USPCAN, the product parameters
can be configured through the UART interface. Refer to Figure 2.5 and Figure 2.6 for the hardware
connection diagram. Among them, the baud rate of serial port during configuration is fixed at 9600bps and
cannot be changed. If the baud rate used is incorrect, the configuration cannot be successful.
The configuration method is as follows:
(1) CFG is set low, MODE is set low, RST is reset, wait for at least 3ms, and the product enters UART
configuration mode;
(2) Send MCU write configuration command frame (product RXD receives data);
(3) After receiving the configuration command frame, the product actively sends a write configuration
response frame to MCU (product TXD sends data);
(4) Confirm the MCU write configuration response frame content, and judge whether the configuration is
successful;
(5) After configuration, CFG pin is set high, RST is reset, wait for at least 3ms, and the product enters UART
to CAN mode.
The timing diagram of writing configuration commands through UART is shown in Figure 4.1. This timing
diagram is also suitable for reading configuration commands, verifying product identification and other
operations, and only needs to change the command frame sent by MCU.