How to Set SPI's Clock

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

How to Set SPI's Clock

ソリューションへジャンプ
2,512件の閲覧回数
jiehunt
Contributor II

I use the imx6ql-sabreauto board to communicate with a slave board.

I want to know the highest speed of spi block.

I read the document and i think the highest speed is up to 60MHz.

and i use the ioctl like this

 ioctl (fd, SPI_IOC_WR_MAX_SPEED_HZ, 60MHz)

But , I don't confirm whether this is effective or not.

How do I know the actual speed of the SPI work with?

Thank you!

ラベル(2)
0 件の賞賛
返信
1 解決策
2,179件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi Jie

max. ecspi frequency can be found in sect.4.11.2 ECSPI Timing Parameters

i.MX6DQ Datasheet

http://cache.freescale.com/files/32bit/doc/data_sheet/IMX6DQCEC.pdf

example of usage with spi-nor flash using dts "spi-max-frequency" parameter in

imx6qdl-sabresd.dtsi

linux-2.6-imx.git - Freescale i.MX Linux Tree 

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

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
2,180件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi Jie

max. ecspi frequency can be found in sect.4.11.2 ECSPI Timing Parameters

i.MX6DQ Datasheet

http://cache.freescale.com/files/32bit/doc/data_sheet/IMX6DQCEC.pdf

example of usage with spi-nor flash using dts "spi-max-frequency" parameter in

imx6qdl-sabresd.dtsi

linux-2.6-imx.git - Freescale i.MX Linux Tree 

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

0 件の賞賛
返信
2,179件の閲覧回数
jiehunt
Contributor II

Thank you for your answer.

Actually my imx6qdl-sabreauto.dtsi is like this:

&ecspi1{
  fsl,spi-num-chipselects = <1>;
  cs-gpios = <&gpio5 25 0>;
  pinctrl-names = "default";
  pinctrl-0 = <&pinctrl_ecspi1>;
  status = "okay";
  spidev0: spi@0 {
  compatible = "spidev";
  spi-max-frequency = <40000000>;
  reg = <0>;
  };
};

So, I think the SPI is work with 40MHz. 

0 件の賞賛
返信