AnsweredAssumed Answered

Unable to read write SPI flash using CCES

Question asked by sujan5614 on May 27, 2013
Latest reply on Jun 10, 2013 by Prashant


    I am working on ADSP BF548 EZ-KIT Lite Board. Using the SPI_flash_read.c file that came with the installation I was able to both modify and read the Status Register of M25P16 Serial Flash Memory.


But I am unable to write into the memory location of M25P16.


This is part of the code that I modified,


//set the transfer initiate mode

result = adi_spi_SetTransferInitiateMode(hSPI, ADI_SPI_TX_INITIATE_INTERRUPT);


//send a write enable command to set the WEL bit in M25P16

result = adi_spi_ReadWrite(hSPI, &Xcvr_write_enable);


//write into the memory location 080000h, using PAGE_PROGRAM

result = adi_spi_ReadWrite(hSPI, &Xcvr_tx);


//read from the memory location 080000h.

result = adi_spi_ReadWrite(hSPI, &Xcvr_rx);


I am getting the default value that is present on the M25P16 i.e FFh.


I am enclosing the code here within.


Please guide me through to make it work.