Most likely, something is wrong in the SPI memory write and/or read command
sequence. You can investigate this by logging the SPI bus activity during memory
write and read (with oscilloscope or SPI data logger) and then checking the
command/data sequence with your SPI memory data sheet.
Have a great day,
Artur