SPI - clock polarity

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

SPI - clock polarity

1,750 次查看
Ben
Senior Contributor I

Hello

I am using DSC (56F84567) as master SPI. the slave chip read data bit on clock rising edge. However, setting the SPI clock to "rising edge" dont give any setup time to data to be stable before sending the clock, so the slave can't read the data.

rising_edge.jpg

When setting the clock polarity to falling edge, the clock is shifted and the slave can read the data on rising edge.

falling_edge.jpg

Is there a way in SPI component to set the data stabilization time by shifting the clock?

 

0 项奖励
回复
1 回复

1,731 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Benny,

First of all, can you tell us the signal name for the screenshot of the scope?

BTW, I see that the SPI of MC56F84567 is master, based on the SPI protocol, when the SPI is idle, the /SS pin should be high, there should not be clock signal within the high logic of /SS.

Can you tell us whether the /SS signal is generated by the SPI module itself or GPIO pin controlled by firmware?

This is the SPI timing:

xiangjun_rong_0-1609739604255.png

From above spi timing, you can see that the rising edge of SCLK triggers the data pin MOSI to be valid, falling edge of SCLK will latch the data pin on the slave SPI receiver. So the setting up time is half clock cycle time of SCLK, the holding time is the half of the SCLK cycle time.

BR

XiangJun Rong

0 项奖励
回复