I am working on customBF527 board interfaced to a SPI Flash (ST micro - M25P40).
The SPI clock and other signals are good observing with a scope.
The VDSP examples for flash programmer contains sample for M25P16 (with a different capacity) for a bf527ezkitlite. I do not have EZkitlite.
I have changed the appropriate sector count to 8.
and also I have tried editing the
#define SPI_PAGE_SIZE (528)
#define SPI_SECTORS (512)
#define SPI_SECTOR_SIZE (4224)
#define SPI_SECTOR_DIFF (3968)
#define PAGE_BITS (10)
#define PAGE_SIZE_DIFF (496)
in the adi_m25p16.c of the sample
I do not understand how to edit these values to make it work. The numbers seem to have no relationship with datasheet of M25P16 which i could understand and edit for M25P40
(attaching the data sheet of both)
for now using the flash programmer utility in the IDDE I am able to detect the chip manufacturer ID and device code, erase the flash and fill it.
RESET FLASH fails with "Polling fails error"
programming the flash with an LDR fails with a "could not wite error"