Hi igorpadykov,
Thank you for your answer.
I checked the document IMX6DQRM.pdf
21.4.4.1 Typical Master Mode
****
When the ECSPI is in Master mode the SS, SCLK, and MOSI are output signals, and the MISO signal is an input.
****
It means in Master mode When i use the READ command , the SCLK signals should be generated.
But in my case , the SCLK has no signals when i use the
retSize = read (fd, &data, sizeof(data));
I also run the imx-test package mxc_spi_test, and i get the error below:
./spitester_mxc -D 0 -s 1000000 -b 8
Execute data transfer test: 0 1 8
spi mode: 0
bits per word: 8
max speed: 1000000 Hz (1000 KHz)
can't send spi messageCorrupted data at 0 wbuf = 56 rbuf = 0
Data sent : 8
Data received :
Test FAILED.
./spitester_mxc -D 0 -s 1000000 -b 8 0BFD01000000
Execute data transfer test: 0 12 0BFD01000000
spi mode: 0
bits per word: 8
max speed: 1000000 Hz (1000 KHz)
Corrupted data at 0 wbuf = 48 rbuf = 0
Corrupted data at 1 wbuf = 66 rbuf = 0
Corrupted data at 2 wbuf = 70 rbuf = 0
Corrupted data at 3 wbuf = 68 rbuf = 0
Corrupted data at 4 wbuf = 48 rbuf = 0
Corrupted data at 5 wbuf = 49 rbuf = 0
Corrupted data at 6 wbuf = 48 rbuf = 0
Corrupted data at 7 wbuf = 48 rbuf = 0
Corrupted data at 8 wbuf = 48 rbuf = 0
Corrupted data at 9 wbuf = 48 rbuf = 0
Corrupted data at 10 wbuf = 48 rbuf = 0
Corrupted data at 11 wbuf = 48 rbuf = 0
Data sent : 0BFD01000000
Data received :
Test FAILED.
I just want to send 6byte to the slave and there is 12Byte.
and the wbuf is corrupted.
pls help me to resolve this problem.
Thank you!