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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

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

1,064 次查看
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 回复数

895 次查看
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 项奖励
回复

895 次查看
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 项奖励
回复