S25FL127SABMFI101 flash

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
gean_3054931
Level 5
Level 5
10 likes given 5 likes given First like received

Hello,

We are using S25FL127SABMFI101 flash for booting in FX3. Its connected as in the schematic attached to this thread.

Before testing fFX3 boot, i am trying to read and write data to this SPI flash by using the example code in C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\firmware\serialif_examples\cyfxusbspidmamode. I am not able to read from the SPI flash, this example code is tested in the control center. I have attached the control center screenshots.

I am getting 00 as control in transfer that is SPI read from the FLASH.

Regards,

Geetha

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.

Hi,

- 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

Regards,

Rashi

Regards,
Rashi

View solution in original post

8 Replies
KandlaguntaR_36
Moderator
Moderator
Moderator
25 solutions authored 10 solutions authored 5 solutions authored

Hello,

Can you please send the vendor command as follows?

1. READ

2. ERASE

3. WRITE - all 'A' s for one sector

4. READ

Please let me know the results of two reads.

You may probe the SPI lines and see whethe there is proper communication.

0 Likes

Hello,

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.

thank you.

0 Likes

Please check how the Windex is parsed in the setupcb in the firmware.

0 Likes

Hello,

uint16_t glSpiPageSize = 0x100;  /* SPI Page size to be used for transfers.

pageAddress=windex

byteAddress =pageAddress *glSpiPageSize

        location[1] = (byteAddress >> 16) & 0xFF;       /* MS byte */

        location[2] = (byteAddress >> 😎 & 0xFF;

        location[3] = byteAddress & 0xFF;               /* LS byte */

I tried calculating page address,but it is not matched with spi page address.

can you help me.

regards

geetha.

0 Likes

Geetha,

Please let me know what is the expected page address and what did you get.

0 Likes

Hello ,

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.

regards,

geetha.

0 Likes

Hi,

For getting the page address / page count, refer to the code snippet

       

    CyU3PDmaBuffer_t buf_p;

    uint8_t location[4];

    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 9.5.1.2 Page Programming in https://www.cypress.com/file/177961/download  (S25FL127SABMFI101 datasheet)

Regards,

Rashi

Regards,
Rashi
0 Likes
lock attach
Attachments are accessible only for community members.

Hi,

- 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

Regards,

Rashi

Regards,
Rashi