MPC5744P - SPI change clock polarity between chip selects (CTAR)

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

MPC5744P - SPI change clock polarity between chip selects (CTAR)

1,060件の閲覧回数
chosp
Contributor III

I'm interested in connecting two devices to the same SPI bus which differ on the idle clock polarity (defined as CPOL).

The MPC5744P i'm working on provides a clever resource to deal with this, which are the CTAR registers and the CTAS field when performing a TX write.

However, I have a question I've been unable to answer reading through the documentation. 

If transfer #0 is made to CS0 with CPOL=0 (using CTAR0 config), and then transfer #1 is made to CS1 with CPOL=1 (using CTAR1 config):

a) Clock polarization change happens before CS assert (ideal)

b) Clock polarization change happens after CS assert (unfeasible, as the clock change may count as a valid shift)

Please provide me with evidence on documentation of either answer, as this will condition my entire design.

Best regards

ラベル(1)
タグ(2)
0 件の賞賛
返信
2 返答(返信)

891件の閲覧回数
davidtosenovjan
NXP TechSupport
NXP TechSupport

Hi,

option no.A is correct unless SPI is configured for Continuous Selection Format is selected, in this case polarity change is not allowed.

0 件の賞賛
返信

891件の閲覧回数
chendong
Contributor I

Hi, I have the same application that two devices connect to one SPI bus with different clk polarity. And I have measured the waveform when two devices communication, as shown below (CS1 is not measured).

spi0.png

I found that CLK will change before CS assert. But the timing does not meet the requirements. Time betwwen CLK change and CS assert is only 10ns, the deviece connect to CS0 require 75ns. This will cause the communication failure. The enlarged waveform is as shown below.

spi1.png

Is there some way to configure the delay after CLK changed?

0 件の賞賛
返信