David Demers

M52233DEMO QSPI no data read back from AT25F512A

Discussion created by David Demers on Feb 28, 2008
Latest reply on Apr 14, 2008 by David Demers
I'm trying to read back the status regster from the SPI Serial Flash AT25F512A, but always get back 0's my code is below. can anyone see any problems with it?
 int i;    MCF_GPIO_PQSPAR = 0x1555;    MCF_GPIO_DDRQS = 0; MCF_QSPI_QMR   = 0xA308; MCF_QSPI_QDLYR = 0x0000; MCF_QSPI_QIR   = 0xD00F;  MCF_QSPI_QAR   = 0x0020; MCF_QSPI_QDR   = 0x7E00; MCF_QSPI_QAR   = 0x0000; MCF_QSPI_QDR   = 0x0005;  MCF_QSPI_QWR   = 0x0100;  MCF_QSPI_QDLYR = MCF_QSPI_QDLYR_SPE;  while( !(MCF_QSPI_QIR & MCF_QSPI_QIR_SPIF )) {  // Spin here waiting for completion      }; printf("Transfer Complete");   MCF_QSPI_QAR   = 0x0010;  printf("\nData[%d]: %d\n", 1, MCF_QSPI_QDR);