SPRAD26 April   2022 TDA4VM

 

  1.   Trademarks
  2. 1SPI: Serial Peripheral Interface
  3. 2J7200/J721e MCSPI Support
    1. 2.1 MCSPI Features
  4. 3SPI: Master Mode Enabling and Validation on Linux
    1. 3.1 Enable SPI Instances of J721e/TDA4VM
    2. 3.2 Enable SPIDEV on TD4VM SDK
    3. 3.3 Exercise SPI From User Space on TI J7/TDA4x Using Standard Linux spidev_test Tool
  5. 4SPI: Slave Mode Enabling and Validation on Linux
    1. 4.1 Enable SPI Instances of J7200
    2. 4.2 Enable DMA for MCSPI4 Slave Node
    3. 4.3 Enable SPIDEV and SPI_SLAVE Configs
    4. 4.4 Test SPI Slave Functionality From User Space on TI J7200 Using Standard Linux spidev_test Tool
    5. 4.5 SPI Slave Testing Using spi-slave-time
    6. 4.6 Linux SPI Slave Challenges
    7. 4.7 Linux SPI Slave Mode General Limitations
    8. 4.8 McSPI SPI Slave Mode Limitations
  6. 5References

Linux SPI Slave Challenges

  • SPI Slave needs to be Real Time:
    • SPI slave has to be ready to send/receive data when master starts clock. But, Master has no way of knowing if slave is ready
    • Slave has to receive all arbitrary length data that master sends Else, buffer overflows leading to data loss
    • Slave has to be ready with data to send to master in next clock cycle Else, 0s are shifted (corruption if in the middle of valid data flow)
  • No flow control of any sort whatsoever. Therefore, no way to stop transaction in the middle for Slave to provision additional resources (buffers to receive cmd/data to be sent to master) Therefore there may be RX underrun and TX data loss, if master overwhelms slave.