AnsweredAssumed Answered

SPI SLAVE MODE

Question asked by Y DEVENDRA on Mar 10, 2020
Latest reply on Mar 18, 2020 by Y DEVENDRA

Hi, 

I am using the imx8 in my project, with two spi controllers i.e ECSPI1 & ECSPI2. After checking imx6 spi controller source code i came to know that spi controller can be configured in slave mode,now i want implement same feature in imx8 also i.e ECSPI1 as master , ECSPI2 as a slave device and vice versa. Then i added the patch file provided in the below link [v2,8/8] spi: imx: Add support for SPI Slave mode for imx53 and imx6 chips - Patchwork for spi slave support in imx8. Compiled the source code successfully.

 

For transmitting the data from master and slave side i am using spidev_test application but facing problem while receiving the data.some time slave receiving it's own transmitting data instead of master transmitted data, other cases it' getting junk data.

Kernel_version:4.14.98

Spi connections:

ECSPI1                     ECSP2

MOSI ------------------> MOSI

MISO ------------------>MISO

SS      ------------------>SS

SCLK  ------------------->SCLK                        

 

 can you confirm my hardware connections and provide me the correct test procedure and commands to be applied in master and salve side.provide me the slave controller clock settings and other configurations to be done for salve mode.

 

NOTE: If it's not validated in imx8 then consider for imx6.i am not sure about the master and slave testing procedure, followed below test procedure   Serial peripheral interface (SPI) 

 

    Regards,

     Devendra

Outcomes