3 Replies Latest reply on Mar 23, 2020 5:38 AM by LePo_1062026

    Can some explain the apparent inconsistancies with the QSPI_Flash_Read_Write example?

    LePo_1062026

      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