Can some explain the apparent inconsistancies with the QSPI_Flash_Read_Write example?

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

cross mob
Len_CONSULTRON
Level 9
Level 9
Beta tester 500 solutions authored 1000 replies posted

Hi,

I added the QSPI_Flash_Read_Write project to my MTB using a CY8CPROTO-062-4343W BSP.

I compiled and ran it.  I get the results on my terminal as specified in the README.md.

*************** CE220823 - PSoC 6 MCU QSPI Flash Read and Write ***************

Total Flash Size: 67108864 bytes

1. Erasing 262144 bytes of memory

2. Reading after Erase and verifying that each byte is 0xFF

Received Data (64 bytes):

-------------------------

0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF

0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF

0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF

0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF

3. Writing data to memory

Written Data (64 bytes):

-------------------------

0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0A 0x0B 0x0C 0x0D 0x0E 0x0F

0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1A 0x1B 0x1C 0x1D 0x1E 0x1F

0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2A 0x2B 0x2C 0x2D 0x2E 0x2F

0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3A 0x3B 0x3C 0x3D 0x3E 0x3F

4. Reading back for verification

Received Data (64 bytes):

-------------------------

0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0A 0x0B 0x0C 0x0D 0x0E 0x0F

0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1A 0x1B 0x1C 0x1D 0x1E 0x1F

0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2A 0x2B 0x2C 0x2D 0x2E 0x2F

0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3A 0x3B 0x3C 0x3D 0x3E 0x3F

================================================================================

SUCCESS: Read data matches with written data!

================================================================================

Inconsistency #1:

The design.cyqspi lists the S25FL512S (4-byte Addressing Mode) however the part on the proto board is actually the S25HL512T.

Why is the S25FL512S assigned instead of the S25HL512T?

Inconsistency #2:

When I change The design.cyqspi from S25FL512S to S25HL512T and recompile I get the following output.

*************** CE220823 - PSoC 6 MCU QSPI Flash Read and Write ***************

Total Flash Size: 67108864 bytes

1. Erasing 4096 bytes of memory

2. Reading after Erase and verifying that each byte is 0xFF

Received Data (64 bytes):

-------------------------

0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0A 0x0B 0x0C 0x0D 0x0E 0x0F 0x10 0x11

0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1A 0x1B 0x1C 0x1D 0x1E 0x1F 0x20 0x21

0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2A 0x2B 0x2C 0x2D 0x2E 0x2F 0x30 0x31

0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3A 0x3B 0x3C 0x3D 0x3E 0x3F 0xFF 0xFF

================================================================================

FAIL: Flash contains data other than 0xFF after erase

Error Code: 0x000000FD

================================================================================

The sector size is now 4096 bytes.  It appears the read of the 64 bytes has a two byte offset.

Any clues?

Len

Len
"Engineering is an Art. The Art of Compromise."
0 Likes
1 Solution

Hi Leonard,

Thank you for contacting Cypress Semiconductor.

Could you please confirm whether the NOR Flash IC soldered on your kit is S25HL512T or S25FL512S?

I would like to point you to the following release note which says -

pastedImage_0.png

Please see the second issue.

Regards,

Apurva

View solution in original post

3 Replies
Len_CONSULTRON
Level 9
Level 9
Beta tester 500 solutions authored 1000 replies posted

Update:

I don't have enough experience with NOR FLASH devices and the datasheet for each device is a bit confusing.

Having said that, the .cymem configurations for the S25FL512S and the S25HL512T differ in some potentially important ways.

ParameterS25FL512SS25HL512T
Erase Block Size256KB4KB

Although the S25HL512T lists that it can support 256K or 4K erase sector sizes.

Other timing parameters are different also.  Changing them without knowing the correct value is a bit concerning.

I figured the reason that the S25FL512S was selected is that is the part used in the CY8CKIT-062-KIT.  The CY8CPROTO-062-4343W which uses the S25HL512T is "close enough" to the S25FL512S specs and generally works (hopefully).

When I build the QSPI_Flash_Read_Write_Using_SFDP project with the CY8CPROTO-062-4343W it appears to read the SFDP section of memory on the S25HL512T and correctly configured the NOR FLASH for correct operation.

It would be nice if someone from the Cypress NOR FLASH group could verify the .cymem configuration for the S25HL512T device.

Len

Len
"Engineering is an Art. The Art of Compromise."
0 Likes

Hi Leonard,

Thank you for contacting Cypress Semiconductor.

Could you please confirm whether the NOR Flash IC soldered on your kit is S25HL512T or S25FL512S?

I would like to point you to the following release note which says -

pastedImage_0.png

Please see the second issue.

Regards,

Apurva

Apurva,

You are correct.  The S25FL512SAIF01 is installed.  I was basing my assumption on the PCB silkscreen, the Schematics and the BoM.

pastedImage_0.png

Len

Len
"Engineering is an Art. The Art of Compromise."
0 Likes