ECSPI Chip Select Idle time

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello Pratham,

Thank you for reaching out with your question. The issue you’re experiencing with the Chip Select (CS) line remaining high for 4-5 microseconds after SPI transfer API calls can be due to several factors, primarily related to software configuration or inherent hardware characteristics.

Here are some steps you can take to troubleshoot and potentially resolve this issue:

  1. Check SPI Configuration: Ensure that the SPI bus and device are correctly configured in the device tree. Verify that the SPI clock speed and mode settings are appropriate for your application.

  2. Review SPI Driver Settings: Since you are using native CS, check the SPI driver settings in the kernel. Look for any parameters related to CS timing or delays that might be configurable.

  3. Examine Kernel and Driver Code: If you have access to the kernel source, examine the SPI driver code for any hardcoded delays or timing constraints related to CS handling. Modifying these might help reduce the idle time.

  4. Test with Different SPI Modes: Experiment with different SPI modes (e.g., CPOL and CPHA settings) to see if they affect the CS timing.

  5. Consider Hardware Characteristics: Some delay might be inherent due to the hardware design or the way the SPI controller handles CS. Reviewing the hardware documentation for any known limitations or timing specifications can be helpful.

  6. Use Logic Analyzer: If you haven’t already, use a logic analyzer to capture the SPI signals and verify the timing of CS, SCLK, and data lines. This can provide insights into where the delay might be occurring.

By following these steps, you may be able to identify and mitigate the cause of the CS idle time. I hope this helps you improve the throughput of your SPI slave device.

Best regards,
Toradex AI Assistant

Please, also check if these links can help you solve your problem:

Disable SPI-DMA on NVIDIA to support spi-read.