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.