Reduce SPI read time on iMX6 [ SPI reads take 10X more time practically ]

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Reduce SPI read time on iMX6 [ SPI reads take 10X more time practically ]

2,553 Views
ashishkumarmish
Contributor I

We are using iMX6 SOC to evaluate SOC-SPI Controller  to read data from high speed ADC .

We are able to do an SPI read  , but the amount of time the controller takes more time ( approx 10X times more than expected ) 

 

Could you please provide pointers as to how can we remove below mentioned time delay :-
For an spi read of 18 bytes[ spi_read (spi, buf , 18) 

 

1) SPI chip select going low to start of first SPI CLOCK = 8.27 Micro Seconds
    ( low_cs_to_first_spi_clock.jpg ). 

 

2) Last SPI clock to Chip Select going high                 = 40.87 Micro Seconds
    ( last_spi_clock_cs_high.jpg )

 

3) No clock pulse between successive spi clock burst = 296 Micro Seconds.
    ( no_clock_between_two_bytes.jpg )

 

Attached along is the Linux DTB file and snapshot for your reference.

Could NXP members please share some pointers as to why the standard controller of iMX6 takes these extra clock pulses to perform the action. 

Original Attachment has been moved to: device-tree.tar

0 Kudos
Reply
2 Replies

1,779 Views
igorpadykov
NXP Employee
NXP Employee

Hi Ashish

for increasing speed recommended to use bursts, defined by field BURST_LENGTH

register ECSPIx_CONREG, check that fifo was not emptied during transfer.

Also you may be intereted in similar thread on (curently solution is developed internally)

https://community.nxp.com/thread/448038

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

1,779 Views
ashishmishra
Contributor I

Hi Igor , 

Thanks for inputs . Will check the pointers suggested .

Any rough idea as to by when the solution could be expected to be shared with community .

0 Kudos
Reply