i.MX8M Mini SPI clock isn't continuously

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

i.MX8M Mini SPI clock isn't continuously

Jump to solution
961 Views
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

Labels (1)
0 Kudos
1 Solution
868 Views
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!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
1 Reply
869 Views
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 Kudos