Skip to main content
Visitor II
January 11, 2024
Question

Can't enable writing on SST25VF010A flash memory

  • January 11, 2024
  • 2 replies
  • 1332 views

Hello. I'm working on a board that has an STM32F401CBU6 which interfaces with a SST25VF010A 1Mbit SPI flash memory. I'm having some trouble trying to enable writing of the IC and being able to confirm this by seeing a change in the status register. Memory datasheet . 

 

As seen in the datasheet by sending the value 0x06 then pulling CE# high the chip should be write enabled which should flip the WEL bit in the status register to a 1. In my case this should mean the register value should be 0x02 since I initialise the status register to 0x00 to set BP0 and BP1 bits to 0 to disable protection of entire memory array.

SwissGnome_0-1704933646851.png

SwissGnome_1-1704933688458.png

SwissGnome_2-1704933736363.png

SwissGnome_3-1704933778375.png

When I run this code I get this on RealTerm.

SwissGnome_4-1704933823893.png

Still the same 0x00 meaning the WEL bit was not changed when I tried to write enable. I'm not sure why this isn't working. I'm pretty sure the config_status_reg() and read_status_reg functions both work so maybe it's the write_enable function? But it's such a simple transaction I don't see how it could be wrong. Thanks in advance.

    This topic has been closed for replies.

    2 replies

    Graduate II
    January 11, 2024

    Read the JEDEC ID via 0x9F, confirm things are working.

    Visitor II
    January 11, 2024

    Where is that in the datasheet? I can read device ID and manufacturer ID so I know the SPI is working

    Visitor II
    January 11, 2024

    Nevermind I'm an *** and CS_MEM was mapped to GPIOA PIN3 not GPIOB PIN3 :(((((((