cancel
Showing results for 
Search instead for 
Did you mean: 

SPI interface where slave returns a delayed clock for MISO

Keerthi
Associate III

Hi,

 

I am using differential SPI communication with an STM32G474. The master sends the clock (SCLK) to the slave and data through the MOSI line. However, the slave responds on MOSI using a delayed clock (DCLK), which is derived from the master clock with some delay (DCLK = SCLK*Delay).

This means the master must read from the slave using DCLK instead of SCLK. I’m sure this cannot be handled through the normal SPI peripheral.

Could someone suggest a solution for this scenario?
One idea I had was:

  1. Use another SPI peripheral on the STM32, configure it as a slave, and use the delayed clock (DCLK) from the slave device as the input clock to capture the return data.

Would this approach work, or is there a better method?

 

Thank you in advance

13 REPLIES 13

Surely, you can draw a block diagram?

 


@Keerthi wrote:

I have to handle data from slave using clock send by it and get the data. 


Yes, so considering it as a "Master", and using a 2nd STM32 SPI in Slave mode would definitely be a thing to try.

Again, doesn't the device's manufacturer give any suggestions on working with standard SPI Masters? It must be a common question!

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

At 60Mbit is more a job for a fpga.

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

But I am planning to use the microcontroller instead of FPGA. Because even STM32G474 can provide maximum SPI frequency upto 75MHz. 

 


@TDK wrote:

This is not differential signaling. Sounds much more like "delayed".


Agreed.

Title edited to better describe the situation.

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.