Can you please send the vendor command as follows?
3. WRITE - all 'A' s for one sector
Please let me know the results of two reads.
You may probe the SPI lines and see whethe there is proper communication.
it works for windex is < 0x00EF,if windex is =>0X00FF it will give only 00 as control in transfer.
how this windex is related to page address and sector number,please let me know.
Please check how the Windex is parsed in the setupcb in the firmware.
uint16_t glSpiPageSize = 0x100; /* SPI Page size to be used for transfers.
byteAddress =pageAddress *glSpiPageSize
location = (byteAddress >> 16) & 0xFF; /* MS byte */
location = (byteAddress >> 8) & 0xFF;
location = byteAddress & 0xFF; /* LS byte */
I tried calculating page address,but it is not matched with spi page address.
can you help me.
Please let me know what is the expected page address and what did you get.
I couldnot find the page address in S25FL127SABMFI101 datasheet and not able to verify address in datasheet and fx3 code.This flash is from cypress.if you find any answer please let me know.
For getting the page address / page count, refer to the code snippet
uint32_t byteAddress = 0;
uint16_t pageCount = (byteCount / glSpiPageSize);
The page size is 256 bytes as mentioned in firmware
uint16_t glSpiPageSize = 0x100; /* SPI Page size to be used for transfers. */
Please refer to 184.108.40.206 Page Programming in https://www.cypress.com/file/177961/download (S25FL127SABMFI101 datasheet)
- Before writing to the flash, the flash needs to be erased. Please go through the vendor commands for erasing the flash.
Note: For erasing wIndex value is the sector address and not page address. S25FL127SABMFI101 flash is of 16MB so 65536 pages ( each of 256 bytes) and as per the firmware each sector is of 64KB. To erase the page, that whole sector should be deleted.
- S25FL127SABMFI101 flash (16MB) will have 256 sectors and each sector will have 256 pages.
- for reading /writing from/to flash the wIndex will take the page number to be read/written from/to.
Please find the attached results of the cyfxusbspidmamode firmware example for reading and writing to page 0x00FF