1 Reply Latest reply on Jun 14, 2020 11:02 PM by SudheeshK_26

    SPANSION FL256LAVF01 page program issue

    swai_4713561

      Hi,

       

      We are interfacing SPANSION FL256LAVF01  and NRF52840 and facing issues with page programming.

      Info(step):

      1. I have using 3-byte addressing default mode.

      2. first write 256-byte data

                Command sequence:

           -     write_enable(0x06),sector_erase(0x20,0x00,0x00,0x00), write_enable(0x06),write_data(0x02,0x00,0x00,0x00,...252-byte data)- It is working and able to read it.

      3. Second, write 256-byte data

                 Command sequence

           -     write_enable(0x06),write_data(0x02,0x00,0x02,0x00,...252-byte data)- This is not working and getting data as 255 for all 252 byte. And also i am tring with other           address but behaviour is same.

       

      And also I am not able to read any status/configuration register.

      - read_config(0x65,0x80,0x00,0x04)

       

      I am doing anything wrong?

       

      please provide me if you have  SPANSION FL256LAVF01 software note or any document related to software.

        • 1. Re: SPANSION FL256LAVF01 page program issue
          SudheeshK_26

          Hello,

           

          1. Are you able to read device ID  (RDID command, 9Fh)from our flash device? If not, there may be some issue with the SPI communication. Our device support SPI modes 0 and 3 only. Please double check you are using correct SPI mode. Refer page 11 (https://www.cypress.com/file/192131/download ) of datasheet for more information.
          2. You can send only one command in one CS# cycle. Are you making CS# pin HIGH between different commands?
          3. Before reading data from flash, you have to make sure that there isn't any program or erase operation is in progress. Are you polling status register after program and erase operations to know the completion status? Flash is busy when bit 0 (WIP) of status register is set to 1.

           

          Example: Command sequence for sector erase

          1. Make CS# LOW
          2. Send WREN command
          3. Make CS# HIGH
          4. Make CS# LOW
          5. Send Sector erase command
          6. Send sector address
          7. Make CS# HIGH
          8. Make CS# LOW
          9. Read status register
          10. CS# HIGH
          11. Check if WIP is set to 1. Repeat the steps 8 to 10, until WIP bit becomes 0.

           

          Low level driver for our serial NOR flash devices are available at: https://www.cypress.com/documentation/software-and-drivers/low-level-driver-spi-flash?source=search&cat=software_tools . You can use it as a reference to write your application.

           

          Please feel free to ask if you have any other related queries.

           

          Thanks and Regards,

          Sudheesh