This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

What is a spi_delay() for enabling the C665x SPI?

Hi Champs,

According to 'evmc665x_spi.c' source code in a C6657 PDK below, spi_delay() is used for enabling the SPI hardware.

  o evmc665x_spi.c
    (C:\ti\pdk_C6657_1_1_2_6\packages\ti\platform\evmc6657l\platform_lib\src)


    - Line 85~88

      /* Enable the SPI hardware */
      SPI_SPIGCR0 = CSL_SPI_SPIGCR0_RESET_IN_RESET;
      spi_delay (2000);
      SPI_SPIGCR0 = CSL_SPI_SPIGCR0_RESET_OUT_OF_RESET;

So, do I have to insert the delay between "IN_RESET" and "OUT_OF_RESET"?

There is not any description about the delay in the SPI user guide. That's why I'm asking this question.

  o Keystone SPI User Guide [SPRUGP2A]
    (http://www.ti.com/lit/pdf/sprugp2)
  
    - Page 28

      2.15 Initialization

        1. Reset the SPI by clearing the RESET bit in the SPI global control
           register 0
(SPIGCR0) to 0.
        2. Take the SPI out of reset by setting SPIGCR0.RESET to 1.

Thanks in advance for your cooperation.

Best regards,
j-breeze