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

McSPI SPI Slave Mode Limitations

  • McSPI controller has to use DMA as CPU writes/reads cannot meet the hard deadline of putting data into FIFO before master sends next clock.
  • McSPI can transmit or receive 64K-1 bytes per transfer, therefore, SPI slave driver needs to make sure to break larger read/write transactions into 64K-1 chunks and master must make sure slave is ready to send/receive data before starting the clock.
  • More information on limitations can be found in this presentation: Linux as an SPI Slave/Adding SPI slave support to Linux.
  • SPI slave instance fails without DMA. So adding DMA RX and TX properties is compulsory for the functionality.