AnsweredAssumed Answered

QSPI Clock

Question asked by Salman Razzaq on May 14, 2013
Latest reply on May 15, 2013 by TomE

Hi,

 

I have a problem with SPI transfer between MCF52259 and ADS1278 data converter. The clock from 52259 is generating but there are delays between them and thus ADS1278 is not working properly.

 

Here is how the clock signal looks like.

 

Drawing1.png

 

The output from ADS1278 is 24-bit which it is sending out on SPI protocol.

 

I configured the 52259 QSPI registers as follows. I am not sending out anything QSPI_DOUT pin as I configured it as GPIO which is always low. Also, I am not using any QSPI_CS0, QSPI_CS1, QSPI_CS2 and QSPI_CS3 pins so I masked it out.

 

MCF_QSPI_QMR = MCF_QSPI_QMR_MSTR |

                              MCF_QSPI_QMR_BITS(12) |

                              MCF_QSPI_QMR_CPOL |

                              MCF_QSPI_QMR_CPHA |

                              MCF_QSPI_QMR_BAUD(2);

 

MCF_QSPI_QWR = MCF_QSPI_QWR_WREN |

                              MCF_QSPI_QWR_WRTO |

                              MCF_QSPI_QWR_ENDQP(15) |

                              MCF_QSPI_QWR_NEWQP(0);

 

MCF_QSPI_QIR = MCF_QSPI_QIR_ABRTE |

                            MCF_QSPI_QIR_SPIFE;

 

for( request = 0; request <= 15; request++ )

{

      MCF_QSPI_QAR = (WORD)(MCF_QSPI_QAR_CMD + request);

      MCF_QSPI_QDR = MCF_QSPI_QDR_BITSE |

                                   MCF_QSPI_QDR_QSPI_CS3 |

                                   MCF_QSPI_QDR_QSPI_CS2 |

                                   MCF_QSPI_QDR_QSPI_CS1 |

                                   MCF_QSPI_QDR_QSPI_CS0;

}

 

MCF_QSPI_QWR &= ~(MCF_QSPI_QWR_HALT);

 

MCF_QSPI_QDLYR = MCF_QSPI_QDLYR_SPE;

 

Any help will be highly appreciated.

 

Regards.

 

Outcomes