nema1
nema1

Reputation: 91

Stm32 spi write on rising edge and read on falling edge, possible?

i have application ic which needs to write on rising egde and read on falling edge . Write now i get both on rising egde?

I am using bidirectional mode so only 3 wires Thanks

Upvotes: 0

Views: 964

Answers (1)

needs to write on rising egde and read on falling edge

Look at the SPI timing diagram in the Reference Manual. (This is for the F4 series, but AFAIK other series have compatible SPI controllers)

SPI timing diagram

It does what you want when CPHA == 1 and CPOL == 0. Data lines are written at the rising edge, and captured at the falling edge of SCK.

Upvotes: 1

Related Questions