cancel
Showing results for 
Search instead for 
Did you mean: 

stm32f730 , Quad SPI ,how to configure the data shift out on the rising edge of clk and samle one the falling edge

zhong.1
Associate II

stm32f730 , Quad SPI ,i used to communicate to a device ,need 3bits data width.

but how to configure the data shift out on the rising edge of clk and sample the falling edge . like the Stand SPI , we can set CPOL to '0' or '1'?

if not to do , pls provide a mcu to me which have such functions

thanks!

7 REPLIES 7
TDK
Guru

Quad SPI is not just SPI with 4 data lines. It's really a specialized interface for external memories. Sampling is always on the rising edge. Your choices are mode 0 (CPOL=CPHA=0) or mode 3 (CPOL=CPHA=1).

You can chain together 3 SPIs together to get what you want, using one as master and the other two as slaves driven by the master's clock.

If you feel a post has answered your question, please click "Accept as Solution".
zhong.1
Associate II

I know the FPGA can do it ,but i don't famliar with it , so i want to apply on the Mcu . how to Chain 3 SPIs together on one MCU which band as one Master SPI with 3bits data width? or have other such peripheral can do it ,thanks.

Tie all CS lines together. Tie all SCK lines together. Master clock drives the slaves.
If you feel a post has answered your question, please click "Accept as Solution".

oh , mabye like this

SPI_1:

MOSI --- data0

SPI_2 :

MISO ---->data1

SPI_3 :

MISO ---->data2

Yes, exactly, plus the CS and SCK lines that I mentioned.
If you feel a post has answered your question, please click "Accept as Solution".

In IOC setting, there is CPOL {low, high}, CPHA {1, 2 edges}.

Can I confirm that (CPOL: 0, CPHA: 0) = (CPOL: low, CPHA: 1 edge)

and (CPOL: 1, CPHA: 1) = (CPOL: high, CPHA: 2 edge)

Yes.

https://en.wikipedia.org/wiki/Serial_Peripheral_Interface

If you feel a post has answered your question, please click "Accept as Solution".