SLLSFP9 February 2024 TCAN1465-Q1 , TCAN1469-Q1
ADVANCE INFORMATION
The SDI pin is used to let the device know which address is being read from or written to. During a write, the number of clock cycles determines how many data bytes up to three are loaded into sequential addresses. The minimum number of clock cycles for a write is 16 supporting the initial address and write command followed by one byte of data as seen in Figure 8-41. The TCAN146x-Q1 supports burst read and write. Figure 8-42 shows an example of a 32-bit write which includes the initial 7-bit address, write bit and three data bytes. This all requires 32 clock cycles. Once the SPI is enabled by a low on nCS, the SDI samples the input data on each rising edge of the SPI clock (SCK). The data is shifted into an appropriately-sized shift register and after the correct number of clock cycles the shift register is full and the SPI transaction is complete. For a write command code, the new data is written into the addressed register only after the exact number of clock cycles have been shifted in by SCK and the nCS has a rising edge to deselect the device. For a burst write if there are 31 clock cycles of SCK (1 clock cycle less than the full 3 byte write), the third byte write won’t happen while the first two bytes write is executed. If the correct number of clock cycles and data are not shifted in during one SPI transaction (nCS low), the SPIERR flag is set.
Example on how to write three bytes of data from one SPI write command.