SFFS141 December   2021 TCAN1167-Q1

 

  1.   1
    1.     2
  2.   3
  3.   4
    1.     5
  4.   6
    1.     7
    2.     8
    3.     9
    4.     10
    5.     11
    6.     12
    7.     13
  5.   14
    1.     15
    2.     16
    3.     17
      1.      18
        1.       19
        2.       20
        3.       21
        4.       22
        5.       23
      2.      24
        1.       25
        2.       26
        3.       27
        4.       28
      3.      29
        1.       30
        2.       31
        3.       32
        4.       33
      4.      34
        1.       35
      5.      36
        1.       37
        2.       38
        3.       39
        4.       40
    4.     41
      1.      42
      2.      43
      3.      44
  6.   45
  7.   46
    1.     47
    2.     48
    3.     49
  8.   50

SM-10: SPI communication error; SPIERR

The Serial Peripherial Interface (SPI) uses a standard configuration. Physically the digital interface pins are nCS (Chip Select Not), SDI (Serial Data In), SDO (Serial Data Out) and SCLK (Serial Clock). Each SPI transaction is a 16, 24 or 32 bits containing an address and read/write command byte followed by one to three data bytes.

Supporting two and three data bytes is accomplished utilizing burst read and write where the address is automatically incremented for the data along with the same number of clock cycles per bit. The data shifted out on the SDO pin for the transaction always starts with the Global Status Register (byte).

Once the SPI is enabled by a low on nCS, the device samples the input data on each rising edge of the SPI clock (SCLK). The data is shifted into an appropriate 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 SCLK and the nCS has a rising edge to deselect the device. For a burst write if there are 31 clock cycles of SCLK (1 clock cycle less than the full 3 byte write), the third byte write won’t happen while the first two bytes write will be executed. If the correct number of clock cycles and data are not shifted in during one SPI transaction (nCS low), interrupts at 8'h50[7], 8'h50[4] and 8'h53[7], SPIERR, will be set.