i.MX8M Mini SPI clock isn't continuously

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

i.MX8M Mini SPI clock isn't continuously

ソリューションへジャンプ
1,020件の閲覧回数
m_c
Senior Contributor I

Test command: ./mxc_spi_test1.out -D 0 -s 1000 -b 8 -C a5a5a5a5aa5a5a5a5aa5a5a5a5aa5a5a5a5aa5a5a5a5aa5a5a5a5aa5a5a5a5aa5a5a5a5a

pastedImage_1.png

If send small size (less than 31 bytes), SCK is generated continuously. On the contrary, if send big size (more than 32 bytes), SCK is separated. We want SCK generated continuously even for big size. Attach SPI driver to you fro reference. Do you have any suggestion?

 

Our application is calling following function to send data by SPI.

ret = ioctl(comSpiInfo.fd, SPI_IOC_MESSAGE(1), spi_message);

 

About following waveform, the blue channel is SCK, the red channel is MOSI.

 

  1. When transfer data less than 31 bytes, the SCK signal is generated continuously.

 pastedImage_3.png

  1. When transfer data is bigger than 32 bytes, the SCK signal is separated into one byte by one byte.

pastedImage_4.png

Our usage is Typical Master Mode.

pastedImage_2.png

ラベル(1)
0 件の賞賛
1 解決策
927件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi m.c.

one can try to configure BURST_LENGTH described in

sect.10.1.5.3 Control Register (ECSPIx_CONREG)

i.MX 8M Mini Applications Processor Reference Manual

in ecspi driver function spi_imx_probe(), "bits_per_word"

spi-imx.c\spi\drivers - linux-imx - i.MX Linux kernel 

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

元の投稿で解決策を見る

0 件の賞賛
1 返信
928件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi m.c.

one can try to configure BURST_LENGTH described in

sect.10.1.5.3 Control Register (ECSPIx_CONREG)

i.MX 8M Mini Applications Processor Reference Manual

in ecspi driver function spi_imx_probe(), "bits_per_word"

spi-imx.c\spi\drivers - linux-imx - i.MX Linux kernel 

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

0 件の賞賛