SLLSFR8B September 2025 – January 2026 TCAN5102-Q1
ADVANCE INFORMATION
This is a basic example of sending and receiving a stream of bytes via SPI. Once the device receives all bytes for the SPI frame (determined by the number of bytes given in the SPI header), the device begins transmitting the SPI frame. This example stores the received POCI data for read back later.
| PARAMETER | VALUE |
|---|---|
| CAN Frame format | Standard Frame Format |
| Bytes to transfer | 10B |
| SPI channel | Channel 2 |
| Save received data to RX FIFO | Yes |
| SPI byte stream | 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xAA |
The following table shows the steps and what data is transmitted on the CAN bus. The central gateway/controller of the bus is referred to as the ECU, and the TCAN device is referred to as "responder".
| Step | Transmitter | Data | Description |
|---|---|---|---|
| 1 | ECU (DLC = 16B) | 0x0C, 0x10, 0x10, 0x82, 0x0A, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xAA, 0x00 |
The ECU requests a write of 10 bytes to register 0x1010 (SPI TX FIFO), with a SPI header with store = 1, SPI channel = 2, and a SPI frame of 10 bytes. The 10 bytes of data are then shifted into the device. Since the CAN DLC must be 16 bytes to fit these 15 bytes of data, a 0x00 is padded to the end. |
| 2 | Responder | 0x0C, 0x01 | The responder sends back an OK to acknowledge that the request was received. |
| 3 | SPI | PICO: 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
0xAA POCI: 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A |
At this point, the responder does the SPI transfer on SPI channel 2 of 10 bytes. The POCI data is stored in the RX FIFO |
| 4 | ECU | 0x43, 0x10, 0x0F | The ECU requests a read of 3 bytes from registers 0x100F-0x1011 (SPI_STATUS and SPI_RXFS). Since the burst read was started NOT on 0x1010 (SPI RX FIFO), the byte corresponding to that register will be a 0 for padding. Burst reads that do not start on the FIFO, will return '0' for the byte corresponding to the FIFO. |
| 5 | Responder | 0x43, 0x01, 0xCA, 0x00, 0x01 | The responder returns the data from registers 0x100F, a 0 for 0x1010 and data for 0x1011. The resulting data states that the TX FIFO is empty, the RX FIFO contains 1 SPI frame and that the next RX FIFO element has 10 bytes of data. With this information, the ECU knows to request a read of 10 + 2 (SPI header) bytes from the device. |
| 6 | ECU | 0x4C, 0x10, 0x10 | The ECU requests a read of 12 bytes (10 bytes of data + 2 bytes of header) from the RX FIFO |
| 7 | Responder (DLC = 16B) | 0x4C, 0x01, 0x02, 0x0A, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x00, 0x00 |
The responder returns the requested 12 bytes of data. The SPI header bytes signify that this is the start of the frame readout, SPI channel 2 was used, and there are 10 bytes of SPI data to read (which fits into this entire CAN frame). Since the closest CAN DLC size to hold the data was 16 bytes, 2 bytes of padding were added to the end. |
| Step | Transmitter | Data | Description |
|---|---|---|---|
| 1 | ECU (DLC = 8B) | 0x05, 0x10, 0x10, 0x02, 0x0A, 0x11, 0x22, 0x33 |
The ECU requests a write of 5 bytes to register 0x1010 (SPI TX FIFO), with a SPI header with store = 1, SPI channel = 2, and a SPI frame of 10 bytes. Only the first 3 bytes of data for the SPI frame were transferred. |
| 2 | Responder (DLC = 2 B) | 0x05, 0x01 | The responder sends back an OK to acknowledge that the request was received. |
| 3 | ECU (DLC = 12B) | 0x07, 0x10, 0x10, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xAA, 0x00, 0x00 |
The ECU continues the write request to the same address of 7 bytes. Since the CAN DLC that can store this frame is 12 bytes, 2 bytes of padding are added to the end. The value of these padded bytes do not matter, and are ignored. |
| 4 | Responder (DLC = 2 B) | 0x07, 0x01 | The responder sends back an OK to acknowledge that the request was received. |
| 3 | SPI | PICO: 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
0xAA POCI: 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A |
At this point, the responder does the SPI transfer on SPI channel 2 of 10 bytes. The POCI data is stored in the RX FIFO |
| 4 | ECU (DLC = 3 B) | 0x43, 0x10, 0x0F | The ECU requests a read of 3 bytes from registers 0x100F-0x1011 (SPI_STATUS and SPI_RXFS). Since the burst read was started NOT on 0x1010 (SPI RX FIFO), the byte corresponding to that register will be a 0 for padding. Burst reads that do not start on the FIFO, will return '0' for the byte corresponding to the FIFO. |
| 5 | Responder (DLC = 5 B) | 0x43, 0x01, 0xCA, 0x00, 0x01 | The responder returns the data from registers 0x100F, a 0 for 0x1010 and data for 0x1011. The resulting data states that the TX FIFO is empty, the RX FIFO contains 1 SPI frame and that the next RX FIFO element has 10 bytes of data. With this information, the ECU knows to request a read of 10 + 2 (SPI header) bytes from the device. |
| 6 | ECU (DLC = 3 B) | 0x48, 0x10, 0x10 | The ECU requests a read of 8 bytes (which will contain 2 bytes of header + 6 bytes of data) from the RX FIFO |
| 7 | Responder (DLC = 12 B) | 0x48, 0x01, 0x02, 0x0A, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x00, 0x00 |
The responder returns the requested 8 bytes of data (even though the DLC is 12, we know that only the 8 bytes of data after the CAN response header is valid, so we know the 0s are padding). The SPI header bytes signify that this is the start of the frame readout, SPI channel 2 was used, and there are 10 bytes of SPI data left to read. Since the closest CAN DLC size to hold the data was 12 bytes, 2 bytes of padding were added to the end. The ECU was told there are 10 bytes of SPI data to be read, but only 6 were requested . This means there are 4 bytes of SPI data left to read. |
| 8 | ECU (DLC = 3 B) | 0x46, 0x10, 0x10 | The ECU requests a read of 6 bytes (4 bytes of data + 2 bytes of header) from the RX FIFO to finish the read. |
| 9 | Responder (DLC = 8 B) | 0x46, 0x01, 0x82, 0x04, 0x07, 0x08, 0x09, 0x0A |
The responder returns the requested 6 bytes of data. The SPI header bytes signify that this is a continuation of a frame readout, SPI channel 2 was used, and there are 4 bytes of SPI data left to be read (which fits into this frame). Since the data to send lined up with a CAN frame size, no padding bytes were needed. |