第 46 页 共 60 页
4.3 Configure communication protocol
To configure TD5(3)USPPAN, it is necessary to reset the product and enter "SPI configuration mode" or
"UART configuration mode". Send the corresponding command frame to SPI interface or UART interface of
user TD5(3)USPCAN. After receiving the configuration command, the product operates itself and returns a
response frame.
It should be noted that in "UART configuration mode", the product will actively return a response frame to
UART after receiving the data and processing it. However, when the product is in "SPI configuration mode",
TD5(3)USPCAN, as a slave, can't actively return the response frame. Therefore, the SPI master sends a
command frame. After receiving and processing correctly, TD5(3)USPCAN set the INT pin low to inform the
master that the processing is completed and the response frame can be read.
If users don't want to test the INT pin, they should wait for a certain time after the master sends the
command frame. After TD5(3)USPCAN processing is completed, SPI master can read the response frame
data or change the working state of the product. The waiting time of command processing is shown in Table
4.3.
Table 4.3 Waiting Time for Command Frame Processing
Command frame type
Waiting time for
processing
Write configuration
150ms
Read configuration
3ms
Verify product identification
3ms
Data bit length
8 bits
SPI data length is fixed at 8
bits.
Unable to change
Bit
transmission
mode
MSB
Bit transmission is high
priority.
CPOL
1
SPI working mode
parameter CPOL (fixed at
1)
CPHA
1
SPI working mode
parameter CPHA (fixed at
1)