Why? Is SPI a problem at high speed?

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

Why? Is SPI a problem at high speed?

547 Views
jongjupark
Contributor I

Dear community,

**Question**
Is SPI a problem at high speed?
 

**description**

1. Chip : MCIMX6Q5EYM10AD

2. Kernel Version : L3.14.28

I have tested 20Mhz from 10Mhz with SPI Master Mode between iMX6Q and SPI device.

I simply tested the memory of the SPI device to read it.
Up to 10Mhz ~ 14Mhz worked normally.
However, since 15Mhz, there is a problem with the data.

▣ SPI communication result according to frequency

MHz

Result

Read Data

10

OK

0x92520001

11

OK

0x92520001

12

OK

0x92520001

13

OK

0x92520001

14

OK

0x92520001

15

FAIL

0xc9290000

16

FAIL

0xc9290000

17

FAIL

0xc9290000

18

FAIL

0xc9290000

19

FAIL

0xc9290000

20

FAIL

0xc9290000

The difference between the normal data (0x92520001) and the abnormal data (0xc9290000)
Moving the least significant bit of normal data forward is exactly like abnormal data. This seems to be a bug in the SPI driver.

▣ Datas comparison

Hex

Bit

0x92520001

1001 0010 0101 0010 0000 0000 0000 0001 <--- least significant bit

0xc9290000

1100 1001 0010 1001 0000 0000 0000 0000

1001 0010 0101 0010 0000 0000 0000 0001 (0x92520001)

11001 0010 0101 0010 0000 0000 0000 000

1100 1001 0010 1001 0000 0000 0000 0000 (0xc9290000)

0 Kudos
2 Replies

472 Views
igorpadykov
NXP Employee
NXP Employee

Hi jongju

one can consult with datasheet connected device if it supports 20Mhz

and check with oscilloscope timings using sect.4.12.2.1 ECSPI Master Mode Timing

i.MX6DQ Datasheet

http://www.nxp.com/docs/en/data-sheet/IMX6DQCEC.pdf

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

472 Views
jongjupark
Contributor I

The waveform below is the value I checked through the oscilloscope.
In conclusion, the waveform datas of the oscilloscope is ok.

However, there is a problem with the value read from the SPI driver.

[waveform measurement 1] 10Mhz SPI total waveform
- Yellow: Chip Select
- Green : MOSI
- Blue : MISO
- Red : Clock


[waveform measurement 2] 10Mhz SPI detailed waveform
- Yellow: Chip Select
- Green : MOSI 
- Blue : MISO
- Red : Clock
The waveform below shows that "0x92 0x52 0x00 0x01" data is normally read.

 

[waveform measurement 3] 20Mhz SPI total waveform 
- Yellow: Chip Select
- Green : MOSI 
- Blue : MISO
- Red : Clock

[waveform measurement 4] 20Mhz SPI detailed waveform
- Yellow: Chip Select
- Green : MOSI 
- Blue : MISO
- Red : Clock

The waveform below shows that "0x92 0x52 0x00 0x01" data is normally read.
(At 20Mhz, the right end was cut off on the screen. However, 0x92 was read normally.)

0 Kudos